Repository navigation
Add a regression test for static-build backtrace crash (#53) - #67
Merged
Merged
Conversation
Regression test for #53: with the static archive linked, a failing engine query followed by std::backtrace::Backtrace::force_capture and a caught panic crashed with SIGSEGV, because the bundled libunwind took over Rust's unwinder. bundled_runtime_hidden checks the archive for that cause; this runs the case a user hits, isolated like the other runtime cases so a crash cannot hide their results. Taken from #64, where it was opt-in because the engine pinned then predated the fix. The current pin carries it, so the case now runs in every static build. Measured on Linux x86_64: it crashes with SIGSEGV against v26.7.3 and passes against v26.11.0-rc.2.
ShawnChen-Sirius
approved these changes
Nov 11, 2026
ShawnChen-Sirius
left a comment
Contributor
There was a problem hiding this comment.
LGTM, approve to merge.
Contributor
|
LGTM, approved and merged. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the regression test for #53 (a static build crashed when Rust captured a backtrace) to
tests/runtime_faces.rs. The test comes from #64, which was closed as superseded; this PR carries over that one test and nothing else.What the test does
In a static build, the new runtime case
host_backtrace_and_panic:std::backtrace::Backtrace,Like the other runtime cases, it runs in a child process, so a crash shows up as a failed case instead of taking down the whole suite.
bundled_runtime_hiddenalready checks the archive for the cause of #53; this test checks the symptom a user actually hits.Change from #64
In #64 the case only ran when
CHDB_CHECK_HOST_UNWINDwas set, because the engine pinned at the time did not have the fix yet. The current pin (v26.11.0-rc.2) has it (on Linux, the prelinked archive from chdb-core#261), so this PR runs the case in every static build and drops the variable. An opt-in test would never run in CI.Verification (Linux x86_64)
cargo test --features static --test runtime_facesagainst v26.11.0-rc.2: 17/17 runtime cases pass, includinghost_backtrace_and_panic.CHDB_ENGINE_VERSION=v26.7.3, an engine from before the fix:host_backtrace_and_paniccrashes with SIGSEGV, which is Static linking breaks backtrace #53. So the test detects the bug.cargo test --test runtime_facespasses (16 cases; this case is static-only), andcargo fmt --checkandcargo clippy --all-targets -- --deny warningspass.macOS and Linux aarch64 are covered by the static CI jobs on this PR. I did not run them locally.
Note
Add static-build regression test for host backtrace and panic
host_backtrace_and_panicto tests/runtime_faces.rs, gated by thestaticfeature, to guard against the crash tracked in Static linking breaks backtrace #53. The test disables engine signal handlers, runs a query against a missing table, and confirms it returns an error.casesregistry with a comment distinguishing it from the archive inspection done bybundled_runtime_hidden.Macroscope summarized 2b1e92c.