Search before asking
Motivation
build_support/run-test.sh can use a core dump to print an all-thread backtrace after a native test crash, but the Build and Test workflow does not enable core dump generation or install GDB. LLVM sanitizers also disable core dumps by default on 64-bit platforms.
As a result, CI may only report (core dumped) without printing the stack that caused the crash, making intermittent native test failures difficult to diagnose from the job log.
Solution
- Install GDB in the Linux build-and-test matrix.
- Set
kernel.core_pattern=core.%e.%p and raise RLIMIT_CORE in the same shell that runs the tests.
- Configure ASan and TSan to enable core dumps and abort when reporting an error.
- Keep using GDB to print all-thread backtraces when
run-test.sh finds a core, then delete the core during test cleanup.
- Remove the
Status::Abort() death test so successful test runs do not intentionally create core dumps.
Core dumps and matching binaries are not retained or uploaded as artifacts.
Anything else?
The implementation is available in #312. The behavior was verified once with a temporary program that called abort(); the CI log contains the real GDB backtrace. The temporary crash test was removed after validation so regular CI runs do not intentionally generate a core dump.
Are you willing to submit a PR?
Search before asking
Motivation
build_support/run-test.shcan use a core dump to print an all-thread backtrace after a native test crash, but the Build and Test workflow does not enable core dump generation or install GDB. LLVM sanitizers also disable core dumps by default on 64-bit platforms.As a result, CI may only report
(core dumped)without printing the stack that caused the crash, making intermittent native test failures difficult to diagnose from the job log.Solution
kernel.core_pattern=core.%e.%pand raiseRLIMIT_COREin the same shell that runs the tests.run-test.shfinds a core, then delete the core during test cleanup.Status::Abort()death test so successful test runs do not intentionally create core dumps.Core dumps and matching binaries are not retained or uploaded as artifacts.
Anything else?
The implementation is available in #312. The behavior was verified once with a temporary program that called
abort(); the CI log contains the real GDB backtrace. The temporary crash test was removed after validation so regular CI runs do not intentionally generate a core dump.Are you willing to submit a PR?