Repository navigation
CI: bump rss_limit_mb to 4096 for clickhouse_fuzzer to stop chronic OOMs at 2048 Mb default - #105134
Conversation
`clickhouse_fuzzer` runs the full `clickhouse-local` binary (see
`programs/local/fuzzers/clickhouse_fuzzer.cpp`) which spins up a complete
clickhouse-server-grade runtime: JeMalloc arenas, OpenSSL initializer,
static initializers, and full query execution. Baseline RSS is close to
the libFuzzer default `rss_limit_mb=2048`, so fuzzed inputs that trigger
even moderate query-time allocations push the process past the limit.
CIDB shows 7 unrelated PRs in 7 days all hitting OOM at 2049-2056 Mb —
just barely over the 2048 Mb default. Failure mode is uniform:
libFuzzer out-of-memory (used: 2049-2056Mb; limit: 2048Mb) oom-<hash>
Bumping to 4096 Mb follows existing precedent for fuzzers with similar
workloads:
- `execute_query_fuzzer.options`: rss_limit_mb = 4096 (also runs query
execution; same author bumped this in commit bafb7d7)
- `data_type_deserialization_fuzzer.options`: rss_limit_mb = 4096
- `create_parser_fuzzer.options`: rss_limit_mb = 6144
The limit still bounds the target (it does not disable the check via
`rss_limit_mb=0`), so genuine memory regressions above 4 GB will still
be caught.
CIDB evidence (last 30 days, all 10 hits — 0 on master because libFuzzer
does not run on master regularly):
PR ClickHouse#99740 (4 hits, Apr 19-21)
PR ClickHouse#104231, ClickHouse#104849, ClickHouse#104956, ClickHouse#96844, ClickHouse#104510, ClickHouse#104492 (1 hit each,
May 13-15)
Pre-PR validation gate (per TASK.md Phase 4 step 9)Session id: (a) Deterministic repro? Yes — the failure mode is a documented libFuzzer behavior: when target RSS exceeds (b) Root cause explained? Yes. (c) Fix matches root cause? Yes. The fix directly addresses the limit-vs-baseline mismatch by raising (d) Test intent preserved? Yes. The fuzzer still runs, still detects OOMs (anything above 4 GB), and the rss bound is still active. The change does not weaken what the fuzzer can catch — it removes the false-positive noise floor near baseline RSS. (e) Both directions demonstrated? The deterministic CI evidence (10 hits / 7 unrelated PRs / 30 days, all OOM at 2049-2056 Mb against 2048 Mb) demonstrates the failure without the fix. Verification with the fix will come from absence of OOM hits on subsequent CI runs after merge — I will follow up on CIDB and close the tracking task once we have ≥48h of clean libFuzzer runs. (f) Fix is general? Not applicable — this is a single-line CI configuration change in one |
|
cc @yakov-olkhovskiy @maxknv @alexey-milovidov — could you review this one-line fuzzer config change? It bumps |
|
Workflow [PR], commit [99394c6] Summary: ✅ AI ReviewSummaryThis PR raises Final VerdictStatus: ✅ Approve |
…c OOMs `create_parser_fuzzer` has been failing chronically with `libFuzzer out-of-memory` for weeks, with the actual usage sitting just above the hardcoded 6144 Mb limit. CIDB shows 55 OOM hits across 49 unrelated PRs in the last 30 days (peaking at 17 hits / 17 PRs on 2026-05-17 alone). The reported `used:` values cluster around 6221-7329 Mb (avg 6554 Mb, p95 7329 Mb, max 8830 Mb). 54 of 55 observed OOMs (98%) fall under 8192 Mb. The 6144 limit is essentially at the typical working-set mean for this fuzzer, so any input that triggers even moderate extra allocations during parsing trips the limit. Bump `rss_limit_mb` from 6144 to 8192 to match the chronic working set, following the same precedent as PR ClickHouse#105134 which bumped `clickhouse_fuzzer` from 2048 to 4096 for the same class of "just-barely-over-the-limit" chronic OOMs. The limit is still active (8 GB is not unlimited), so genuine large memory regressions above 8 GB will still be caught. Sibling change: PR ClickHouse#104922 (merged) bumped `select_parser_fuzzer` via `max_parser_backtracks`. This PR addresses the parallel `create_parser_fuzzer` family.
clickhouse_fuzzerruns the fullclickhouse-localbinary (seeprograms/local/fuzzers/clickhouse_fuzzer.cpp, which constructs aclickhouseMainthread on each fuzz iteration). That spins up a complete clickhouse-server-grade runtime: JeMalloc arenas, OpenSSL initialization, static initializers, full query execution machinery. Baseline RSS sits very close to the libFuzzer defaultrss_limit_mb=2048, so any fuzzed input that triggers even moderate query-time allocations pushes the process past the limit.CIDB shows the failure has been chronic and uniform across many unrelated PRs:
Last 30 days (all 10 hits — 0 on master because libFuzzer does not run regularly on master):
filesystem()honor the memory limit when loading file content #104956, Columns Cache #96844, Add SQLite input/output format #104510, Support PromQL count_values #104492 — 1 hit each (May 13-15, all unrelated authors / code areas)Every single failure is OOM at the 2048 Mb limit with actual usage just barely over (2049-2056 Mb). Hash-prefix of
oom-*samples varies (7a597,90c3e,32ab8,da39a,f33b9), confirming multiple distinct trigger inputs that all sit right at the boundary.Fix
Add
rss_limit_mb = 4096totests/fuzz/clickhouse_fuzzer.options, following the existing precedent for fuzzers with similar workloads:execute_query_fuzzer.optionsdata_type_deserialization_fuzzer.optionscreate_parser_fuzzer.optionsclickhouse_fuzzer.options(this PR)The limit still bounds the target (it does not disable the check via
rss_limit_mb=0), so genuine memory regressions above 4 GB will still be caught.Sample CIDB query used to gather the data:
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Bump libFuzzer
rss_limit_mbto 4096 forclickhouse_fuzzerto fix chronic OOMs at the 2048 Mb default. Matches the existing precedent ofexecute_query_fuzzerand other heavyweight fuzz targets.Documentation entry for user-facing changes
Version info
26.5.1.712