From 3233257cd04f38f3bd66735f8a00ec9eb141f470 Mon Sep 17 00:00:00 2001 From: Groene AI <270696204+groeneai@users.noreply.github.com> Date: Wed, 25 Nov 2026 13:52:51 +0000 Subject: [PATCH] fix(clickhouse): a schema read rejected by the server memory limit is 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 --- src/sqlancer/clickhouse/ClickHouseProvider.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/sqlancer/clickhouse/ClickHouseProvider.java b/src/sqlancer/clickhouse/ClickHouseProvider.java index e4afe70de..60faff392 100644 --- a/src/sqlancer/clickhouse/ClickHouseProvider.java +++ b/src/sqlancer/clickhouse/ClickHouseProvider.java @@ -108,7 +108,14 @@ public String getDatabaseName() { @Override protected ClickHouseSchema readSchema() throws SQLException { - return ClickHouseSchema.fromConnection(getConnection(), getDatabaseName()); + try { + return ClickHouseSchema.fromConnection(getConnection(), getDatabaseName()); + } catch (SQLException e) { + if (ClickHouseErrors.isToleratedException(e)) { + throw new IgnoreMeException(); + } + throw e; + } } }