d3d12_xs: cargo test --lib -- --test-threads=1 ends with exit code 0x887A0006 about 3 s in (dred test arms the removed-device exit timer) #192
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
library
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/omonkeyz--xbox-emulator#192
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?
@kiwe147 on GitHub · 2026-11-22 23:29 UTC · original
On
main30a1b53,cargo test --locked -p d3d12_xs --lib -- --test-threads=1stops in the middle of the run and cargo reportsprocess didn't exit successfully ... (exit code: 0x887a0006). On my machine it died inupload::zero_watch_tests::guarded_reads_cost_one_call_per_range_not_per_bytein 3 of 3 runs, with 553 tests passed before it. That test passes alone (3 of 3), together with every single other module (88 modules tried one at a time), and in the default parallel run (cargo test --lib: 581 passed, 1 failed = the console-dump fixture test, 5 of 5 runs).Cause (found by reading the code and checking with the switch below; I did not trace which test arms it): the exit code is the one
dred::exit_codereturns when the GPU device is lost. The only test caller ofreport_oncethat I found is thedredtest atcrates/compat/d3d12_xs/src/dred.rs:663,report_once("test", None). When a device pointer has been stored by then, that goes toschedule_exit, which starts a thread that sleepsTOMBOX_REMOVED_EXIT_MS(3000 ms by default) and then callsExitProcess(0x887A0006). The process is killed by that thread, whatever test is running 3 s later. The parallel run finishes in about 2.2 s, so it ends before the timer fires. The single-threaded run takes longer than 3 s (about 6.5 s), so the timer fires in the middle of it.Check: with
TOMBOX_REMOVED_EXIT_MS=off, the same single-threaded run finishes: 581 passed, 1 failed (the console-dump fixture test), 44 ignored.Possible fix: have the test set
TOMBOX_REMOVED_EXIT_MS=offbefore it callsreport_once, or skipschedule_exitundercfg(test).Why it matters:
--test-threads=1is the mode used in issue #157 and the one the maintainers asked for there, and it is the mode where a failed or hung test is easiest to find. Right now it reports a crash that is not a test failure.Setup: Windows 11 Pro 10.0.26200, Ryzen 7 9800X3D, NVIDIA GeForce RTX 3080 (driver 621.24), MSVC (VS Build Tools 17.14), Rust 1.91.1,
main30a1b53.AI-assisted: yes (Claude Code)
@omonkeyz on GitHub · 2026-11-23 13:12 UTC · original
Fixed on main in
6e6095f: in test builds schedule_exit only records the exit code (TEST_EXIT) and never calls ExitProcess, so a --test-threads=1 run is no longer killed 3 s after the dred test. Thanks for the clear report.