XTaskQueue: terminating a composite queue cancels another queue's pending callback #243
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/fxceless--victory-fork#243
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@Bennet0k on GitHub · 2026-11-24 22:59 UTC · original
Source
Reproduction. Create a manual base queue and a composite queue using the base ports. Enqueue one immediate callback on each. Terminate the composite queue, then dispatch the base queue. Running the queue logic from
2119b0ereturnedcanceled=truefor both callbacks and no work from base dispatch. The base callback should remain queued and run withcanceled=false, following the independent queue lifetimes documented by Microsoft.Proposed fix. Store the submitting queue identity on each pending callback and cancel only callbacks owned by the terminating queue. Retain others in FIFO order and invoke cancellation callbacks outside the port lock. Add a manual-queue regression with the above sequence. #198 covers callbacks that are still delayed. This case uses callbacks already present in the shared port.
Found in an AI-assisted audit of
2119b0e.@avt0m4t48 on GitHub · 2026-11-24 23:42 UTC · original
Independent public-API tests on exact heads
98e608b8(#296) and843eff1b(#324) confirm that both preserve sibling FIFO when terminating a composite queue, including delayed callbacks already on the port. Both checks failed on main2119b0e.A separate dispatch-time case persists on all three. While terminate is canceling its work port, the queue is already marked terminated. If a manual reentrant dispatch or the serialized worker dequeues an owned completion in that interval, it passes
canceled=false. The sibling's completion correctly getsfalse. Both invocation paths currently supply a hard-coded flag. Five public API probe outcomes on #296 repeated 25 times in the source-built Linux harness. Fork source · libHttpClient referenceThis finding is for callbacks dequeued after termination was marked. A still-sleeping delayed callback is the separate #198 path. Native Windows execution was outside this check.