Repository navigation
Revert "Print file offsets in the bare fatal stack traces and build the release binary as PIE" - #119268
Revert "Print file offsets in the bare fatal stack traces and build the release binary as PIE"#119268Algunenano wants to merge 2 commits into
Conversation
This reverts commit a77884d, part of a revert of ClickHouse#117449 and its followup ClickHouse#119145. Co-Authored-By: Claude Sonnet 5 <[email protected]>
…he release binary as PIE" This reverts commit 30c0912, this is a revert of ClickHouse#117449 and its followup ClickHouse#119145. Co-Authored-By: Claude Sonnet 5 <[email protected]>
|
Workflow [PR], commit [99d1c94] AI ReviewSummaryThis PR reverts Missing context / blind spots
Findings
Final Verdict
|
| addrs.reserve(trace.size()); | ||
| for (auto * ptr : trace) | ||
| addrs.push_back(StackTrace::resolveAddressForStorage(ptr)); | ||
| addrs.push_back(reinterpret_cast<uintptr_t>(ptr)); |
There was a problem hiding this comment.
system.error_log is the persisted error-history surface, so storing raw Exception::Trace pointers here reintroduces the "address valid only in the process that threw" problem. addressToSymbol only decodes current-process virtual addresses or pre-normalized offsets (SymbolIndex::findSymbol converts only when findObject succeeds), so after a restart every shared-library frame, and all ClickHouse frames on PIE builds, stop symbolizing. Because this table has no trace_full companion, operators lose the only machine-readable stack trace for historical errors. Please keep resolveAddressForStorage or another restart-stable encoding on the stored column even if the executable itself goes back to non-PIE.
| { | ||
| writeChar(' ', bare_stacktrace); | ||
| writeResolvedAddress(stack_trace.getFramePointers()[i], bare_stacktrace); | ||
| writePointerHex(stack_trace.getFramePointers()[i], bare_stacktrace); |
There was a problem hiding this comment.
StackTrace::toStringEveryLine still formats ELF frames with frame.physical_addr, i.e. offsets inside the owning object, but this bare dump is back to logging raw runtime addresses. That puts the Stack trace: line in a different address space than the symbolized lines immediately below it, so the fallback is no longer directly comparable or suitable for addr2line on shared-library frames; on PIE builds the same applies to ClickHouse frames too. Since this bare dump is the thing we rely on when symbolization itself fails, reverting writeResolvedAddress looks like a real diagnostic regression.
|
Reverted in #119279 |
Related: #117449
Related: #119145
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Revert of #117449 ("Print file offsets in the bare fatal stack traces and build the release binary as PIE") and its followup #119145 ("Do not run
05076_error_trace_file_offsetson Darwin").🤖 Generated with Claude Code
Workflow [PR]
Sync PR [sync-upstream/pr/119268]