Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MINOR: [CI][C++] Enable core dumps and stack traces in Linux/macOS jobs #43937

Merged
merged 7 commits into from
Sep 11, 2024

Conversation

pitrou
Copy link
Member

@pitrou pitrou commented Sep 3, 2024

Rationale for this change

In #43936 I noticed that core dumps were not written out for crashing C++ tests. One problem is that, by default, Ubuntu hosts pipe core dumps to apport, but it is not available inside containers. Another is that the ulimit must be set in the host, not in the container.

In addition, this PR restores automatic traceback generation when running C++ tests, on Linux and macOS jobs.

Are these changes tested?

Manually by introducing a spurious segfault and running Docker containers.

Are there any user-facing changes?

No.

@github-actions github-actions bot added the awaiting review Awaiting review label Sep 3, 2024
@pitrou
Copy link
Member Author

pitrou commented Sep 3, 2024

@github-actions crossbow submit -g cpp

@pitrou
Copy link
Member Author

pitrou commented Sep 3, 2024

@github-actions crossbow submit cuda wheelcp312*

This comment was marked as outdated.

This comment was marked as outdated.

@pitrou
Copy link
Member Author

pitrou commented Sep 3, 2024

@kou Does this look ok?

ci/scripts/util_enable_core_dumps.sh Outdated Show resolved Hide resolved
ci/scripts/util_enable_core_dumps.sh Show resolved Hide resolved
@github-actions github-actions bot added awaiting changes Awaiting changes awaiting change review Awaiting change review and removed awaiting review Awaiting review awaiting changes Awaiting changes awaiting change review Awaiting change review labels Sep 4, 2024
@pitrou
Copy link
Member Author

pitrou commented Sep 10, 2024

@github-actions crossbow submit -g cpp

@github-actions github-actions bot added Component: C++ awaiting change review Awaiting change review and removed awaiting changes Awaiting changes labels Sep 10, 2024
Copy link

Revision: 44b7271

Submitted crossbow builds: ursacomputing/crossbow @ actions-3a98f95e07

Task Status
example-cpp-minimal-build-static GitHub Actions
example-cpp-minimal-build-static-system-dependency GitHub Actions
example-cpp-tutorial GitHub Actions
test-alpine-linux-cpp GitHub Actions
test-build-cpp-fuzz GitHub Actions
test-conda-cpp GitHub Actions
test-conda-cpp-valgrind GitHub Actions
test-cuda-cpp GitHub Actions
test-debian-12-cpp-amd64 GitHub Actions
test-debian-12-cpp-i386 GitHub Actions
test-fedora-39-cpp GitHub Actions
test-ubuntu-20.04-cpp GitHub Actions
test-ubuntu-20.04-cpp-bundled GitHub Actions
test-ubuntu-20.04-cpp-minimal-with-formats GitHub Actions
test-ubuntu-20.04-cpp-thread-sanitizer GitHub Actions
test-ubuntu-22.04-cpp GitHub Actions
test-ubuntu-22.04-cpp-20 GitHub Actions
test-ubuntu-22.04-cpp-emscripten GitHub Actions
test-ubuntu-22.04-cpp-no-threading GitHub Actions
test-ubuntu-24.04-cpp GitHub Actions
test-ubuntu-24.04-cpp-gcc-13-bundled GitHub Actions
test-ubuntu-24.04-cpp-gcc-14 GitHub Actions

@pitrou
Copy link
Member Author

pitrou commented Sep 10, 2024

Ok, we're now getting automatic backtraces on Linux x86, macOS x86, macOS ARM64 (but for some reason the backtrace on macOS ARM64 is incomplete).

On the Linux ARM64 self-hosted runner, setting a custom core pattern is forbidden.

@pitrou
Copy link
Member Author

pitrou commented Sep 10, 2024

@github-actions crossbow submit test-fedora-39-cpp test-ubuntu-20.04-cpp-bundled test-ubuntu-20.04-cpp-minimal-with-formats test-ubuntu-24.04-cpp-gcc-13-bundled

Copy link

Revision: 5aa9253

Submitted crossbow builds: ursacomputing/crossbow @ actions-262efe6260

Task Status
test-fedora-39-cpp GitHub Actions
test-ubuntu-20.04-cpp-bundled GitHub Actions
test-ubuntu-20.04-cpp-minimal-with-formats GitHub Actions
test-ubuntu-24.04-cpp-gcc-13-bundled GitHub Actions

@pitrou
Copy link
Member Author

pitrou commented Sep 10, 2024

@github-actions crossbow submit -g cpp -g python -g r

@pitrou
Copy link
Member Author

pitrou commented Sep 10, 2024

@github-actions crossbow submit wheellinux* wheelmacos*

@pitrou pitrou changed the title MINOR: [CI] Make sure Linux Docker tests can write core dumps MINOR: [CI][C++] Enable core dumps and stack traces in Linux/macOS jobs Sep 10, 2024
@pitrou
Copy link
Member Author

pitrou commented Sep 10, 2024

@kou This PR went a bit further as it now re-enables automatic tracebacks on Linux and macOS (see example builds above). Do you want to give it another review?

Copy link

Revision: c65527a

Submitted crossbow builds: ursacomputing/crossbow @ actions-272dc0e9a9

Task Status
verify-rc-binaries-wheels-linux-almalinux-8-amd64 GitHub Actions
verify-rc-binaries-wheels-linux-conda-latest-amd64 GitHub Actions
verify-rc-binaries-wheels-linux-ubuntu-20.04-amd64 GitHub Actions
verify-rc-binaries-wheels-linux-ubuntu-22.04-amd64 GitHub Actions
verify-rc-binaries-wheels-macos-11-amd64 GitHub Actions
verify-rc-binaries-wheels-macos-12-amd64 GitHub Actions
verify-rc-binaries-wheels-macos-14-arm64 GitHub Actions
wheel-macos-monterey-cp310-amd64 GitHub Actions
wheel-macos-monterey-cp310-arm64 GitHub Actions
wheel-macos-monterey-cp311-amd64 GitHub Actions
wheel-macos-monterey-cp311-arm64 GitHub Actions
wheel-macos-monterey-cp312-amd64 GitHub Actions
wheel-macos-monterey-cp312-arm64 GitHub Actions
wheel-macos-monterey-cp313-amd64 GitHub Actions
wheel-macos-monterey-cp313-arm64 GitHub Actions
wheel-macos-monterey-cp38-amd64 GitHub Actions
wheel-macos-monterey-cp38-arm64 GitHub Actions
wheel-macos-monterey-cp39-amd64 GitHub Actions
wheel-macos-monterey-cp39-arm64 GitHub Actions
wheel-manylinux-2-28-cp310-amd64 GitHub Actions
wheel-manylinux-2-28-cp310-arm64 GitHub Actions
wheel-manylinux-2-28-cp311-amd64 GitHub Actions
wheel-manylinux-2-28-cp311-arm64 GitHub Actions
wheel-manylinux-2-28-cp312-amd64 GitHub Actions
wheel-manylinux-2-28-cp312-arm64 GitHub Actions
wheel-manylinux-2-28-cp313-amd64 GitHub Actions
wheel-manylinux-2-28-cp313-arm64 GitHub Actions
wheel-manylinux-2-28-cp38-amd64 GitHub Actions
wheel-manylinux-2-28-cp38-arm64 GitHub Actions
wheel-manylinux-2-28-cp39-amd64 GitHub Actions
wheel-manylinux-2-28-cp39-arm64 GitHub Actions
wheel-manylinux-2014-cp310-amd64 GitHub Actions
wheel-manylinux-2014-cp310-arm64 GitHub Actions
wheel-manylinux-2014-cp311-amd64 GitHub Actions
wheel-manylinux-2014-cp311-arm64 GitHub Actions
wheel-manylinux-2014-cp312-amd64 GitHub Actions
wheel-manylinux-2014-cp312-arm64 GitHub Actions
wheel-manylinux-2014-cp313-amd64 GitHub Actions
wheel-manylinux-2014-cp313-arm64 GitHub Actions
wheel-manylinux-2014-cp38-amd64 GitHub Actions
wheel-manylinux-2014-cp38-arm64 GitHub Actions
wheel-manylinux-2014-cp39-amd64 GitHub Actions
wheel-manylinux-2014-cp39-arm64 GitHub Actions

Copy link

Revision: c65527a

Submitted crossbow builds: ursacomputing/crossbow @ actions-20f4348f5c

Task Status
example-cpp-minimal-build-static GitHub Actions
example-cpp-minimal-build-static-system-dependency GitHub Actions
example-cpp-tutorial GitHub Actions
example-python-minimal-build-fedora-conda GitHub Actions
example-python-minimal-build-ubuntu-venv GitHub Actions
r-binary-packages GitHub Actions
test-alpine-linux-cpp GitHub Actions
test-build-cpp-fuzz GitHub Actions
test-conda-cpp GitHub Actions
test-conda-cpp-valgrind GitHub Actions
test-conda-python-3.10 GitHub Actions
test-conda-python-3.10-cython2 GitHub Actions
test-conda-python-3.10-hdfs-2.9.2 GitHub Actions
test-conda-python-3.10-hdfs-3.2.1 GitHub Actions
test-conda-python-3.10-pandas-latest-numpy-1.26 GitHub Actions
test-conda-python-3.10-pandas-latest-numpy-latest GitHub Actions
test-conda-python-3.10-pandas-nightly-numpy-nightly GitHub Actions
test-conda-python-3.10-substrait GitHub Actions
test-conda-python-3.11 GitHub Actions
test-conda-python-3.11-dask-latest GitHub Actions
test-conda-python-3.11-dask-upstream_devel GitHub Actions
test-conda-python-3.11-hypothesis GitHub Actions
test-conda-python-3.11-pandas-upstream_devel-numpy-nightly GitHub Actions
test-conda-python-3.11-spark-master GitHub Actions
test-conda-python-3.12 GitHub Actions
test-conda-python-3.12-cpython-debug GitHub Actions
test-conda-python-3.8 GitHub Actions
test-conda-python-3.8-pandas-1.0-numpy-1.19 GitHub Actions
test-conda-python-3.9 GitHub Actions
test-conda-python-3.9-pandas-latest-numpy-latest GitHub Actions
test-conda-python-emscripten GitHub Actions
test-cuda-cpp GitHub Actions
test-cuda-python GitHub Actions
test-debian-12-cpp-amd64 GitHub Actions
test-debian-12-cpp-i386 GitHub Actions
test-debian-12-python-3-amd64 GitHub Actions
test-debian-12-python-3-i386 GitHub Actions
test-fedora-39-cpp GitHub Actions
test-fedora-39-python-3 GitHub Actions
test-r-arrow-backwards-compatibility GitHub Actions
test-r-clang-sanitizer GitHub Actions
test-r-depsource-bundled Azure
test-r-depsource-system GitHub Actions
test-r-dev-duckdb GitHub Actions
test-r-devdocs GitHub Actions
test-r-extra-packages GitHub Actions
test-r-gcc-11 GitHub Actions
test-r-gcc-12 GitHub Actions
test-r-install-local GitHub Actions
test-r-install-local-minsizerel GitHub Actions
test-r-linux-as-cran GitHub Actions
test-r-linux-rchk GitHub Actions
test-r-linux-valgrind GitHub Actions
test-r-macos-as-cran GitHub Actions
test-r-minimal-build Azure
test-r-offline-maximal GitHub Actions
test-r-offline-minimal Azure
test-r-rhub-debian-gcc-devel-lto-latest Azure
test-r-rhub-debian-gcc-release-custom-ccache Azure
test-r-rhub-ubuntu-release-latest Azure
test-r-rocker-r-ver-latest Azure
test-r-rstudio-r-base-4.1-opensuse155 Azure
test-r-rstudio-r-base-4.2-focal Azure
test-r-ubuntu-22.04 GitHub Actions
test-r-versions GitHub Actions
test-ubuntu-20.04-cpp GitHub Actions
test-ubuntu-20.04-cpp-bundled GitHub Actions
test-ubuntu-20.04-cpp-minimal-with-formats GitHub Actions
test-ubuntu-20.04-cpp-thread-sanitizer GitHub Actions
test-ubuntu-20.04-python-3 GitHub Actions
test-ubuntu-22.04-cpp GitHub Actions
test-ubuntu-22.04-cpp-20 GitHub Actions
test-ubuntu-22.04-cpp-emscripten GitHub Actions
test-ubuntu-22.04-cpp-no-threading GitHub Actions
test-ubuntu-22.04-python-3 GitHub Actions
test-ubuntu-22.04-python-313-freethreading GitHub Actions
test-ubuntu-24.04-cpp GitHub Actions
test-ubuntu-24.04-cpp-gcc-13-bundled GitHub Actions
test-ubuntu-24.04-cpp-gcc-14 GitHub Actions
test-ubuntu-r-sanitizer GitHub Actions

@github-actions github-actions bot added awaiting merge Awaiting merge and removed awaiting change review Awaiting change review labels Sep 10, 2024
Copy link
Member

@kou kou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Great! It'll be very helpful to debug CI failures.

It seems that Flight related core dump in "test-ubuntu-24.04-cpp-gcc-14" doesn't work well but we can work on this later:

https://github.com/ursacomputing/crossbow/actions/runs/10794268803/job/29938165812#step:7:3929

       Test  #77: arrow-flight-test ............................***Failed    0.28 sec
Running arrow-flight-test, redirecting output into /build/cpp/build/test-logs/arrow-flight-test.txt (attempt 1/1)
/arrow/cpp/build-support/run-test.sh: line 88: 47057 Aborted                 (core dumped) $TEST_EXECUTABLE "$@" > $LOGFILE.raw 2>&1
Running main() from ./googletest/src/gtest_main.cc

@kou kou merged commit e710b6e into apache:main Sep 11, 2024
66 of 68 checks passed
@kou kou removed the awaiting merge Awaiting merge label Sep 11, 2024
@github-actions github-actions bot added the awaiting merge Awaiting merge label Sep 11, 2024
Comment on lines 103 to +104
run: >
source ci/scripts/util_enable_core_dumps.sh
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, this breaks integration test.
(archery docker run ... isn't executed.)

@github-actions github-actions bot added awaiting changes Awaiting changes and removed awaiting merge Awaiting merge labels Sep 11, 2024
@pitrou pitrou deleted the minor-core-dumps branch September 11, 2024 06:41
Copy link

After merging your PR, Conbench analyzed the 4 benchmarking runs that have been run so far on merge-commit e710b6e.

There were no benchmark performance regressions. 🎉

The full Conbench report has more details. It also includes information about 5 possible false positives for unstable benchmarks that are known to sometimes produce them.

khwilson pushed a commit to khwilson/arrow that referenced this pull request Sep 14, 2024
…bs (apache#43937)

### Rationale for this change

In apache#43936 I noticed that core dumps were not written out for crashing C++ tests. One problem is that, by default, Ubuntu hosts pipe core dumps to `apport`, but it is not available inside containers. Another is that the `ulimit` must be set in the host, not in the container.

In addition, this PR restores automatic traceback generation when running C++ tests, on Linux and macOS jobs.

### Are these changes tested?

Manually by introducing a spurious segfault and running Docker containers.

### Are there any user-facing changes?

No.

Lead-authored-by: Antoine Pitrou <antoine@python.org>
Co-authored-by: Antoine Pitrou <pitrou@free.fr>
Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
@jonkeane
Copy link
Member

I'm seeing the following on the R binary builds, which looks related?

Run source ci/scripts/util_enable_core_dumps.sh
/home/runner/work/_temp/2d27be9c-4aea-4d03-913b-22fca3259dcb.sh: line 1: ci/scripts/util_enable_core_dumps.sh: No such file or directory

https://github.com/ursacomputing/crossbow/actions/runs/10808019175/job/29980088987

@kou
Copy link
Member

kou commented Sep 15, 2024

Oh, it should be arrow/ci/... not ci/.../....

@kou
Copy link
Member

kou commented Sep 15, 2024

GH-44128

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants