Repository navigation
Don't crash the hung check on non-UTF-8 bytes in the processlist - #113370
Conversation
Under the AST fuzzer, query texts in `system.processes` can contain invalid UTF-8 sequences (e.g. fuzzed `KILL QUERY WHERE query_id = ...` texts). The hung check then died with `UnicodeDecodeError` in `print(processlist.decode())` instead of reporting the hung queries. Decode with `errors="replace"`. Seen in https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=106231&sha=e3b33b9fc008f1106279548b4d593e74c237f5c0&name_0=PR&name_1=Stress%20test%20%28amd_tsan%29
|
Workflow [PR], commit [88c005f] Summary: ✅ AI ReviewSummaryThis PR makes the hung-query diagnostics in Final Verdict✅ No blocking or major issues found. |
|
🕵 Merged
Note that the |
|
🕵 Merged |
Build profile diff (arm_release)Comparing ✅ No significant changes. Binary sizes
Only the stripped binary is compared: the official master build keeps debug symbols while PR builds strip them, so the other binaries differ by construction. Compile time of recompiled translation units11 translation units recompiled, 65 s compile time in total, 11 of them have a recent master baseline. Median compile-time ratio to the baselines is ×1.08 (machine-speed difference or a change affecting every TU); per-TU deltas below are relative to that ratio. |
|
Classic Python problem. Python is a bad programming language. |
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
The stateless-test hung check no longer crashes with
UnicodeDecodeErrorwhen the processlist contains non-UTF-8 bytes; it reports the hung queries instead.Under the AST fuzzer, query texts in
system.processescan contain invalid UTF-8 sequences (for example fuzzedKILL QUERY WHERE query_id = ...texts). When the hung check found hung queries,print(processlist.decode())intests/clickhouse-testraisedUnicodeDecodeErrorand the report showed a Python traceback instead of the processlist with stack traces, hiding the actual diagnostics. Decode witherrors="replace"so the report always comes through.Seen in a
Stress test (amd_tsan)run: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=106231&sha=e3b33b9fc008f1106279548b4d593e74c237f5c0&name_0=PR&name_1=Stress%20test%20%28amd_tsan%29 (the underlying hang there is unrelated — aDatabaseFilesystemmutex convoy, fix open as #112495).Version info
26.8.1.1008(included in26.8and later)