Revert "Multistage distributed queries" (#106020) — fixes ASan heap corruption on master - #107122
Merged
Merged
Conversation
…an task deserialization" This reverts commit d260520.
…stage-distributed # Conflicts: # programs/server/Server.cpp # src/Server/DistributedQuery/ExchangeServer.cpp # src/Server/StatelessWorker/StatelessTaskExecutor.cpp # src/Server/StatelessWorker/StatelessTaskExecutor.h # src/Server/StatelessWorker/StatelessWorkerEndpoint.cpp # src/Server/StatelessWorker/StatelessWorkerEndpoint.h
Contributor
This was referenced Jun 11, 2026
30 tasks
This was referenced Jun 11, 2026
1 task
This was referenced Jun 12, 2026
Closed
Accessing tables as files, query construction and out-of-band modification in HTTP interface
#105249
Open
This was referenced Jun 12, 2026
1 task
This was referenced Jun 13, 2026
groeneai
added a commit
to groeneai/ClickHouse
that referenced
this pull request
Jun 17, 2026
…ted queries) and ClickHouse#107056 The prior CI run executed on a merge-base ~980 commits behind these fixes, so it inherited the master-wide ASan heap corruption from ClickHouse#106020 (segfaults during String serialization in DistributedSink / MergeTask / MergeMutate, STIDs 1288-3bd5, 2046-50c3, 0988-1d81) plus the known-flaky 02865_tcp_proxy_query_packet_validation. Both are fixed on current master. No conflicts; CREATE OR REPLACE size-check changes are unaffected. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
This reverts the "multistage distributed queries" feature (#106020) and its dependent follow-ups, because it destabilized
master: sanitizer builds started aborting with internal Address Sanitizer allocatorCHECKfailures (heap corruption).Motivation
On 2026-06-10,
Stateless testson sanitizer builds began failing en masse withServer diedand:This is generic heap corruption detected by Address Sanitizer on
free/memcpy— the reported stack is incidental and varies across unrelated code paths (ColumnString/ColumnVectordestructors,WriteBufferbuffers,ActionsDAG,re2,Arena, MergeTree part removal, etc.), on bothamdandarm.The trigger is the
thread_pool_trim.xmlconfig introduced by the follow-up #106978 ("Shrink idle thread pools of the distributed query infrastructure"), installed for sanitizer builds, which lowersmax_thread_pool_free_sizefrom 1000 to 128. With the default of 1000 the global pool never shrank in tests; at 128 idle threads are actively destroyed, exposing a thread-teardown use-after-free in the distributed-query infrastructure as broad heap corruption. The first pure-masterrun to fail is the merge commit of #106978, and thesecondary.hCHECK(now surfaced by the log-parser change in #106848) appears only after it.Since #106978 and the fix "Fix logical error when table is dropped before distributed plan task deserialization" depend on #106020, they are reverted together. The result is byte-identical to the pre-#106020 state for all touched files (except
programs/server/Server.cpp, which retains unrelated later changes).CI report: https://s3.amazonaws.com/clickhouse-test-reports/json.html?REF=master&sha=b825a23a5cb63137a94dc0971fd4cf1ef73f789b&name_0=MasterCI&name_1=Stateless%20tests%20%28arm_asan_ubsan%2C%20azure%2C%20sequential%29
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
Documentation entry for user-facing changes
Version info
26.6.1.620