Skip to content

Commit

Permalink
MINOR: [CI] Make sure Linux Docker tests can write core dumps
Browse files Browse the repository at this point in the history
  • Loading branch information
pitrou committed Sep 3, 2024
1 parent 170c599 commit 32ab6de
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 4 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,7 @@ jobs:
run: |
# GH-40558: reduce ASLR to avoid ASAN/LSAN crashes
sudo sysctl -w vm.mmap_rnd_bits=28
sudo sysctl -w kernel.core_pattern="core.%e.%p"
ulimit -c unlimited
source ci/scripts/util_enable_core_dumps.sh
archery docker run ${{ matrix.image }}
- name: Docker Push
if: >-
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ jobs:
ARCHERY_DOCKER_USER: ${{ secrets.DOCKERHUB_USER }}
ARCHERY_DOCKER_PASSWORD: ${{ secrets.DOCKERHUB_TOKEN }}
run: >
source ci/scripts/util_enable_core_dumps.sh
archery docker run \
-e ARCHERY_DEFAULT_BRANCH=${{ github.event.repository.default_branch }} \
-e ARCHERY_INTEGRATION_WITH_NANOARROW=1 \
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,7 @@ jobs:
ARCHERY_DOCKER_USER: ${{ secrets.DOCKERHUB_USER }}
ARCHERY_DOCKER_PASSWORD: ${{ secrets.DOCKERHUB_TOKEN }}
run: |
sudo sysctl -w kernel.core_pattern="core.%e.%p"
ulimit -c unlimited
source ci/scripts/util_enable_core_dumps.sh
archery docker run \
-e ARROW_FLIGHT=ON \
-e ARROW_FLIGHT_SQL=ON \
Expand Down
34 changes: 34 additions & 0 deletions ci/scripts/util_enable_core_dumps.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/usr/bin/env bash
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

# NOTE: this script is not marked executable as it should be source'd
# for `ulimit` to take effect.

set -ex

platform=$(uname)

if [ "${platform}" = "Linux" ]; then
# We need to override `core_pattern` because
# 1. the original setting may reference apport, which is not available under
# most Docker containers;
# 2. we want to write the core file in a well-known directory.
sudo sysctl -w kernel.core_pattern="/tmp/core.%e.%p"
fi

ulimit -c unlimited
1 change: 1 addition & 0 deletions dev/tasks/docker-tests/github.cuda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ jobs:
env:
{{ macros.github_set_sccache_envvars()|indent(8) }}
run: |
source arrow/ci/scripts/util_enable_core_dumps.sh
archery docker run \
-e SETUPTOOLS_SCM_PRETEND_VERSION="{{ arrow.no_rc_version }}" \
{{ flags|default("") }} \
Expand Down
1 change: 1 addition & 0 deletions dev/tasks/docker-tests/github.linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ jobs:
run: |
# GH-40558: reduce ASLR to avoid TSAN crashing
sudo sysctl -w vm.mmap_rnd_bits=28
source arrow/ci/scripts/util_enable_core_dumps.sh
archery docker run \
-e SETUPTOOLS_SCM_PRETEND_VERSION="{{ arrow.no_rc_version }}" \
{{ flags|default("") }} \
Expand Down
1 change: 1 addition & 0 deletions dev/tasks/python-wheels/github.linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ jobs:
- name: Test wheel
shell: bash
run: |
source arrow/ci/scripts/util_enable_core_dumps.sh
archery docker run python-wheel-manylinux-test-imports
archery docker run python-wheel-manylinux-test-unittests
Expand Down

0 comments on commit 32ab6de

Please sign in to comment.