Repository navigation
Fix ThreadStatus destructor chassert in functions stress test - #105410
Merged
Algunenano merged 1 commit intoMay 20, 2026
Merged
Algunenano merged 1 commit into
Algunenano merged 1 commit into
Conversation
…s test
`FunctionsStressTestThread::run` calls `context->setCurrentQueryId("")`
on every iteration but never refreshes `ThreadStatus::query_id`. When
the destructor's `(no ctx && empty id) || (ctx && id matches)` check
became a `chassert` (PR ClickHouse#105256), every worker tripped it.
Detach from the thread group right before `thread_status.reset()` so
the destructor sees the cleared state.
CI report: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=105256&sha=a24f314f927ad5c12e928028e20be8d32d10b302&name_0=PR&name_1=Unit%20tests%20%28tsan%2C%20function_prop_fuzzer%29
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Contributor
|
Workflow [PR], commit [04db661] Summary: ❌
AI ReviewSummaryThis PR fixes a Final Verdict
|
Contributor
LLVM Coverage Report
Changed lines: 0.00% (0/2) · Uncovered code |
antaljanosbenjamin
approved these changes
May 20, 2026
Merged
via the queue into
ClickHouse:master
with commit May 20, 2026
9cb683d
161 of 166 checks passed
DavidHe-2008
pushed a commit
to DavidHe-2008/ClickHouse
that referenced
this pull request
Jun 1, 2026
…ress-thread-status-detach Fix ThreadStatus destructor chassert in functions stress test
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
FunctionsStressunit test trips~ThreadStatus's assertion because each iteration callscontext->setCurrentQueryId("")without refreshingThreadStatus::query_id. Detaching the thread group before destroying theThreadStatusclears bothquery_idandquery_context, so the destructor's id-vs-context invariant holds.Surfaced by #105256 (converting
asserttochassert).CI report: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=105256&sha=a24f314f927ad5c12e928028e20be8d32d10b302&name_0=PR&name_1=Unit%20tests%20%28tsan%2C%20function_prop_fuzzer%29
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Fix assertion failure in
FunctionsStressunit test.Version info
26.5.1.900