Repository navigation
XGameRuntime: drain active task queue monitors on unregister - #2836
Closed
CryingLaughing wants to merge 1 commit into
Closed
CryingLaughing wants to merge 1 commit into
CryingLaughing wants to merge 1 commit into
Conversation
A notification snapshot can outlive removal from the queue registry. Revoke each registration before waiting, keep it discoverable until its active calls finish, and skip revoked entries in older snapshots. Keep callback-stack unregistration nonblocking so existing monitor callbacks can unregister safely.
|
Independent NVIDIA Windows verification and concurrency review of PR #2836 at exact head Tested
Regression run & PR checks
Code review & overlap check
Not tested
AI use
|
rootw0rm
pushed a commit
to rootw0rm/xcl
that referenced
this pull request
Nov 26, 2026
… gap-probe lesson
rootw0rm
pushed a commit
to rootw0rm/xcl
that referenced
this pull request
Nov 26, 2026
…ue shape (both twins) Upstream xcl-dev#2836 (43a4eb9, OPEN) drains in-flight taskqueue monitor callbacks on unregister (revoked flag + running count + Condvar + MONITOR_DEPTH reentrancy guard + skip-revoked-snapshot). Cannot land verbatim: tree diverged via xcl-dev#2021 (d1ce58c) - Monitor has no queue_handle, notify_monitors is Port-level fan-out with synthesized temp handles in BOTH hle/xgameruntime/taskqueue.rs and hle/xtaskqueue_linux.rs (Linux-live twin). Adaptation: Arc<Monitor> with state/idle, invoke(handle,port), revoke/wait, remove-if-drained; register/unregister updated; 3 upstream tests ported per twin failing-first (Linux twin 2 failed pre-fix as predicted, 3/3 post-fix; Windows-twin tests mirror but cannot execute on Linux - parse-verified only). Gates: checks 0 errors; lib 783/0/1; e2e sets identical to baseline; retail SIGSEGV exe+0x2237320 stubs 20 xgr XAsync/XNetworking/XUser HOLDS.
This was referenced Dec 1, 2026
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.
XTaskQueueUnregisterMonitorcould return while a monitor still used its context. It could also leave a copied notification snapshot able to invoke the removed registration. Native Windows unregister waited for the running callback in the synthetic comparison. Related to #2021, which covers monitor delivery through shared ports.What is in it
Tested
43a4eb9dacbe1cc1e746609f979597d27538979fon8b957bec6f82495aec940944c6bf47faa02db590. Windows 11 25H2 build 26200.9974, Core i5-13600K, RTX 4080 driver 621.01, Rust 1.100.0 x64 MSVC, DXC 1.8.2502.11, debug.xgameruntime.dll10.0.26100.9656probe ran nine trials in three fresh CPU processes. The external unregister caller returned only after the held callback ended in all nine. Every subsequent submission completed without another monitor invocation.cargo build --workspace --locked -j 4passed.cargo test --workspace --locked -j 4 -- --test-threads=4 --show-outputreported 1,449 passed, 0 failed, 47 ignored across 38 harnesses. The pass count includes 29 capability skips and 10 separate unset optional sample messages.Regression run
Matched retail smoke is pending.
Not tested