Repository navigation
AST fuzzer: install core_dump.yaml so cores are not capped at 1 GiB - #113991
Conversation
Cores uploaded by AST fuzzer (*) are truncated, so the server death a core was collected for cannot be root-caused. Measured on core.QueryPipelineEx.126-2991 from AST fuzzer (arm_asan_ubsan) on ClickHouse#100371: 8358039552 bytes present against 46038720512 declared by the core's own program headers (18.2%), with 1694 of 1740 data-carrying PT_LOAD segments entirely past EOF, including the faulting thread's stack. All 4 occurrences in the last 30 days are truncated. Not a download or decrypt artifact: the zstd frame verifies and declares the short size, and the S3 Content-Length matches the bytes fetched, so the kernel never wrote the tail. 41df483 centralized the CI RLIMIT_CORE override into tests/config/config.d/core_dump.yaml and deleted this script's inline core.xml (100 GiB), but never added the new file to configure()'s copy list. The fuzzer does not run tests/config/install.sh, and the <core_dump> block in programs/server/config.xml ships commented out, so nothing installs it and Server.cpp's 1 GiB default applies. The setrlimit succeeds; the value is just wrong. A 1 GiB cap still yields a multi-GiB file because RLIMIT_CORE bounds emitted bytes while seeks over absent pages advance the offset for free, which is exactly the shape of an ASAN address space. Reproduced locally: at a fixed 1 GiB cap, logical sizes of 9.0 GiB and 33.0 GiB with written bytes pinned at about 1073741824, so one fixed cap explains four different non-round observed sizes. 534b8fa fixed the same defect, with the same symptom description, for the jobs that do run install.sh. The AST fuzzer was missed because it hand-copies configs. Use the centralized file rather than restoring the inline XML, so this completes that centralization instead of reverting it. Verified by asserting the effective limit on the server process while replaying the shipped configure() copy list: Max core file size is 1073741824 before this change and 107374182400 after, with no "Cannot set max size of core file" warning in either case. 41df483 also deleted sysctl kernel.core_pattern='core.%e.%p-%P' and nothing sets it now. The observed core names still match that pattern only because the container is privileged and the sysctl is host-global. That is left out of this change. Related: ClickHouse#113835
The fuzzer jobs' digest_config.include_paths is the only way praktika learns what a job reads. Without the new file listed, a later change to the centralized 100 GiB limit does not move the jobs' digest, so the run can be served from cache and the change never reaches the fuzzer. The per-file form keeps the blast radius at one file rather than rebuilding these jobs on every commit that touches tests/config, following ./tests/config/users.d/ci_logs_sender.yaml which the ClickBench job lists for the same reason.
Internal second-model review (3 gate rounds + 2 cold reviews, 1 fix round; 3 AGREE / 1 DISAGREE / 5 nits)Each round is an independent cold review of the resulting code plus a separate second-model pass. Round 1 (0 blockers, 2 majors, 4 nits)
Round 2 (0 blockers, 2 majors, 0 nits): the two majors above, restated. The digest one came Round 3 (0 findings): full re-review after the digest fix, against the final description. My own cold review of the final tree re-derived the root cause from source before reading any of Also checked and found benign: #111934 edits this same script but not |
Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-review-slot-9:20260808-221400 |
|
cc @Algunenano, could you review this? It is the same defect you fixed in 534b8fa, on the one path that does not run |
|
Workflow [PR], commit [f5f77c2] Summary: ✅ AI ReviewSummaryThis PR wires Final VerdictNo new inline findings. |
CI finish ledger - f5f77c2CI is fully finished and clean on this head: 175 check-runs, 0 queued/in_progress,
The high skip count is the expected job selection for this diff, not a dropped run: the change Session id: cron:our-pr-ci-monitor:20260809-090000 |
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
Description
Related: #113835
Cores uploaded by
AST fuzzer (*)are truncated, so the server death a core was collected for cannot be root-caused. Measured oncore.QueryPipelineEx.126-2991from AST fuzzer (arm_asan_ubsan) on #100371: 8358039552 bytes present against 46038720512 declared by the core's own program headers (18.2%), with 1694 of 1740 data-carryingPT_LOADsegments entirely past EOF. All 4arm_asan_ubsanoccurrences in the last 30 days are truncated.Root cause:
41df48368639d6ccentralized the CIRLIMIT_COREoverride intotests/config/config.d/core_dump.yamland deleted this script's inlinecore.xml(100 GiB), but never added the new file toconfigure()'s copy list. The fuzzer does not runtests/config/install.sh, so nothing installs it andServer.cpp's 1 GiB default applies.A 1 GiB cap yields a multi-GiB file because
RLIMIT_COREbounds emitted bytes while seeks over absent pages advance the offset for free, which is exactly an ASAN address space. I reproduced that shape locally: at a fixed 1 GiB cap, logical sizes of 9.0 GiB and 33.0 GiB with written bytes pinned at ~1073741824, so one fixed cap explains four different non-round observed sizes.534b8fab3a59f7abfixed the same defect, with the same symptom description, for jobs that do runinstall.sh. The AST fuzzer was missed because it hand-copies configs.Validated by asserting the effective limit on the server process, replaying the shipped
configure()copy list:Max core file sizeis 1073741824 atHEADand 107374182400 with this change.Two notes. The next genuine fuzzer core is the first end-to-end confirmation; the cap is proven sufficient to explain the cores I measured, not yet observed absent. Separately,
41df48368639d6calso deletedsysctl kernel.core_pattern='core.%e.%p-%P'and nothing sets it now; the observed names still match only because the container is privileged and the sysctl is host-global. I am leaving that out of this change.Version info
26.8.1.1026(included in26.8and later)