Repository navigation
Conversation
|
Full-suite run, since this PR has no test report yet. Tested exact head Tested
Not tested
AI use
|
XUserUnregisterForDeviceAssociationChanged dropped the registration and ignored both the wait flag and the callbacks already handed to the title's queue: a callback queued behind it still ran, with the title's context - which the title is free to free once the call returns - and `wait = true` returned without waiting for a running one. Track each queued callback (queued / running / done): the unregister marks a queued one done (the queue's later call skips it) and, with `wait`, waits for a running one to finish before returning. Assisted-by: OpenCode (Gemini 4 Neon)
8cd4248 to
d7ced4d
Compare
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
|
Two contributors checked independently and found that #1418 #1583 solves the same problem (for #1389) in a different way: #1607, group D58. You may want to compare them with the other author and agree on one, or say in the PR why both are needed. This is a hint from the community triage in #1607, not a maintainer decision. AI use: Claude Code (Claude Opus 5.5), posted by a script from the #1607 table. |
PR #1753 compatibility verificationTested XGameRuntime association callback cancellation at Tested
Failures and skips
Not tested Retail-title smoke runs, a AI use T3 Code / Codex ( |
|
Independent Windows run on d7ced4d. Windows 11 build 26300, Ryzen 7 9800X3D, RTX 3080 Ti (621.35), Rust 1.99.1 MSVC.
I also tested a callback that had already started on another thread. With AI use: Codex (GPT-6, exact variant unspecified) wrote the scratch fixture, ran the tests and drafted this report. |
…cl-dev#1753, Windows verbatim + Linux twin) Windows hle/xgameruntime/mod.rs is the upstream hunk verbatim (reference-only on Linux): AssociationCall gains token + Queued/ Running/Done state + condvar, ASSOCIATION_CALLS liveset tracks in-flight callbacks; association_call skips canceled/non-queued records, unregister marks queued ones Done and with wait=true joins running ones. Upstream test ported verbatim. Linux twin hle/xuser_linux.rs mirrors the same state machine on xtaskqueue_linux (win64 ABI, submit_now bool path) with a Linux-shaped twin test (manual queue + dispatch + token+1 pin). Triage per keeper (land ONE, xcl-dev#1753 preferred): xcl-dev#1583 closes with citation (its +2 is a comment on its own competing stopped/in_flight registry, which stays out); xcl-dev#1418 stays out (Entry/manager + running_threads + unknown-token-false + re-entrant self-skip is the competing design; xcl-dev#1753 keeps the existing always-true unregister).
… upstream xcl-dev#1237 + xcl-dev#494 + xcl-dev#1382 loopback) Port live heads e2a4b1d (xcl-dev#1237), bf21fd8 (xcl-dev#494), 2b765d2 (xcl-dev#1382), all still OPEN vs upstream/main. Windows hunks already verbatim reference-only; this is the Linux twin (win64 ABI). xcl-dev#1237: InitialNotification<T> + notify_initial via queue_from/submit_now on PORT_COMPLETION + udp/connectivity call fns; both Registers reject null callback (E_INVALIDARG) and queue the current value. xcl-dev#494: network_off() reads XCL_NETWORK directly (hle_linux has no netoff yet) + connectivity_level() 1/3; GetConnectivityHint uses it. xcl-dev#1382 portable: url_host_and_is_plain_loopback via IpAddr::is_loopback + subnet vectors; request_url/security_info/issuer stay Windows-only (WinHTTP/crypt32 handles, no Linux consumer — same precedent as xcl-dev#843). Already-landed on Linux, verified no change: xcl-dev#1247, xcl-dev#1753, xcl-dev#2021, xcl-dev#1588 + Watch xcl-dev#2521/xcl-dev#2524/xcl-dev#2623. Failing-first: new symbols 0 at HEAD; old Registers accepted cb==0 and queued nothing. Gates: both checks 0 errors, xtaskqueue_linux 16/16, lib 760/0/1 t=4, title 12 GPU-only, retail SIGSEGV +0x2237320 HOLDS.
gut0to
left a comment
There was a problem hiding this comment.
AI-assisted review (OpenAI GPT-6). I inspected the unregister state transition and callback completion path; I did not run tests.
| for call in running { | ||
| let mut st = call.state.lock().unwrap(); | ||
| while *st != CallState::Done { | ||
| st = call.done.wait(st).unwrap(); |
There was a problem hiding this comment.
If the title unregisters this token from inside its own callback with wait = true, this waits for Done, but the only code that sets Done for a running callback executes after the callback returns. That self-unregister therefore deadlocks the queue thread. Could the running state record its thread (or otherwise detect reentrant unregister) and skip waiting for the current callback, with a regression test?
|
NVIDIA and AMD full-suite run, to go with the reports above by JJAutoCompare, thehollowedone, since none of them covers AMD. Tested exact head Tested
Not tested
AI use
|
Addresses
XCL-BT-041from #1488.XUserUnregisterForDeviceAssociationChangeddropped the registration, ignoredwait, and left the callbacks it had already handed to the title's queue untouched: one queued behind the call still ran the title's callback with the title's context, which the title is free to free once the call returns (wait = trueis the documented way to know it is safe). A running callback was not waited for either.This tracks each queued callback's state (
Queued/Running/Done): the unregister marks a queued one done — the queue's later call then skips the title's callback and just releases the record — and withwaitit waits for a running one to finish before returning.What is in it
crates/xcl/src/hle/xgameruntime/mod.rs:AssociationCallcarries its token and aQueued/Running/Donestate with a condvar;ASSOCIATION_CALLSholds the live records;association_callskips a call that was unregistered (or whose queue was terminated) and signals when it is done;XUserUnregisterForDeviceAssociationChanged(token, wait)cancels queued calls and waits for running ones;notify_associationpasses the token.an_unregistered_association_callback_does_not_run(manual queue: queued, unregistered, dispatched → not called; a later registration still runs). Fails onmainwithleft: 1, right: 0(the callback was unregistered: its context may be gone).Tested
stable-x86_64-pc-windows-msvc), DXC 1.9.2609.5, debug (scripts/test.ps1) and release (scripts/smoke.ps1).\scripts\test.ps1(cargo build --workspace+cargo test --workspace -- --test-threads=4): 960 passed, 0 failed, 43 ignored (SKIPPED: the wave64 / direct-DXIL per-lane tests that need 64-lane hardware or a semantics mode this adapter refuses,no heap windows, andcannot disable the driver cache (Windows Developer Mode is required))cargo test -p xcl --lib xgameruntime: 74 passed, 0 failedRegression run
main (
c4d37be, clean tree, no local changes):PR (
d7ced4d, clean tree, no local changes):Not tested
wait = falseis the one for that)AI use
XCL-BT-041against the queue andxasynccallback paths, wrote the state machine and the test (and confirmed it fails without the fix), rebased ontoc4d37be, ran the test suite andscripts/smoke.ps1regression runs with Scripts: smoke blocks print the game folder's name #677's title hashing, and drafted this PR description.