Device removed (0x887A0005) after 7–18 min of play, right after a masked-twin pipeline is made (RTX 4070 SUPER) #3068
Assignees
Clear assignees
No assignees
Labels
Clear labels
bug
Something isn't working
dependencies
Pull requests that update a dependency file
documentation
Improvements or additions to documentation
enhancement
New feature or request
missing claim
Needs a claim in #14
needs rebase
Conflicts with the base branch: rebase it on main
needs-triage
Needs maintainer evaluation before the next triage state
question
Further information is requested
ready-for-agent
Fully specified and ready for an AFK agent
submodules
Pull requests that update submodules code
No labels
bug
dependencies
documentation
enhancement
missing claim
needs rebase
needs-triage
question
ready-for-agent
submodules
Projects
Clear projects
No items
No project
Milestone
Clear milestone
No items
No milestone
Dependencies
No dependencies set
Reference
No Branch/Tag specified
main
github-pr/3295
beta
docs/changelog-3483-3500
github-pr/3294
github-pr/2975
github-pr/2815
feat/gate-driver-start
feat/skip-pipelines-release
perf/lazy-compare
perf/mwaitx-wait
test/prio-ceiling-main
fix/ab-cpu-stdout
fix/gate-old-crashes
diag/ab-cpu
test/main-0312
github-pr/3291
diag/indirect-clamp-census
feat/barrier-enhanced
perf/texture-frame-ceiling
perf/dstorage-threads
fix/console-queue-dma-tables
fix/port-descriptors-record-parts
fix/frame-waits-fence
fix/console-sampler-words
fix/graphics-userdata-spill
fix/xg-reserved-layout-rotation
fix/barrier-console-flags
fix/switches-wait-test-child
test/list-value-waits
test/lot-gxdk-0412
fix/bvh-compacted-size
docs/i18n-quickstarts
feat/native-pipeline-slots
fix/clippy-leonida-gpu
fix/list-value-producers
fix/descriptor-page-straddle
fix/xmem-low-window
fix/ffx-jitter-never-zero
fix/run-stdout-closed
github-pr/2892
github-pr/2896
feat/warm-save-every
github-pr/2980
github-pr/2994
github-pr/3005
github-pr/3010
github-pr/3136
github-pr/3303
github-pr/3220
github-pr/3143
github-pr/3330
github-pr/3226
github-pr/3187
carry/3395
github-pr/2946
github-pr/2947
github-pr/2945
github-pr/2983
github-pr/3001
github-pr/3372
github-pr/3128
github-pr/3296
github-pr/2588
github-pr/3119
github-pr/3378
fix/crash-diagnostics
feat/dlss-mip-bias
fix/retired-out-of-order
fix/dxr-postbuild-barrier
fix/amd-relay-default
fix/removed-report-wait
feat/heap-twin
feat/vram-margin
github-pr/2472
github-pr/3123
github-pr/3088
assets/annonce-v1
github-pr/2794
github-pr/3300
github-pr/3304
github-pr/3308
github-pr/3367
github-pr/3369
fix/launcher-dlss-diagnostics
github-pr/3269
github-pr/2957
github-pr/3205
fix/crash-zero-guard
github-pr/3185
github-pr/3099
github-pr/3104
github-pr/3348
github-pr/3379
github-pr/3377
perf/darner-title-priority-ceiling
github-pr/3376
gh-readonly-queue/main/pr-3311-b5c45b663dbc5a9c3532bb3f307e5f81b32faefa
gh-readonly-queue/main/pr-3088-af22e7847ff5808f72d1a1881c24be2fafd20b54
gh-readonly-queue/main/pr-3123-7f3fa026a94c6646e89244f28e1ce22290361867
github-pr/3373
github-pr/3368
github-pr/3198
gh-readonly-queue/main/pr-3354-637baa0b77ba47222e7280b17c1a59c6a1781d57
gh-readonly-queue/main/pr-3365-d7a0e0196a43834813014b4bd3aa5502a8263b14
gh-readonly-queue/main/pr-3361-5dfe8bbd05ed12fb2f2e1718d9af77a7c5f46fd8
gh-readonly-queue/main/pr-3366-8da9148204e9d12c585efa9ac2b7cc1ab08c7682
github-pr/3346
github-pr/3375
github-pr/2958
github-pr/3151
github-pr/3307
github-pr/3278
github-pr/3374
fix/runtime-test-conservative-fixtures
github-pr/3366
ci/shard-semantic-linux
github-pr/3354
docs/fg-limit-fps-switch
github-pr/3365
fix/read-file-hard-link
github-pr/3364
fix/book-slot-heap-never-read
github-pr/3361
github-pr/3263
github-pr/3360
github-pr/3353
github-pr/3331
fix/alias-later-queued-submissions
github-pr/3352
github-pr/3228
github-pr/3349
claude/gallant-sagan-aamatr
github-pr/3200
github-pr/3132
github-pr/3323
github-pr/3332
github-pr/3340
github-pr/3311
github-pr/3334
github-pr/3297
github-pr/3256
github-pr/2567
github-pr/2851
d3d12/agility-sdk-621
github-pr/3164
github-pr/3114
github-pr/3050
github-pr/3113
github-pr/3326
github-pr/3144
github-pr/2642
github-pr/3072
github-pr/2789
github-pr/2643
github-pr/3009
github-pr/3035
github-pr/3031
github-pr/2686
github-pr/2834
github-pr/3321
github-pr/3325
github-pr/3290
github-pr/3324
github-pr/3130
claude/fervent-curie-m19lnr
github-pr/3309
github-pr/3305
github-pr/3306
github-pr/3302
github-pr/3301
github-pr/3345
github-pr/3211
github-pr/3027
github-pr/3286
github-pr/3235
github-pr/3265
github-pr/3275
codex/skip-no-hit-ray-passes
github-pr/2823
github-pr/2911
github-pr/3262
github-pr/3125
github-pr/3206
github-pr/3250
github-pr/3238
github-pr/3188
github-pr/2952
github-pr/3217
github-pr/3168
t3/preserve-fsr-sdk-restart-path
t3/propagate-host-failure-hresult
github-pr/3209
t3/launcher-custom-parameters
github-pr/3207
github-pr/3183
github-pr/3160
github-pr/3201
ci/less-to-run
github-pr/2930
github-pr/2797
github-pr/2999
perf/native-compute-shader-forms
github-pr/3191
github-pr/3011
github-pr/3019
github-pr/2996
gh-readonly-queue/main/pr-2789-45dc41f95c1cd0dcc29c2c50582e0e9af8a77259
claude/blissful-franklin-ukp7ag
github-pr/3141
github-pr/3156
github-pr/3150
github-pr/3153
github-pr/3163
github-pr/3142
github-pr/3139
github-pr/2841
github-pr/3069
github-pr/3098
github-pr/3107
github-pr/3071
github-pr/2774
github-pr/2889
github-pr/3075
github-pr/2661
github-pr/3064
github-pr/3054
github-pr/3049
github-pr/2855
github-pr/2943
github-pr/3016
github-pr/2887
github-pr/3006
github-pr/3003
github-pr/2993
notes/card-time-and-plant-flicker
github-pr/2989
feat/vulkan-rs
github-pr/2985
github-pr/2951
github-pr/2982
github-pr/752
github-pr/792
github-pr/2877
github-pr/2654
github-pr/2893
github-pr/2948
github-pr/2944
github-pr/2919
github-pr/2915
archive/ci/less-to-run/20261202T1121Z
github-pr/2800
github-pr/2822
github-pr/2833
github-pr/2840
github-pr/2831
github-pr/2832
github-pr/2801
github-pr/2890
github-pr/2891
github-pr/2664
github-pr/2807
rt-call-trace
github-pr/2755
perf/ahead-split
github-pr/2587
github-pr/2698
github-pr/2609
github-pr/3219
docs/readme-runtime-proposal
github-pr/2017
github-pr/1741
github-pr/1667
codex/coord-claim-check-20261124-7e48
v1.1.0
v1.0.1
Notifications
2 participants
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".
No due date set.
Reference
leonida/mandy#3068
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?
What happens
The GPU hangs for about 1.8 s and Windows removes the device: "The GPU device instance has been suspended ... (0x887A0005)", Streamline "We've lost the Device". It happened twice, after ~18 min and ~7 min of free roam (no mission, not saving).
Commit
main, downloaded 2026-12-02 about 06:16 UTC (mandy-main.zip), runtime built by scripts\play-d3d12.ps1 (default build).
System
Windows 11, NVIDIA driver 621.24, hardware-accelerated GPU scheduling on GPU: NVIDIA GeForce RTX 4070 SUPER 12 GB CPU: Intel Core i5-12400F, RAM: 32 GB NVIDIA App shader cache: Unlimited
Where
Finding the game (--find)
Command and steps
scripts\play-d3d12.ps1 -Game "C:\Games\GTA 6\GTA6\GTA6" -Log, frame generation on (LEONIDA_FRAME_GEN=2), DLSS, first run with LEONIDA_FG_LIMIT_FPS=28 (default), second with -More @{LEONIDA_FG_LIMIT_FPS='0'}. Load a save, walk/drive around the starting area. Not reproducible on demand; happened 2 of 2 longer sessions.Before the second crash I turned off the NVIDIA App's global DLSS override (it was loading the OTA "dlss_g" override in the first log); the second crash happened without it.
What both crashes have in common
Card memory was not short: budget 11009 MB, in use ~9110 MB.
The last line before the gap is a new masked mesh pipeline (LEONIDA_SAMPLE_MASK twin), then ~20–25 ms later the device is gone:
crash 1:
host mesh pipeline shaders=[mesh 66d4de52d86d04a4, pixel c58582327ffdada0 masked]at 06:14:01.183, device lost 06:14:01.20crash 2:
host mesh pipeline shaders=[mesh fb5e4cf7091f9525, pixel 2acfe7729b8916c1 masked]at 06:27:11.483, device lost 06:27:11.508Masked twins are ~1 in 6 of the pipelines made in these sessions (309 of 1821 and 300 of 1871), so this may be chance, but it is the same both times.
Earlier in both sessions, masked pipelines are refused by the pipeline library: "the library did not load it: The parameter is incorrect (0x80070057)".
Both crashes end with
the host device went while textures picked by index were made ready; last: Some(Placed(false, ...."device-removed data: none" (DRED was not on in this build).
Output
finding: source trace of the three log signatures in this report (
0x80070057,draw.rstexture-ready poll, andhost mesh pipeline ... maskedright before removal).the library did not load it: The parameter is incorrect (0x80070057)is a normal cache miss, not a corruption/refusal error.In
d3d12/crates/leonida-gpu/src/pipeline/library.rs(pipeline()),ID3D12PipelineLibrary1::LoadPipelinereturnsE_INVALIDARG(0x80070057) whenever a pipeline name is not yet stored in the library. Masked twins are not precompiled byleonida warmand are built lazily on first masked draw, so a first-seen twin normally misses with0x80070057, compiles viaCreatePipelineState, and is then stored withStorePipeline. That line is recorded into thehost::trailring buffer and only becomes visible when device removal dumps the trail.the host device went while textures picked by index were made ready; last: Some(Placed(false, ...(d3d12/crates/leonida-gpu/src/draw.rs) is just the first CPU poll site callingGetDeviceRemovedReason()during submission preparation after an asynchronous GPU removal -- it does not imply that specific placed texture caused the hang.Why a newly created masked mesh pipeline appears ~20-25 ms before device lost:
65f372c08,d3d12/crates/leonida-gpu/src/pipeline/make.rs(masked_for()) compiles a masked twin synchronously on the recording thread (p.make()) on its first draw rather than queuing it to background workers.HostPipeline::new(d3d12/crates/leonida-gpu/src/pipeline/host.rs),tracing::info!(?shaders, "host mesh pipeline")is logged right after the base mesh PSO is created and immediately before the optional amplified mesh PSO (mesh_pipeline(..., amplify: Some(stage))) compiles (which typically takes ~15-25 ms on a miss).d3d12/crates/leonida-shader/src/emit/lower.rs,pixel_mask()) and root-signature binding (USER_PIXEL_MASKas a PS 32-bit root constant inpipeline/host.rsanddraw.rs) showsEARLY_DEPTH_STENCILis cleared beforedx.op.discard,SV_Positionis matched toposition_row(&ms.dxil)(OSG1), and no obvious static DXIL/root-signature mismatch stood out.That leaves two main possibilities to separate empirically:
0x887A0005underLEONIDA_FRAME_GEN=2+ HAGS on driver621.24) completes whilemasked_for()is compiling on the recording thread and is noticed at the nextdraw.rspoll.Helpful next data points
play-1202-085549-crash-excerpt.txtandplay-1202-092018-crash-excerpt.txt-- they were named in the text block but not attached as links), especially the fullwhen the host device went:block (submissions started/finished, active pipeline library calls, and the last trail timestamps)?scripts\play-d3d12.ps1build (d3d12/scripts/build-nvidia.ps1) already compiles with--features diagnostics, so DRED can be enabled directly without rebuilding via:-More @{LEONIDA_D3D12_DRED='light'}(breadcrumbs + faulting address + bound pipelines, low overhead), or-More @{LEONIDA_D3D12_DRED='faults'}(faulting address only, negligible overhead).-More @{LEONIDA_SAMPLE_MASK='0'}test, if it reproduces withLEONIDA_D3D12_DRED='light', the breadcrumb list + faulting address will immediately tell us whether the GPU stopped inside the masked mesh draw or an unrelated pass (and testing-NoFrameGenif it still occurs withLEONIDA_SAMPLE_MASK='0'will isolate Streamline FG).AI-assisted: yes (Antigravity).
Thanks for tracing it. Point 1 is my mistake: I read the 0x80070057 line as a refusal; noted that it is a normal first-time miss.
The excerpts are attached now, plus the full block you asked for:
play-1202-085549-crash-excerpt.txtandplay-1202-092018-crash-excerpt.txt: the lines around each removal.play-1202-085549-device-went-block.txt: the wholewhen the host device went:block of the first crash (submissions started 267509 / finished 267507, pipeline library: no call running, and the last 96 trail entries). Its newest entry, 10.4 ms before, ismade [mesh 66d4de52d86d04a4, pixel c58582327ffdada0 masked] in 673.0 ms.play-1202-092018-end-of-log.txt: the last 60 lines of the second crash. That run printed nowhen the host device went:block.Next I am running
-More @{LEONIDA_SAMPLE_MASK='0'; LEONIDA_D3D12_DRED='light'; LEONIDA_FG_LIMIT_FPS='0'}with-Log, and will post the DRED breadcrumbs / faulting address if it crashes. If it still crashes with the mask off, the next run adds-NoFrameGen.play-1202-085549-crash-excerpt.txt
play-1202-085549-device-went-block.txt
play-1202-092018-crash-excerpt.txt
play-1202-092018-end-of-log.txt
Thanks for uploading all four excerpts --
play-1202-085549-device-went-block.txtandplay-1202-092018-crash-excerpt.txtclarify three important details:0 of the 294088 pages looked at read as zeros now,pipeline library: no call running, and the file was never replaced during the run.06:14:01.202->06:14:03.017) is CPU time insideremoval_context()scanning the 1.2 GB mapped pipeline library, not a GPU hang after06:14:01.202.masked_for()mesh pipeline compile completes, coinciding with Streamline's>100 msframe-timer reset:c58582327ffdada0(masked=true) translated at06:14:00.509,host mesh pipelinefinished 673.0 ms later at06:14:01.183(thread22868), and0x887A0005was hit 19 ms later at06:14:01.202(with 2 submissions in flight:started 267509 finished 267507) right besidedlfgPresent.cpp:1323 Frame rate over 100.00ms, reseting frame timer.2acfe7729b8916c1(masked=true,samplers=2) translated at06:27:09.613,host mesh pipelinefinished ~1.87 s later at06:27:11.483, and0x887A0005+dlfgPresent.cpp:1323 Frame rate over 100.00ms, reseting frame timerhit 25 ms later at06:27:11.508.Your in-progress
LEONIDA_SAMPLE_MASK='0'+LEONIDA_D3D12_DRED='light'test (and-NoFrameGenif it still reproduces) will cleanly separate whether the fault is in the masked mesh draw itself, in the synchronous673 ms / 1.87 sstall colliding with Streamline FG, or in an unrelated pass.AI-assisted: yes (Antigravity).
Thanks, that makes sense: a 673 ms / 1.87 s synchronous masked compile, then Streamline's >100 ms frame-timer reset, then the removal 19–25 ms later.
I'm starting the run with -More @{LEONIDA_SAMPLE_MASK='0'; LEONIDA_D3D12_DRED='light'; LEONIDA_FG_LIMIT_FPS='0'} and -Log now, and will play 20–30 minutes without the F1 restart. I'll post the result either way, with the DRED breadcrumbs and faulting address if it crashes, then a -NoFrameGen run if needed.
One question: if the stall turns out to be the trigger, could masked twins be compiled on the background workers (drawing the unmasked pipeline, or skipping the draw, until the twin is ready), like other pipelines that are not ready yet?
Ran LEONIDA_SAMPLE_MASK='0' + LEONIDA_D3D12_DRED='light' (-SeriesS -NoFrameGen), RTX 3090, driver 621.14:
So turning the masked twins off did not stop it here; it fits hypothesis B
(a hang noticed at the next poll), still right after a new pipeline. Log attached.
AI-assisted: Claude Opus 5.5 (Anthropic) helped analyze the logs and draft this comment.
play-1202-173853-trimmed.log
(trimmed: first 300 + last 8000 lines; the middle is 24 min of normal play)
Same signature on an RTX 5080 (Windows 11): 3 sessions, 18–21 min, card only 57% busy
mandy-main.zipdownloaded 2026-12-02 ~05:52 UTC, built byscripts\play-d3d12.ps1(diag).precompile_all, VRAM and textures auto.0x887A0005. The spread says it is not on a fixed clock.LEONIDA_D3D12_DRED=faultswas on in all three and still printeddevice-removed data; none.LEONIDA_SUBMIT_SENDER=1(the new default from #3076) and died at 21 min all the same, so the submit path is not what holds it.It is not load pressure. The last per-frame line before the removal reads
the card's clock per frame: nothing of ours queued 22.8 ms (the card about 57% busy by this count), 13.4 ms of that while the submitting thread ..., and no memory line rose.The last second of the third log (Win32 messages are in the Chinese locale;
参数错误=the parameter is incorrect):The first session (frame generation 3×) died 460 ms after a burst of nine masked pipelines made on four threads (34536, 10200, 8056, 34228), the slowest taking 369.5 ms — the same shape as the 673 ms / 1.87 s stalls above, only shorter.
I have not run
LEONIDA_SAMPLE_MASK=0yet, and ninjalegxd has just reported that turning it off did not stop the removal, so this does not separate (A) from (B) either way. I can attach the trimmed excerpt (118 KB: the settings line plus the last 150 lines of each of the three crashes) and the full logs (41, 37 and 40 MB) if useful.AI-assisted: yes (log lines pulled and timed with an assistant; the runs themselves were mine).
Triage Notes
What we've established so far:
LEONIDA_SAMPLE_MASK=0and DRED enabled; no result from that run is present.What we still need from you (@KOZ-7):
main): did the device fail, and if so what DRED/fault details were recorded? A concise text summary is enough; do not attach game files.Same signature as #2821 and #3012: NVIDIA cards from the RTX 3060 to the 5080,
device-removed data; none, usually no TDR or nvlddmkm entry in the System log, and a loss from a few minutes to over an hour in. What has been measured so far, none of it a fix:LEONIDA_D3D12_BACKGROUND=0(needs Windows Developer mode) held the device on an RTX 4060 Laptop 8 GB (30 to 45 min, 5 of 5 runs, whereLEONIDA_ALLOCATOR_TRIM=1held too), an RTX 4080 SUPER (35 min) and an RTX 4070 (whereLEONIDA_ALLOCATOR_TRIM=1did not), all in #2821;LEONIDA_SAMPLE_MASK=0did not stop it in the RTX 3090 run above. If you tryLEONIDA_D3D12_BACKGROUND=0, please post how long it held. With a diagnostics build,LEONIDA_D3D12_DEBUG=1andLEONIDA_D3D12_DRED=lightplus the Windows System log at that minute are the most useful next data.Note: the project moved to https://git.leonida.now/leonida/mandy after the GitHub takedown. Update from there; older launchers still try GitHub, so take the zip from https://git.leonida.now/leonida/mandy/archive/main.zip once.