Skip to content

La Casa Del Dolor: do not symbolize trace_log in-flush on sanitizer builds - #129036

Merged
PedroTadim merged 1 commit into
ClickHouse:masterfrom
groeneai:casa-dolor-trace-log-no-symbolize
Nov 3, 2026
Merged

PedroTadim merged 1 commit into
ClickHouse:masterfrom
groeneai:casa-dolor-trace-log-no-symbolize

Conversation

@groeneai

@groeneai groeneai commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

Related: #100242

Changelog category (leave one):

  • CI Fix or Improvement (changelog entry is not required)

Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):

...

Description

Failure. La Casa Del Dolor (amd_tsan) on master 716b2737 reported Server shutdown: Server node0 did not shut down gracefully and had to be force killed. At the kill, the main thread was in SystemLogQueue<TraceLogElement>::waitFlush and the trace_log thread in TraceLogElement::appendToBlock -> AddressToLineCache -> Dwarf::findAddress.

Root cause. The dolor server config defines <trace_log> without symbolize, so the default true applies on every flavour. On sanitizer builds, resolving every frame of every queued row in the final flush can take longer than what is left of stop_clickhouse's 30 s window after shutdown_wait_unfinished. The stateless and stress jobs avoid this with tests/config/config.d/trace_log_no_symbolize.xml (#100242), but dolor.py builds its own config.d and never added it.

Change. Add that file to every node's main_configs when CLICKHOUSE_IS_SANITIZED=1 (amd_tsan, amd_msan, arm_asan_ubsan). Rows are still collected and can be symbolized on read; nothing in La Casa reads symbols or lines. amd_debug is unchanged.

Validation. Measured on the CI amd_tsan binary of 716b273, replaying that run's BuzzHouse statements, 2 runs per arm:

  • without the file, a final flush of ~130k rows took 34.8-36.8 s (97% of it in appendToBlock), and SIGTERM to exit took 38-44 s;
  • with the file, the flush took 2.0-2.6 s and the exit 8-15 s.

This is not the compact-symbols slowdown of release builds: La Casa's builds keep .symtab.

🤖 Generated with Claude Code


Workflow [PR]
Sync PR [sync-upstream/pr/129036]

Version info

  • Merged into: 26.11.1.1257-master (included in 26.11 and later)

…uilds

On sanitizer builds the final system.trace_log flush at shutdown resolves
every frame of every queued row (SymbolIndex::findSymbol, tryDemangle,
AddressToLineCache) and can outlast the harness's 30 s stop window. The
server is then force killed and the run reports "Server shutdown"
(La Casa Del Dolor (amd_tsan), master 716b273: the main thread was in
SystemLogQueue<TraceLogElement>::waitFlush, the trace_log thread in
TraceLogElement::appendToBlock -> AddressToLineCache -> Dwarf::findAddress).

The stateless and stress jobs already avoid this with
tests/config/config.d/trace_log_no_symbolize.xml, which
tests/config/install.sh installs for sanitizer and coverage builds.
dolor.py builds its own config.d and never added it. Add it to every
node's main_configs when CLICKHOUSE_IS_SANITIZED=1 (set by
lacasadeldolor_job.py for amd_msan, amd_tsan and arm_asan_ubsan). Rows are
still collected; symbols can be resolved on read with
addressToSymbol/addressToLine, and no La Casa check reads
trace_log.symbols or trace_log.lines. amd_debug keeps symbolizing.

Measured on the CI amd_tsan binary of 716b273, replaying the failing
run's BuzzHouse statements, final flush of 127k-140k rows, two runs per arm:
- without the file: 34.8 s and 36.8 s (Block = 33.8 s and 35.7 s),
  SIGTERM to exit 38.3 s and 44.3 s;
- with the file: 2.0 s and 2.6 s, SIGTERM to exit 8.1 s and 15.1 s,
  and system.trace_log.symbols is empty.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@groeneai

groeneai commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator Author
Internal second-model review: 0 blocking findings (Gate B 0 findings; own review 2 nits)
Finding Verdict
💡 Sanitizer La Casa runs no longer exercise the symbolize=true branch of TraceLogElement::appendToBlock. Agreed, noted, not blocking: same trade-off as the stateless/stress sanitizer jobs (tests/config/install.sh), and amd_debug keeps the branch.
💡 Rows of the Instrumentation trace type are symbolized regardless of the setting. Agreed, noted, not blocking: BuzzHouse issues no SYSTEM INSTRUMENT, so La Casa produces no such rows.

@clickhouse-gh

clickhouse-gh Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [566f95e]

Summary: ✅


AI Review

Summary

This PR applies the existing trace_log_no_symbolize.xml configuration to every La Casa Del Dolor node when CLICKHOUSE_IS_SANITIZED=1, reducing shutdown time spent symbolizing system.trace_log. No actionable findings in head 566f95e804c0119a2946173b7c6ea57625761625; the reported before/after replay measurements support this focused CI fix.

Missing context / blind spots
  • ⚠️ Fresh sanitizer La Casa CI results were pending at review time. Passing runs would confirm the complete harness behavior; the author's workload replay measurements were not independently reproduced.
Final Verdict

Status: ✅ Approve

@clickhouse-gh clickhouse-gh Bot added the pr-ci label Nov 3, 2026
@PedroTadim PedroTadim self-assigned this Nov 3, 2026
@PedroTadim PedroTadim added the can be tested Allows running workflows for external contributors label Nov 3, 2026
@groeneai

groeneai commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator Author

cc @leshikus, could you review this and add the can be tested label so CI runs? On sanitizer builds the final system.trace_log flush of La Casa Del Dolor symbolizes every queued frame and outlasts the 30 s stop window, so the server is force killed; this applies the existing trace_log_no_symbolize.xml (already used by the stateless and stress jobs) to the dolor nodes when CLICKHOUSE_IS_SANITIZED=1.

@PedroTadim

Copy link
Copy Markdown
Member

@groeneai you should always tag me for La Casa Del Dolor CI failures

@groeneai

groeneai commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator Author

Noted. From now on I'll tag you on every La Casa Del Dolor CI failure I work on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

can be tested Allows running workflows for external contributors comp-testing Test content only (no production code). pr-ci pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants