Repository navigation
Cherry-pick delta-io/delta-kernel-rs#3202 onto v0.23.0: avoid tokio blocking pool handoff deadlock - #19
Merged
alexey-milovidov merged 1 commit intoNov 8, 2026
Conversation
Cherry-pick of delta-io#3202 onto ClickHouse/v0.23.0. The file lives at kernel/src/engine/default/executor.rs on this branch; the change is otherwise identical. (cherry picked from commit b69ebcf)
|
|
alexey-milovidov
merged commit Nov 8, 2026
86762ee
into
ClickHouse:ClickHouse/v0.23.0
9 of 26 checks passed
middas-0706
pushed a commit
to middas-0706/ClickHouse
that referenced
this pull request
Nov 12, 2026
…wned delta-kernel's `block_on` handed the task result back through `tokio::task::spawn_blocking`. When the process could not create a thread, that call panicked after queueing the closure that owns the result sender, so the sender was never dropped and the caller's `recv()` waited forever (the query ignored KILL QUERY). The fix sends the result directly from the async task. The new pin is the merge commit of ClickHouse/delta-kernel-rs#19, a cherry-pick of delta-io/delta-kernel-rs#3202 onto `ClickHouse/v0.23.0`. It changes only `kernel/src/engine/default/executor.rs`; no Cargo manifest or lock change. Closes ClickHouse#128033 Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
Cherry-pick of delta-io#3202 ("fix: avoid tokio blocking pool handoff deadlock") onto
ClickHouse/v0.23.0, the branch ClickHouse master pins (88ff5a94).TokioBackgroundExecutor::block_onandTokioMultiThreadExecutor::block_onhand the task's result back throughtokio::task::spawn_blocking. When that thread cannot be spawned, tokio panics and the closure holding thestd::sync::mpsc::Senderstays queued, so the caller'srecv()waits forever. In ClickHouse this left aDDLWorkerblocked in a DeltaLakeCREATE TABLEfor 26 hours after the server hit its pod PID limit (ClickHouse/ClickHouse#128033). The upstream fix sends the result directly from the async task (Sender::sendnever waits).The change is identical to upstream; only the path differs (
kernel/src/engine/default/executor.rson this branch). It includes the upstream regression testtest_owned_runtime_small_blocking_pool_completes_many_block_on_calls, which replaces the test that asserted the deadlock.Testing
The crate's own lib tests do not compile on this branch, independently of this change (
kernel/src/parallel/parallel_phase.rs:visit_scan_filescallbacks return()whereboolis expected). So I ran the upstream regression scenario from a separate crate that depends on this branch'sdelta_kernel(default-engine-rustls,arrow):The scenario is upstream's: a multi-thread runtime with
max_blocking_threads(1), eightspawn_blockingtasks each callingblock_on, and the results collected with a timeout. A 20 s watchdog ends the process, because without the fix the outerblock_on's own handoff is stranded as well and itsrecv()has no timeout.delta_kernelClickHouse/v0.23.0(88ff5a94)094210b5)For the 26.3 line see the companion PR against
ClickHouse/v0.19.2-with-panic-safe-ffi: #20