Skip to content

XGameRuntime: notify shared-port monitors with temporary queue handles - #2021

Open
eizispark wants to merge 1 commit into
xcl-dev:mainfrom
eizispark:fix/taskqueue-shared-port-monitors
Open

eizispark wants to merge 1 commit into
xcl-dev:mainfrom
eizispark:fix/taskqueue-shared-port-monitors

Conversation

@eizispark

@eizispark eizispark commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

XTaskQueueRegisterMonitor previously captured the raw XTaskQueueHandle value passed at registration on the single Queue and invoked monitor callbacks only on the Queue through which an item was submitted. That broke the GDK / libHttpClient (XTaskQueue.h) monitor contract in two ways:

  1. When a title extracts a manual pump queue's port via XTaskQueueGetPort and combines it into a composite queue with XTaskQueueCreateComposite (for example, background work port + main-thread manual completion port), work or XAsyncComplete completions submitted through the composite queue never notified monitors registered on the pump queue, leaving manual-port event loops un-signaled.
  2. When the handle passed to XTaskQueueRegisterMonitor was closed after XTaskQueueDuplicateHandle — or when NULL was passed to monitor the process task queue — callbacks received a closed or null XTaskQueueHandle (causing XTaskQueueDispatch and XTaskQueueDuplicateHandle inside the callback to fail) instead of a temporary handle valid for the duration of the callback. In addition, XTaskQueueTerminate did not stop monitor notifications on terminated queues sharing a composite port.

What is in it

  • crates/xcl/src/hle/xgameruntime/taskqueue.rs: track live queues attached to each Port via Weak<Queue>, fan Port::notify_monitors out to every non-terminated queue attached to the port using that queue's own port slot (PORT_WORK / PORT_COMPLETION), pass a temporary QueueHandle closed on callback return, and clear Queue::monitors in XTaskQueueTerminate.
  • crates/xcl/src/hle/xgameruntime/taskqueue.rs (tests): add monitors_fire_across_composite_ports_and_outlive_registering_handle. It covers same-slot and cross-slot composite port submissions, inline XTaskQueueDispatch and XTaskQueueDuplicateHandle on the temporary callback handles, closing the registering handle while a duplicate stays open, NULL process-queue monitors, and no monitor callbacks after XTaskQueueTerminate. Each temporary handle is checked right after its own callback returns, before a later XTaskQueueDuplicateHandle can be given the freed handle's address.

Tested

  • Windows 11 x64, AMD Ryzen 7 9800X3D, AMD Radeon RX 9070 XT (driver 32.0.32015.16001), rustc 1.100.0 (0ef1bc386 2026-11-09), debug and release.
  • cargo test --workspace --no-fail-fast -- --test-threads=4 on the head, rebased onto main 426a5a7: 1241 passed, 3 failed – gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1, fuzz_validate_and_gpu_3 and gpu::recomp::tests::gpu_image_get_resinfo_past_last_level, which fail the same way on a clean main 426a5a7 on this adapter; 46 ignored.
  • monitors_fire_across_composite_ports_and_outlive_registering_handle alone, 40 runs: 0 failures. The whole hle::xgameruntime::taskqueue module, 20 runs: 0 failures. hle::xgameruntime: 76 passed, 0 failed.
  • The new test failed before the fix (monitor on main_q did not wake/dispatch composite completion, left: 0, right: 1).

Regression run

main:

xcl-smoke v1
commit: 426a5a745db4d5e4b037449ede0b70cb342f5192
gpu: AMD Radeon RX 9070 XT
title: 9cc6a39e
seconds: 60
exit: 0x0
frames shown: 1680 (PresentX 1680)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14599 MB

PR head:

xcl-smoke v1
commit: aa4ee6c2eca0c78deda1c4dcab7f1bdcbf9d23a9
gpu: AMD Radeon RX 9070 XT
title: 9cc6a39e
seconds: 60
exit: 0x0
frames shown: 1678 (PresentX 1678)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14571 MB

Not tested

  • NVIDIA and Intel GPUs, Windows 10, wave32-only adapters, and XCL_SAMPLE_* sample-data tests.

AI use

  • Antigravity (Google DeepMind, Gemini 4 Carbon) – audited XTaskQueueRegisterMonitor and composite-port notifications in taskqueue.rs, wrote the fix and unit test, and ran the test suite and smoke check. Antigravity (Claude Opus 5.5) – fixed the handle-address reuse in the test that @fromthemoonx found, rebased onto main 426a5a7, and reran the suite, the stress runs and the smoke pair.

@raylitebull

Copy link
Copy Markdown
Member

Code review on 1e94be5:

  • crates/xcl/src/hle/xgameruntime/taskqueue.rs cleanly handles shared/composite port notifications for duplicated and temporary queue handles and suppresses notifications once the monitored queue is terminated (monitors_fire_across_composite_ports_and_outlive_temporary_handles), verified on AMD RX 9070 XT.
  • Diff audited and CI workflow approved (currently running).

Remaining before merge: Build and test (Windows, no GPU) finishing green plus an NVIDIA verification pass on 1e94be5.

@fromthemoonx

fromthemoonx commented Nov 25, 2026 •

Copy link
Copy Markdown

Rerun on the new head aa4ee6c: the flake is gone here. monitors_fire_across_composite_ports_and_outlive_registering_handle alone (--exact --test-threads=1): 40 of 40 passed (it failed 3 of 40 on 1e94be5). hle::xgameruntime::taskqueue -- --test-threads=4: 20 of 20. cargo test --workspace --no-fail-fast -- --test-threads=4: 1244 passed, 0 failed, 46 ignored (base 426a5a7; merges into main 1a0bbe3 without conflicts). Same RTX 3060 / Ryzen 7 5700X, debug. The report below is for 1e94be5.


The new test is flaky because the test reuses a handle address, not because of the runtime: monitors_fire_across_composite_ports_and_outlive_registering_handle fails 3 of 40 times when run alone on this machine, and 5 of 40 in hle::xgameruntime::taskqueue. The rest of the suite passes, at the head and merged onto main.

The failure: taskqueue.rs:1222, temporary monitor handle leaked past callback.

Cause: handles are Box addresses (new_handle, taskqueue.rs:459). The first callback's temporary handle is freed when that callback returns. The second callback then calls XTaskQueueDuplicateHandle, and the allocator can hand that duplicate the same address. The duplicate stays open until after the assertion, so queue_from(ev[0].0) finds a live QueueHandle there. A scratch eprintln! before the assertion shows it, in 40 single-test runs:

FAILED  temp0=0x2cc55fcaca0 temp1=0x2cc55fcb120 dups=[2cc55fcafc0, 2cc55fcaca0]
FAILED  temp0=0x249c704b260 temp1=0x249c704b220 dups=[249c704aee0, 249c704b260]
FAILED  temp0=0x243b717a980 temp1=0x243b717a920 dups=[243b717a620, 243b717a980]
ok      temp0=0x2b1db86b1f0 temp1=0x2b1db86b590 dups=[2b1db86b310, 2b1db86b2b0]

In every failure, dups[1] == temp0. A check that cannot hit this would assert that the temporary handle is gone right after the first XTaskQueueSubmitCallback, before the second callback allocates anything. Another option is to assert that ev[0].0 is either not live or is one of the open duplicates.

Tested (RTX 3060 12 GB, driver 610.88, Ryzen 7 5700X, Windows 11 Pro 26300, Rust 1.100.0 MSVC, debug):

  • Exact head 1e94be5: cargo test --workspace --no-fail-fast -- --test-threads=4: 960 passed, 0 failed, 43 ignored.
  • Merged onto main 5796cc4 (no conflicts): 1058 passed, 0 failed, 45 ignored.
  • cargo test -p xcl --lib hle::xgameruntime::taskqueue -- --test-threads=4: 5 failed in 40 runs at the head, and 1 failed in 20 on the merged tree, each time this test with the same message.
  • cargo test -p xcl --lib <that test> -- --exact --test-threads=1: 3 failed in 40 runs.

Not tested: the runtime change in a title, Windows 10, a release build.

AI use: Claude Code (Claude Opus 5.5) ran the tests, found the cause with a scratch print (not pushed) and wrote this report.

@raylitebull

Copy link
Copy Markdown
Member

Thanks @fromthemoonx for isolating the Box handle-address reuse (dups[1] == temp0) in monitors_fire_across_composite_ports_and_outlive_registering_handle ( askqueue.rs:1222). @eizispark — asserting that the temporary handle is gone right after the first XTaskQueueSubmitCallback (before the second callback allocates XTaskQueueDuplicateHandle) or allowing open duplicate handles in the assertion should eliminate the 3/40 test flake.

@JJAutoCompare

Copy link
Copy Markdown

PR #2021 empirical test report

Tested the clean live head 1e94be56109a6e6effcbc008ad9a8bada7e65856 of xcl-dev/xcl#2021 (XGameRuntime: notify shared-port monitors with temporary queue handles).

  • Merge check: git merge-tree --write-tree exited 0 against both checked origin/main snapshots (564cebe0f898a5e04e3e046312c1a0c1afd02de9 and 8f5fca5bb9ad6e695093d75294ad2cec023bba60).

Tested

  • Host: STOR-WINLAB, Windows 11 Enterprise Evaluation 25H2 build 26200.9974, AMD Ryzen 7 3800X, Intel Arc A770 16 GiB (driver 32.0.101.9175, wave lanes 8–32, DoublePrecisionFloatShaderOps=0).
  • Toolchain: Rust 1.100.0 (0ef1bc386), DXC 1.9.2609.5, unoptimized dev/test profiles with CARGO_INCREMENTAL=0, CARGO_PROFILE_DEV_DEBUG=0, CARGO_PROFILE_TEST_DEBUG=0, XCL_ADAPTER=A770.
  • cargo test --workspace --no-run and cargo build --workspace succeeded (building the test-title executable and middleware DLL required by e2e).
  • cargo test -p xcl --lib hle::xgameruntime::taskqueue::tests -- --show-output (outside GPU lock): 11 passed, 0 failed, 0 ignored, 0 skipped, including the new shared-port monitor test.
  • cargo test --workspace --no-fail-fast -- --test-threads=4 --show-output (under Invoke-ArcTest.ps1): exited 101 across all workspace targets with 941 passed, 19 failed, 43 ignored in raw Cargo totals, including 25 explicit SKIPPED GPU lines across 15 named tests (excluded from coverage).
    • Failures: 18 GPU library tests (14 CreateComputePipelineState: 0x80070057 and 4 shader result mismatches) and 1 e2e failure (test_title_runs_and_game_folder_is_untouched dynamic depth-bias check; the synthetic title's task queue checks passed).
All 25 GPU SKIPPED lines
SKIPPED gpu::recomp::lower::tests::a_2d_or_3d_group_agrees_with_the_hlsl_path_on_the_gpu: no wave64
SKIPPED gpu::recomp::lower::tests::cross_lane_reads_agree_with_the_hlsl_path_on_the_gpu: no wave64
SKIPPED gpu::recomp::lower::tests::coalesced_guarded_runs_agree_with_the_hlsl_path_on_the_gpu: no wave64
SKIPPED gpu::recomp::lower::tests::the_wave64_lowering_agrees_with_the_hlsl_path_on_the_gpu: no wave64
SKIPPED gpu::recomp::lower_dxil::tests::a_per_lane_2d_or_3d_group_runs_on_the_gpu: no wave64
SKIPPED gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu: f16 arithmetic, wave32, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))
SKIPPED gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu: f16 arithmetic, wave64: no wave64
SKIPPED gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu: f32 arithmetic, wave64: no wave64
SKIPPED gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu: f16 packed, wave32, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))
SKIPPED gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu: f16 packed, wave64: no wave64
SKIPPED gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu: f32 compares, wave64: no wave64
SKIPPED gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu: f32 conversions, wave32, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))
SKIPPED gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu: f32 conversions, wave64: no wave64
SKIPPED gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu: integer arithmetic, wave64: no wave64
SKIPPED gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu: f32 rounding, wave64: no wave64
SKIPPED gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu: integer carries, wave64: no wave64
SKIPPED gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu: f32 transcendentals, wave64: no wave64
SKIPPED gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu: f32 three-source, wave64: no wave64
SKIPPED gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask: no wave64
SKIPPED gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware: no wave64
SKIPPED shaders::tests::pso_measurement_compiles_an_exact_synthetic_record: cannot disable the driver cache (Windows Developer Mode is required): The application requested an operation that depends on an SDK component that is missing or mismatched. (0x887A002D)
SKIPPED placed_title_textures_share_vram_and_preserve_pixels: tiled tier < 2
SKIPPED test_title_draws_with_a_root_signature_under_the_debug_layer: no d3d12SDKLayers.dll
SKIPPED heap_window_out_of_memory_falls_back_to_the_switch_form: no heap windows
SKIPPED uploads_start_from_each_subresources_state: no D3D12 debug layer (The application requested an operation that depends on an SDK component that is missing or mismatched. (0x887A002D))

Not tested

  • Same-host origin/main baseline comparison in this run (so the 19 GPU/e2e failures remain unattributed to this PR here).
  • Retail-title scripts/smoke.ps1 regression runs, optional XCL_SAMPLE_* datasets, audio endpoint, and system xgameruntime.dll.
  • AMD / NVIDIA GPUs, wave64 hardware, hardware FP64 ops, and D3D12 debug-layer paths.

AI use

  • T3 Code / Codex (gpt-6.2-sol) fetched and checked the PR head, built and ran the targeted and workspace tests, and summarized the logs. Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified the counts against suite-after-build.log and published this report.

@DavidM1911

Copy link
Copy Markdown
Contributor

Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

Thanks!

IvyNotFound added a commit to IvyNotFound/xcl that referenced this pull request Nov 25, 2026
# Conflicts:
#	crates/xcl/src/hle/xgameruntime/taskqueue.rs
XTaskQueueRegisterMonitor previously recorded the raw handle value used
at registration on the single Queue struct and fired callbacks only on
the queue through which work or completions were submitted. That broke
two parts of the GDK / libHttpClient XTaskQueue.h monitor contract:

1. When a title extracts a manual pump queue's port with XTaskQueueGetPort
   and attaches it to a composite queue with XTaskQueueCreateComposite,
   submissions to the composite queue never notified monitors registered
   on the pump queue, leaving manual-port event loops un-signaled.
2. When the handle passed to XTaskQueueRegisterMonitor was later closed
   after XTaskQueueDuplicateHandle (or was NULL for the process queue),
   callbacks received a closed or null XTaskQueueHandle instead of a
   temporary handle valid for the duration of the callback.

Track live queues attached to each Port via Weak<Queue>, fan monitor
notifications out to every non-terminated queue attached to the port
using that queue's own port slot, pass a temporary QueueHandle closed on
callback return, and clear monitors when XTaskQueueTerminate runs.

Assisted-by: Antigravity (Google DeepMind, Gemini 4 Carbon)
@eizispark
eizispark force-pushed the fix/taskqueue-shared-port-monitors branch from 1e94be5 to aa4ee6c Compare November 25, 2026 11:44
@eizispark

Copy link
Copy Markdown
Contributor Author

Thanks @fromthemoonx for tracking down the address reuse, and @raylitebull for the suggested fix.

Pushed aa4ee6c (rebased onto main 426a5a7). Each temporary handle is now checked right after its own XTaskQueueSubmitCallback returns. At that point the only other handle made during the callback is its duplicate, and it was allocated while the temporary handle was still live, so the two can't share an address. The old check after both callbacks is gone.

On the RX 9070 XT: the test alone, 40 runs, 0 failures. hle::xgameruntime::taskqueue, 20 runs, 0 failures. hle::xgameruntime, 76 passed. Full workspace: 1241 passed. The 3 failures (fuzz_validate_and_gpu_1/_3, gpu_image_get_resinfo_past_last_level) fail the same way on a clean main 426a5a7 here. New smoke pair in the description: 1680 frames on main, 1678 on the PR, no removals or crashes. The runtime change is the same as in 1e94be5.

rootw0rm pushed a commit to rootw0rm/xcl that referenced this pull request Nov 26, 2026
xcl-dev#2021, Windows verbatim + Linux twin)

Windows hle/xgameruntime/taskqueue.rs verbatim reference-only (hle is
cfg(windows), 0 tests run on Linux): Monitor drops queue_handle; Port
gains queues + attach + notify_monitors (walk attached queues, skip
terminated, per-owner-port ptr_eq match, temp handle via new_handle +
close after callback); Queue::new/composite attach; q.notify ->
p.notify at 4 submit sites; Terminate clears monitors; register drops
the stored handle; +1 large test.

Linux twin hle/xtaskqueue_linux.rs mirrors (win64 ABI; twin already has
Weak at :455, new_handle/CloseHandle, termination_cb_pending, waiter
subsystem, null->process_queue): same Port shape + attach/notify +
4 submit sites + Terminate monitors.clear() + register drop + twin
test (win64, no ASYNC_TEST_LOCK per precedent).

Failing-first: new twin test red pre-fix (composite submit never
notified pump monitor, ran stayed 0), green post-fix.
@DavidM1911

Copy link
Copy Markdown
Contributor

Re-verification on RTX 3060 Ti (Windows 11), new head merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved.

Thanks!

— Devin

rootw0rm pushed a commit to rootw0rm/xcl that referenced this pull request Nov 26, 2026
… 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.
@upipibi

upipibi commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Tested head aa4ee6c2eca0c78deda1c4dcab7f1bdcbf9d23a9 (merge-base with main 426a5a7) on Windows 11 Pro 26100, rustc 1.100.0 MSVC, debug, CPU only (no GPU opened).

cargo test -p xcl --lib hle::xgameruntime::taskqueue:: -- --test-threads=1: head 11 passed, 0 failed, 0 ignored; merge-base 10 passed, 0 failed. New on head: monitors_fire_across_composite_ports_and_outlive_registering_handle. Applied to the merge-base 426a5a745db4d5e4b037449ede0b70cb342f5192 code (test hunk only, no fix), hle::xgameruntime::taskqueue::tests::monitors_fire_across_composite_ports_and_outlive_registering_handle fails: monitor on main_q did not wake/dispatch composite completion (left: 0, right: 1), 0 passed, 1 failed.

Not tested: full suite, GPU, retail title. AI-assisted (Claude Code, Claude Sonnet 5.5 ran the tests; Claude Opus 5.5 checked and posted).

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.
@Decodere

Copy link
Copy Markdown
Contributor

Independent desktop NVIDIA verification of PR #2021 at head aa4ee6c2eca0c78deda1c4dcab7f1bdcbf9d23a9 (1 commit; exact parent & merge-base: 426a5a745db4d5e4b037449ede0b70cb342f5192, pre-#2555 ancestor of main).

Environment

  • GPU: NVIDIA GeForce RTX 4060 (8 GB / 7956 MiB reported by D3D12), driver 32.0.16.2114 (NVIDIA 621.14, WDDM 3.2)
  • CPU / RAM / OS: Intel Core i5-11400F (6C / 12T), 32 GB RAM (31.9 GiB usable), Windows 11 Home 26200 (Developer Mode off)
  • Toolchain: rustc 1.100.0 (0ef1bc386 2026-11-09) MSVC, DXC 1.9.2609.5, --release

Targeted release tests & build (aa4ee6c2)

Command Result
cargo test --release -p xcl --lib monitors_fire_across_composite_ports_and_outlive_registering_handle -- --nocapture (3 consecutive runs) 1 passed; 0 failed; 0 ignored; 1200 filtered out × 3 (0.00s × 3, 0 skipped)
cargo test --release -p xcl --lib hle::xgameruntime::taskqueue:: -- --test-threads=1 (3 consecutive runs) 11 passed; 0 failed; 0 ignored; 1190 filtered out × 3 (0.26s × 3, 0 skipped)
cargo build --release -p xcl Clean build (1m 07s, exit 0, 0 new warnings)

Paired quiet 60 s retail smoke (title: 29640639)

Exact parent & merge-base (426a5a745db4d5e4b037449ede0b70cb342f5192, cached baseline on the same machine):

xcl-smoke v1
commit: 426a5a745db4d5e4b037449ede0b70cb342f5192
gpu: NVIDIA GeForce RTX 4060
title: 29640639
seconds: 60
exit: 0x0
frames shown: 1591 (PresentX 1591)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14477 MB

PR #2021 (aa4ee6c2eca0c78deda1c4dcab7f1bdcbf9d23a9):

xcl-smoke v1
commit: aa4ee6c2eca0c78deda1c4dcab7f1bdcbf9d23a9
gpu: NVIDIA GeForce RTX 4060
title: 29640639
seconds: 60
exit: 0x0
frames shown: 1602 (PresentX 1602)
presents per 2 s (last 3): 60 61 60
device removals: 0
crashes: 0
peak commit: 14455 MB

Runtime log observations (xcl.log)

  • 9204 log lines, 0 [ERROR] / device-removal / panic lines (dxil_cache: 460 hits, 0 misses, 0 compilation failures; 228 background pipelines, 0 failures).
  • Final draw/memory telemetry in log: 19522 draws with translated pipelines (0 skipped, 0 with PC pipelines), 1024 dispatches (0 skipped); last memory sample 14454 MB committed by the process; video memory 6115 MB local, 4684 MB non-local.

Limits of coverage

  • Composite-port monitor fan-out, temporary XTaskQueueHandle lifetimes after closing the registering handle, and monitor cleanup on XTaskQueueTerminate were directly verified via monitors_fire_across_composite_ports_and_outlive_registering_handle (3/3) and the full hle::xgameruntime::taskqueue:: suite (11/11 × 3).
  • The 60 s retail smoke confirms zero runtime regression on title: 29640639 (single-run frame/commit delta vs. cached parent reflects normal startup variance, not this PR); it did not independently exercise a retail libHttpClient composite manual-pump monitor workload.

AI disclosure: test execution and report drafting assisted by Google Antigravity (Gemini 4 Neon).

@Foniass

Foniass commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

Triage (#1607) – head aa4ee6c

No open or merged PR notifies monitors through shared ports; #2836 (closed) touched monitor unregistering only.
taskqueue.rs: Port::notify_monitors passes each callback a new handle (new_handle(owner.clone())) and closes it as soon as the callback returns. A title that keeps the queue handle it receives in the monitor callback and dispatches on it later (e.g. hands it to its UI thread) then uses a closed handle; main passed the registering handle. An owner whose two ports are the same Arc<Port> gets two callbacks (port 0 and 1) per submit. Each submit also allocates a handle per monitor.
Recommendation: keep open.

AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants