This is an automated email from the ASF dual-hosted git repository.
lxy-9602 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/paimon-cpp.git
The following commit(s) were added to refs/heads/main by this push:
new 56658cff ci: print core dump backtraces (#312)
56658cff is described below
commit 56658cff4ee6f67f57ba79ff942bee0532922c65
Author: Zhang Jiawei <[email protected]>
AuthorDate: Thu Sep 10 15:25:00 2026 +0800
ci: print core dump backtraces (#312)
---
.github/workflows/build_and_test.yaml | 14 ++++++++------
build_support/run-test.sh | 9 +++++----
src/paimon/common/utils/status_test.cpp | 12 ------------
3 files changed, 13 insertions(+), 22 deletions(-)
diff --git a/.github/workflows/build_and_test.yaml
b/.github/workflows/build_and_test.yaml
index 0c8baf82..e31bebf2 100644
--- a/.github/workflows/build_and_test.yaml
+++ b/.github/workflows/build_and_test.yaml
@@ -109,19 +109,21 @@ jobs:
- name: Install Rust toolchain (Mosaic and tantivy-fts)
shell: bash
run: ci/scripts/setup_rust.sh
- - name: Install HTTP and TLS development dependencies
+ - name: Install build and debugging dependencies
run: |
sudo apt-get update
- sudo apt-get install -y libcurl4-openssl-dev libssl-dev
+ sudo apt-get install -y gdb libcurl4-openssl-dev libssl-dev
- name: Build Paimon
shell: bash
env:
CC: ${{ matrix.cc || 'clang' }}
CXX: ${{ matrix.cxx || 'clang++' }}
- run: >-
- ci/scripts/build_paimon.sh
- --source_dir "$(pwd)"
- ${{ matrix.build_args }}
+ run: |
+ sudo sysctl -w kernel.core_pattern='core.%e.%p'
+ ulimit -c unlimited
+ ci/scripts/build_paimon.sh \
+ --source_dir "$(pwd)" \
+ ${{ matrix.build_args }}
- name: Show ccache statistics
if: always()
run: ccache -s
diff --git a/build_support/run-test.sh b/build_support/run-test.sh
index 0656940f..743517c0 100755
--- a/build_support/run-test.sh
+++ b/build_support/run-test.sh
@@ -78,16 +78,17 @@ function setup_sanitizers() {
TSAN_OPTIONS="$TSAN_OPTIONS detect_deadlocks=0"
TSAN_OPTIONS="$TSAN_OPTIONS
suppressions=$ROOT/build_support/tsan-suppressions.txt"
TSAN_OPTIONS="$TSAN_OPTIONS history_size=7"
+ TSAN_OPTIONS="$TSAN_OPTIONS disable_coredump=0"
+ TSAN_OPTIONS="$TSAN_OPTIONS abort_on_error=1"
export TSAN_OPTIONS
UBSAN_OPTIONS="$UBSAN_OPTIONS print_stacktrace=1"
UBSAN_OPTIONS="$UBSAN_OPTIONS
suppressions=$ROOT/build_support/ubsan-suppressions.txt"
export UBSAN_OPTIONS
- # Enable leak detection even under LLVM 3.4, where it was disabled by
default.
- # This flag only takes effect when running an ASAN build.
- # ASAN_OPTIONS="$ASAN_OPTIONS detect_leaks=1"
- # export ASAN_OPTIONS
+ ASAN_OPTIONS="$ASAN_OPTIONS disable_coredump=0"
+ ASAN_OPTIONS="$ASAN_OPTIONS abort_on_error=1"
+ export ASAN_OPTIONS
# Set up suppressions for LeakSanitizer
LSAN_OPTIONS="$LSAN_OPTIONS
suppressions=$ROOT/build_support/lsan-suppressions.txt"
diff --git a/src/paimon/common/utils/status_test.cpp
b/src/paimon/common/utils/status_test.cpp
index cd9b60fe..9c9e6b74 100644
--- a/src/paimon/common/utils/status_test.cpp
+++ b/src/paimon/common/utils/status_test.cpp
@@ -99,18 +99,6 @@ TEST(StatusTest, TestCodeAsString) {
ASSERT_EQ("OK", Status::OK().CodeAsString());
}
-TEST(StatusDeathTest, TestAbort) {
- // Death tests fork(); with the default "fast" style, forking in a
multi-threaded
- // process is unsafe and under ThreadSanitizer the child aborts with a
sanitizer
- // message before Abort() runs. The "threadsafe" style re-execs the test
binary in
- // a clean process so Abort()'s own output is produced and can be matched.
- const std::string prev_style = testing::GTEST_FLAG(death_test_style);
- testing::GTEST_FLAG(death_test_style) = "threadsafe";
- ASSERT_DEATH(Status::IOError("boom").Abort(), "Paimon Fatal Error");
- ASSERT_DEATH(Status::IOError("boom").Abort("custom prefix"), "custom
prefix");
- testing::GTEST_FLAG(death_test_style) = prev_style;
-}
-
TEST(StatusTest, TestWithDetail) {
Status status(StatusCode::IOError, "summary");
auto detail = std::make_shared<TestStatusDetail>();