Repository navigation
fix(clickhouse): a schema read rejected by the server memory limit is not a finding - #35
Merged
fm4v merged 1 commit intoNov 25, 2026
Conversation
… not a finding When the server is above its total memory limit, it rejects every new request before authentication with `(total) memory limit exceeded` (Code 241, `attempt to allocate chunk of 0.00 B`, empty query id), even a trivial `SHOW TABLES`. The fuzzer already treats this error as expected for generated statements and for its setup commands, but not for the schema read that runs after every DDL statement. The raw SQLException from `ClickHouseSchema.fromConnection` became a finding and ended the worker thread for the rest of the run. Skip the iteration with IgnoreMeException when the schema read fails with an error from `ClickHouseErrors.isToleratedException`, like the other harness reads do, and rethrow anything else. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fm4v
approved these changes
Nov 25, 2026
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.
The 2026-11-25 master nightly (
SQLancer (arm_release), reproducer) reported this, and workerdatabase9was gone for the remaining 3h51m of the run (Threads shut down: 1):While its total memory is above the limit, the server rejects every new HTTP request at authentication (ClickHouse/ClickHouse#95003), hence
chunk of 0.00 Band the empty query id: the other workers' queries had pushed the server over,SHOW TABLESused nothing. The fuzzer already expects this error for generated statements (memory limit exceededinClickHouseErrors) and for its setup commands (runSetupCommandsWithTolerance), but not for the schema read after each DDL statement, so the rawSQLExceptionbecame a finding and ended the worker.Now
readSchema()throwsIgnoreMeExceptionfor an error thatClickHouseErrors.isToleratedExceptionaccepts, as the oracles' own bookkeeping reads already do, and rethrows anything else. The worker moves on to a fresh database.Checked:
mvn verify -DskipTests=true -Djacoco.skip=truepasses. Against master1c87825f446d(debug build,.claude/clickhouse-config/overrides), 10 threads, 10 min per run, before and after on one server:max_server_memory_usage_to_ram_ratio),--num-queries 50,TLPWhere,NoRECSHOW TABLES,DESCRIBE), 9 of 10 workers deadCANNOT_CONVERT_TYPEmutation finding, also seen before)Related: ClickHouse/ClickHouse#128538
🤖 Generated with Claude Code
Note
Low Risk
Single try/catch around schema introspection; only redirects already-whitelisted ClickHouse errors to the existing ignore path.
Overview
Schema reads after DDL now treat server-side errors that are already on ClickHouse’s tolerated list (e.g. memory limit exceeded when the server is over RAM and rejects
SHOW TABLES) asIgnoreMeException, so the worker skips the database instead of reporting a finding and shutting down.Anything not accepted by
ClickHouseErrors.isToleratedExceptionis still rethrown unchanged. This matches how generated statements, setup commands, and oracle bookkeeping already handle the same failures.Reviewed by Cursor Bugbot for commit 3233257. Bugbot is set up for automated code reviews on this repo. Configure here.