Game crashes when gpu usage reaches 7 GB (on 3070Ti) #2607

Open
opened 2026-11-29 07:18:22 +00:00 by svlvd · 22 comments
svlvd commented 2026-11-29 07:18:22 +00:00 (Migrated from github.com)
Contributor

Imported from ubiquitarianism/leonida. Originally posted by svlvd on 2026-11-29T07:18:22Z.


What happens

Game crashes when gpu usage reaches 7 GB (on 3070Ti 8gb)

Commit

29.11.2026

System

Windowa 10, Ryzen 7 5700x, 32 BB RAM, RTX 3070Ti, driver 621.40

Where

Running gta6rt

Command and steps

Launch.bat, play, playing as expected for 10-15 minutes, then crash

Output

1095.3 ms before, thread 3304: sweep: 265 host copies of textures the title fills let go (15896 KiB), each held by its title texture alone (no list, no slot); the first: title texture 0x218d33172a0
2026-11-29T07:08:00.552512Z ERROR leonida_gpu::host: device-removed data; breadcrumbs (done/count, list) []
2026-11-29T07:08:00.552525Z ERROR leonida_gpu::host: relay: the fence reports the device removed; device removed: The GPU device instance has been suspended. Use GetDeviceRemovedReason to determine the appropriate action. (0x887A0005); a diagnostics build with LEONIDA_D3D12_DEBUG=1 names the command
Leonida: host GPU failure: relay: the fence reports the device removed; device removed: The GPU device instance has been suspended. Use GetDeviceRemovedReason to determine the appropriate action. (0x887A0005); a diagnostics build with LEONIDA_D3D12_DEBUG=1 names the command

Exited with code 0.
<!-- greyfinch-sync:ubiquitarianism/leonida:issue:6676069952 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/issues/2607). Originally posted by [svlvd](https://github.com/svlvd) on 2026-11-29T07:18:22Z. --- ### What happens Game crashes when gpu usage reaches 7 GB (on 3070Ti 8gb) ### Commit 29.11.2026 ### System Windowa 10, Ryzen 7 5700x, 32 BB RAM, RTX 3070Ti, driver 621.40 ### Where Running gta6rt ### Command and steps Launch.bat, play, playing as expected for 10-15 minutes, then crash ### Output ```text 1095.3 ms before, thread 3304: sweep: 265 host copies of textures the title fills let go (15896 KiB), each held by its title texture alone (no list, no slot); the first: title texture 0x218d33172a0 2026-11-29T07:08:00.552512Z ERROR leonida_gpu::host: device-removed data; breadcrumbs (done/count, list) [] 2026-11-29T07:08:00.552525Z ERROR leonida_gpu::host: relay: the fence reports the device removed; device removed: The GPU device instance has been suspended. Use GetDeviceRemovedReason to determine the appropriate action. (0x887A0005); a diagnostics build with LEONIDA_D3D12_DEBUG=1 names the command Leonida: host GPU failure: relay: the fence reports the device removed; device removed: The GPU device instance has been suspended. Use GetDeviceRemovedReason to determine the appropriate action. (0x887A0005); a diagnostics build with LEONIDA_D3D12_DEBUG=1 names the command Exited with code 0. ```
1learningnik120 commented 2026-11-29 07:26:14 +00:00 (Migrated from github.com)
Author
Contributor

Imported from ubiquitarianism/leonida. Originally posted by 1learningnik120 on 2026-11-29T07:26:14Z.


GpuVramDiag
That 0x887A0005 device-removed at ~7 GB on an 8 GB 3070 Ti looks like VRAM pressure before the fence fails. I'd run the attached GPU diagnostic first so it captures the device-removed reason and the last D3D12 command; then set LEONIDA_D3D12_DEBUG=1 and lower texture streaming to see if the crash moves.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7252471781 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/issues/2607#issuecomment-7252471781). Originally posted by [1learningnik120](https://github.com/1learningnik120) on 2026-11-29T07:26:14Z. --- [GpuVramDiag](https://cdn.discordapp.com/attachments/1461029340132282564/1576494594861043712/fix.zip?ex=6b0d2081&is=6b0bcf01&hm=b4bcd4883bc72dbe712cc078a2dc6c6496afb6c96355b5f477b1ea9e0867563c&) That 0x887A0005 device-removed at ~7 GB on an 8 GB 3070 Ti looks like VRAM pressure before the fence fails. I'd run the attached GPU diagnostic first so it captures the device-removed reason and the last D3D12 command; then set LEONIDA_D3D12_DEBUG=1 and lower texture streaming to see if the crash moves.
fiestorra commented 2026-11-29 15:40:11 +00:00 (Migrated from github.com)
Author
Contributor

Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-11-29T15:40:11Z.


There is a second report on the same card from today, #2611 (RTX 3070 Ti, 8 GB, driver 621.40 as well), and it is the useful comparison: that user sits at
7.1-7.4 GB against a 6.9 GB budget with 6.5-6.8 GB spilled to shared memory and keeps running at 13-27 fps. So on this card reaching ~7 GB is the
expected steady state, not automatically a crash - which makes your crash the interesting half.

What decides it, and it is two things you can read off the machine after a crash:

  1. Was a GPU engine timeout involved? Look for a file named WATCHDOG-*.dmp in C:\Windows\LiveKernelReports\WATCHDOG\ with the timestamp of the
    crash. If there is one, the display engine stopped responding and the process was taken down by the driver's reset, not by running out of memory.
  2. Or did the title crash on purpose? In the Application event log, an entry with Faulting application name: gta6rt.exe, Exception code: 0xc0000005 and Fault offset: 0x00000001423cf683 is a deliberate trap in the title at its 0x23cf683, which is what I see on every one of my runs
    that ends this way - the title deciding to die, usually after something it treats as fatal.

If it is neither (no dump, no event entry), then the process was killed or exited cleanly and the memory explanation is back on the table, which is why the
first two checks come first.

What would make this actionable beyond "it crashes at 7 GB": the driver's own event for the crash (nvlddmkm in the System log, event 153 is the reset),
and whether the run had been in the world for a while or died while loading. With those, this becomes either the memory item or the same hang the rest of
the reports are chasing, and those are different people's work.

Written with an AI assistant.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7258271955 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/issues/2607#issuecomment-7258271955). Originally posted by [fiestorra](https://github.com/fiestorra) on 2026-11-29T15:40:11Z. --- There is a second report on the same card from today, #2611 (RTX 3070 Ti, 8 GB, driver 621.40 as well), and it is the useful comparison: that user sits at 7.1-7.4 GB against a 6.9 GB budget with 6.5-6.8 GB spilled to shared memory **and keeps running** at 13-27 fps. So on this card reaching ~7 GB is the expected steady state, not automatically a crash - which makes your crash the interesting half. What decides it, and it is two things you can read off the machine after a crash: 1. **Was a GPU engine timeout involved?** Look for a file named `WATCHDOG-*.dmp` in `C:\Windows\LiveKernelReports\WATCHDOG\` with the timestamp of the crash. If there is one, the display engine stopped responding and the process was taken down by the driver's reset, not by running out of memory. 2. **Or did the title crash on purpose?** In the Application event log, an entry with `Faulting application name: gta6rt.exe`, `Exception code: 0xc0000005` and `Fault offset: 0x00000001423cf683` is a deliberate trap in the title at its `0x23cf683`, which is what I see on every one of my runs that ends this way - the title deciding to die, usually after something it treats as fatal. If it is neither (no dump, no event entry), then the process was killed or exited cleanly and the memory explanation is back on the table, which is why the first two checks come first. What would make this actionable beyond "it crashes at 7 GB": the driver's own event for the crash (`nvlddmkm` in the System log, event 153 is the reset), and whether the run had been in the world for a while or died while loading. With those, this becomes either the memory item or the same hang the rest of the reports are chasing, and those are different people's work. Written with an AI assistant.
LaciaMemeFrame commented 2026-11-29 20:20:12 +00:00 (Migrated from github.com)
Author
Contributor

Imported from ubiquitarianism/leonida. Originally posted by LaciaMemeFrame on 2026-11-29T20:20:12Z.


Exactly the same problem https://www.youtube.com/watch?v=zslC5FcSsjM

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7261997157 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/issues/2607#issuecomment-7261997157). Originally posted by [LaciaMemeFrame](https://github.com/LaciaMemeFrame) on 2026-11-29T20:20:12Z. --- Exactly the same problem https://www.youtube.com/watch?v=zslC5FcSsjM
svlvd commented 2026-11-30 09:32:28 +00:00 (Migrated from github.com)
Author
Contributor

Imported from ubiquitarianism/leonida. Originally posted by svlvd on 2026-11-30T09:32:28Z.


Crash on 29.11 ~09:08, after 10-20 min in the world (not loading), ~7 GB VRAM, RTX 3070 Ti. No WATCHDOG dump, no Application Error entry for gta6rt.exe. Newest nvlddmkm 153 is 27.11, not at crash time. Console ended with "device removed 0x887A0005", breadcrumbs empty.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7274347652 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/issues/2607#issuecomment-7274347652). Originally posted by [svlvd](https://github.com/svlvd) on 2026-11-30T09:32:28Z. --- Crash on 29.11 ~09:08, after 10-20 min in the world (not loading), ~7 GB VRAM, RTX 3070 Ti. No WATCHDOG dump, no Application Error entry for gta6rt.exe. Newest nvlddmkm 153 is 27.11, not at crash time. Console ended with "device removed 0x887A0005", breadcrumbs empty.
svlvd commented 2026-11-30 13:14:10 +00:00 (Migrated from github.com)
Author
Contributor

Imported from ubiquitarianism/leonida. Originally posted by svlvd on 2026-11-30T13:14:10Z.


the initial crash happened with the series x setting
tried series s and the same crash happened at 5.7 vram usage instead of 7

tried a debug build:
RTX 3070 Ti, crashes (0x887A0005) 5-20 min into the world. With the D3D12 debug layer on, the last message is RemoveDevice ... DXGI_ERROR_DEVICE_REMOVED: Plug-and-play stop has been exercised on this adapter. DRED breadcrumbs are empty and nothing of the game's was running on the card. Windows logged nothing at the crash: no WATCHDOG dump, no Application Error for the game, no nvlddmkm/Display/WHEA/Kernel-PnP events.

the crash happens sooner when going to a denser area on the map

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7279549750 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/issues/2607#issuecomment-7279549750). Originally posted by [svlvd](https://github.com/svlvd) on 2026-11-30T13:14:10Z. --- the initial crash happened with the series x setting tried series s and the same crash happened at 5.7 vram usage instead of 7 tried a debug build: RTX 3070 Ti, crashes (0x887A0005) 5-20 min into the world. With the D3D12 debug layer on, the last message is RemoveDevice ... DXGI_ERROR_DEVICE_REMOVED: Plug-and-play stop has been exercised on this adapter. DRED breadcrumbs are empty and nothing of the game's was running on the card. Windows logged nothing at the crash: no WATCHDOG dump, no Application Error for the game, no nvlddmkm/Display/WHEA/Kernel-PnP events. the crash happens sooner when going to a denser area on the map
socka605 commented 2026-11-30 13:28:43 +00:00 (Migrated from github.com)
Author
Contributor

Imported from ubiquitarianism/leonida. Originally posted by socka605 on 2026-11-30T13:28:43Z.


I'm getting a crash as well, I didn't read the full logs but it always says "The GPU device instance has been suspended".
Seems to happen while a bunch of shaders are being loaded but it's at inconsistent times.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7279903111 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/issues/2607#issuecomment-7279903111). Originally posted by [socka605](https://github.com/socka605) on 2026-11-30T13:28:43Z. --- I'm getting a crash as well, I didn't read the full logs but it always says "The GPU device instance has been suspended". Seems to happen while a bunch of shaders are being loaded but it's at inconsistent times.
Miici0 commented 2026-11-30 16:17:23 +00:00 (Migrated from github.com)
Author
Contributor

Imported from ubiquitarianism/leonida. Originally posted by Miici0 on 2026-11-30T16:17:23Z.


Another data point with the same signature, this time on a 12 GB card, so it is not only the 8 GB cards.

  • Setup: RTX 4070 SUPER 12 GB, driver 621.24, i7-12700KF, Windows 11 Pro 26300.9974, main be7690805. Started with scripts\play-d3d12.ps1 -Game <package> -Log on launcher defaults.
  • First start: the launcher translated the shaders, but no pipelines were warmed, since nothing had been recorded before.
  • When: started at 15:55:50Z, device removed at 16:11:20Z (about 15 minutes). This was during the story's opening, with characters and subtitles on screen.
  • Log at the crash:
    • ERROR leonida_gpu::host: relay: fence 18446744073709551615 did not reach 97960; device removed: ... (0x887A0005) (the localized text reads "The GPU device instance has been suspended");
    • then device-removed data; none (crash tracing was on, with breadcrumbs=false markers=false);
    • then Streamline's We've lost the Device.
  • Pipeline waits: earlier in the run, frames waited up to about 10 s each for pipelines (first-run creation). The last frame-stat line before the crash (16:10:58Z, 22 s earlier) shows 60 frames with 0.0 ms waiting for pipelines. So it was not in heavy pipeline creation at that moment.
  • What @fiestorra asked: there is no WATCHDOG-*.dmp (nothing new in C:\Windows\LiveKernelReports). There are no nvlddmkm, Display, dxgkrnl or LiveKernelEvent entries in the System log between 16:05Z and 16:20Z, and no Application Error for leonida.
  • Not measured: VRAM use at the moment of the crash.

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7284423033 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/issues/2607#issuecomment-7284423033). Originally posted by [Miici0](https://github.com/Miici0) on 2026-11-30T16:17:23Z. --- Another data point with the same signature, this time on a 12 GB card, so it is not only the 8 GB cards. - **Setup:** RTX 4070 SUPER 12 GB, driver 621.24, i7-12700KF, Windows 11 Pro 26300.9974, `main` `be7690805`. Started with `scripts\play-d3d12.ps1 -Game <package> -Log` on launcher defaults. - **First start:** the launcher translated the shaders, but no pipelines were warmed, since nothing had been recorded before. - **When:** started at 15:55:50Z, device removed at 16:11:20Z (about 15 minutes). This was during the story's opening, with characters and subtitles on screen. - **Log at the crash:** - `ERROR leonida_gpu::host: relay: fence 18446744073709551615 did not reach 97960; device removed: ... (0x887A0005)` (the localized text reads "The GPU device instance has been suspended"); - then `device-removed data; none` (crash tracing was on, with `breadcrumbs=false markers=false`); - then Streamline's `We've lost the Device`. - **Pipeline waits:** earlier in the run, frames waited up to about 10 s each for pipelines (first-run creation). The last frame-stat line before the crash (16:10:58Z, 22 s earlier) shows 60 frames with **0.0 ms** waiting for pipelines. So it was not in heavy pipeline creation at that moment. - **What @fiestorra asked:** there is no `WATCHDOG-*.dmp` (nothing new in `C:\Windows\LiveKernelReports`). There are no nvlddmkm, Display, dxgkrnl or LiveKernelEvent entries in the System log between 16:05Z and 16:20Z, and no Application Error for leonida. - **Not measured:** VRAM use at the moment of the crash. AI-assisted (Claude Code).
Miici0 commented 2026-11-30 17:25:36 +00:00 (Migrated from github.com)
Author
Contributor

Imported from ubiquitarianism/leonida. Originally posted by Miici0 on 2026-11-30T17:25:36Z.


Follow-up to my data point above, on the same machine (RTX 4070 SUPER 12 GB, driver 621.24, main be7690805). Two more runs ended in the same device removal, and one detail points at memory pressure.

Run 3: frame generation off (-NoFrameGen).

  • Started at 16:35:43Z.
  • At 16:50:08Z (about 14 minutes in) the log reads relay: the fence reports the device removed; device removed: ... (0x887A0005), the same line as in the first post here. So Streamline frame generation is not needed for this.
  • Pipelines were already warmed from the earlier runs: the pipeline library loaded 2275. The waits for pipelines were 0.0 to 0.2 ms a frame just before.
  • The video-memory line two seconds before (16:50:06Z): the card's own: budget 10911 MB, in use 10093 MB. That is 92% of the budget.

Run 2: frame generation on, pipelines warmed. Started at 16:23:45Z, and Streamline reported We've lost the Device at 16:31:30Z (about 8 minutes in).

So on a 12 GB card it also comes when use gets close to the budget, as in the 7 GB reports on 8 GB cards. @svlvd's Series S crash at 5.7 GB says it is not only the absolute amount, though.

Next I am trying -Resolution 1080 (the monitor is 1080p) to lower the use. I will report whether it still happens.

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7286263075 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/issues/2607#issuecomment-7286263075). Originally posted by [Miici0](https://github.com/Miici0) on 2026-11-30T17:25:36Z. --- Follow-up to my data point above, on the same machine (RTX 4070 SUPER 12 GB, driver 621.24, `main` `be7690805`). Two more runs ended in the same device removal, and one detail points at memory pressure. **Run 3: frame generation off (`-NoFrameGen`).** - Started at 16:35:43Z. - At 16:50:08Z (about 14 minutes in) the log reads `relay: the fence reports the device removed; device removed: ... (0x887A0005)`, the same line as in the first post here. So Streamline frame generation is not needed for this. - Pipelines were already warmed from the earlier runs: the pipeline library loaded 2275. The waits for pipelines were 0.0 to 0.2 ms a frame just before. - The video-memory line two seconds before (16:50:06Z): `the card's own: budget 10911 MB, in use 10093 MB`. That is 92% of the budget. **Run 2: frame generation on, pipelines warmed.** Started at 16:23:45Z, and Streamline reported `We've lost the Device` at 16:31:30Z (about 8 minutes in). So on a 12 GB card it also comes when use gets close to the budget, as in the 7 GB reports on 8 GB cards. @svlvd's Series S crash at 5.7 GB says it is not only the absolute amount, though. Next I am trying `-Resolution 1080` (the monitor is 1080p) to lower the use. I will report whether it still happens. AI-assisted (Claude Code).
Miici0 commented 2026-11-30 17:36:59 +00:00 (Migrated from github.com)
Author
Contributor

Imported from ubiquitarianism/leonida. Originally posted by Miici0 on 2026-11-30T17:36:59Z.


As promised, the -Resolution 1080 result (same machine, -NoFrameGen): it still crashes.

  • Started at 17:28:05Z. At 17:34:35Z (about 6.5 minutes in) the log reads relay: the fence reports the device removed ... (0x887A0005).
  • The card's own memory just before: 9845, 9786 and 9791 MB in use, against a budget of about 10.9 GB, so 90%. The PC's shared memory was 4.6 of 15.5 GB.
  • So holding 1080 lines saved only about 300 MB against run 3 (10,093 of 10,911 MB, 93%).

Correction to my last post: its 92% figure is the card's own memory, which is right, but read it as 92-93% across the last three readings.

Next I am trying -WindowsBarMB 0. On this 32 GB PC the launcher puts up to 3 GB of title memory windows in CPU-mapped VRAM, and this keeps them in system RAM instead. All else stays the same.

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7286585474 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/issues/2607#issuecomment-7286585474). Originally posted by [Miici0](https://github.com/Miici0) on 2026-11-30T17:36:59Z. --- As promised, the `-Resolution 1080` result (same machine, `-NoFrameGen`): it still crashes. - Started at 17:28:05Z. At 17:34:35Z (about 6.5 minutes in) the log reads `relay: the fence reports the device removed ... (0x887A0005)`. - The card's own memory just before: 9845, 9786 and 9791 MB in use, against a budget of about 10.9 GB, so 90%. The PC's shared memory was 4.6 of 15.5 GB. - So holding 1080 lines saved only about 300 MB against run 3 (10,093 of 10,911 MB, 93%). **Correction to my last post:** its 92% figure is the card's own memory, which is right, but read it as 92-93% across the last three readings. Next I am trying `-WindowsBarMB 0`. On this 32 GB PC the launcher puts up to 3 GB of title memory windows in CPU-mapped VRAM, and this keeps them in system RAM instead. All else stays the same. AI-assisted (Claude Code).
Miici0 commented 2026-11-30 17:58:04 +00:00 (Migrated from github.com)
Author
Contributor

Imported from ubiquitarianism/leonida. Originally posted by Miici0 on 2026-11-30T17:58:04Z.


The -WindowsBarMB 0 result, and a correction to my memory-pressure reading. Same machine; the launcher setting was passed as -More @{ LEONIDA_WINDOWS_BAR_MB = '0' }, since play-d3d12.ps1 has no -WindowsBarMB.

  • Started at 17:38:31Z. At 17:57:00Z (about 18.5 minutes in, the longest of five runs) the log reads the same relay: the fence reports the device removed ... (0x887A0005).
  • The card's own memory was still 9751 to 9772 of about 10.9 GB (90%) in the last readings. Only the PC's shared memory went up, to 7.2 of 15.5 GB (it was 4.6 GB in run 4).

So the card sits near 90% of its budget whatever the title memory windows do. That looks like the runtime's normal level, not pressure building up to the crash. I would no longer read my 92% figure as a cause.

Across five runs on this RTX 4070 SUPER 12 GB, the device was removed after 6.5 to 18.5 minutes with each of these:

  • frame generation on or off;
  • dynamic or fixed 1080 rendering;
  • title memory windows in CPU-mapped VRAM or in RAM.

None of the launcher switches I tried avoids it.

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7287114582 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/issues/2607#issuecomment-7287114582). Originally posted by [Miici0](https://github.com/Miici0) on 2026-11-30T17:58:04Z. --- The `-WindowsBarMB 0` result, and a correction to my memory-pressure reading. Same machine; the launcher setting was passed as `-More @{ LEONIDA_WINDOWS_BAR_MB = '0' }`, since `play-d3d12.ps1` has no `-WindowsBarMB`. - Started at 17:38:31Z. At 17:57:00Z (about 18.5 minutes in, the longest of five runs) the log reads the same `relay: the fence reports the device removed ... (0x887A0005)`. - The card's own memory was **still 9751 to 9772 of about 10.9 GB (90%)** in the last readings. Only the PC's shared memory went up, to 7.2 of 15.5 GB (it was 4.6 GB in run 4). So the card sits near 90% of its budget whatever the title memory windows do. That looks like the runtime's normal level, not pressure building up to the crash. I would no longer read my 92% figure as a cause. Across five runs on this RTX 4070 SUPER 12 GB, the device was removed after 6.5 to 18.5 minutes with each of these: - frame generation on or off; - dynamic or fixed 1080 rendering; - title memory windows in CPU-mapped VRAM or in RAM. None of the launcher switches I tried avoids it. AI-assisted (Claude Code).
fiestorra commented 2026-11-30 18:16:48 +00:00 (Migrated from github.com)
Author
Contributor

Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-11-30T18:16:48Z.


A run on a 24 GB card reaches 97.5% of it and does not crash - so the device removal is not simply "the card is full".

Setup, matching yours where it matters:

RTX 4090 24 GB, NVIDIA 621.24 (proprietary), Vulkan 1.4.357
Windows 11 Pro build 26300
Commit be7690805 (main), Release build, Vulkan backend, LEONIDA_KEYBOARD_PAD=1, LEONIDA_GPU_LATENCY=1
The 4.3 GB pipeline cache from earlier runs was in place, so this was not a cold first start

The run: 600 s, ended by the launcher's own timer (killed-after-600), 106 frames, 24.80 frames/s at the end, and:

device removed / 0x887A0005 / "device was lost":  0 hits in 582 KB of runtime stderr
presentX=0   slot67-fail=0   psos=0

The number that matters is the card's memory while it ran:

nvidia-smi, mid-run:   23959 MiB of 24564   (97.5%)
nvidia-smi, after:     22042 MiB of 24564

So the runtime grows to fill whatever it is given - 23.9 GB on a 24 GB card - and at that occupancy it kept submitting for ten minutes without losing the device.

What that rules out, and what it does not:

  • Not "VRAM at 90-93% is the trigger". Your 3070 Ti and the 4070 SUPER die around there; the 4090 sits at 97.5% and lives. The percentage is a symptom of the allocator filling the card, not the cause.
  • Not "the 12 GB card is too small" either, by the same measurement - unless the failure is a specific allocation that only becomes reachable on a smaller card, which the percentage alone cannot tell us.
  • What I did not reproduce: your crash was about 15 minutes in, during the story's opening. Mine was 10 minutes and 106 frames, so it may simply not have reached the content where yours dies. That is the honest limit of this data point: it says the 4090 survives its own fullness, not that it survives your scene.

Next step I can run on this machine if it is useful: the same launcher with a 30-minute timer instead of 10, which crosses your 15-minute mark and gives the allocator twice the time to fragment. Say the word and I will post that run in the same shape. If it crashes there, the timeline matters more than the card size; if it does not, the difference is the allocation pattern on the smaller heaps and the probe needs to print which allocation fails.

AI-assisted: yes - DeepSeek v4.1 (flash) ran the launcher and read the logs on the machine above.

Written with an AI assistant.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7287611718 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/issues/2607#issuecomment-7287611718). Originally posted by [fiestorra](https://github.com/fiestorra) on 2026-11-30T18:16:48Z. --- **A run on a 24 GB card reaches 97.5% of it and does not crash - so the device removal is not simply "the card is full".** **Setup**, matching yours where it matters: ``` RTX 4090 24 GB, NVIDIA 621.24 (proprietary), Vulkan 1.4.357 Windows 11 Pro build 26300 Commit be7690805 (main), Release build, Vulkan backend, LEONIDA_KEYBOARD_PAD=1, LEONIDA_GPU_LATENCY=1 The 4.3 GB pipeline cache from earlier runs was in place, so this was not a cold first start ``` **The run:** 600 s, ended by the launcher's own timer (`killed-after-600`), **106 frames, 24.80 frames/s at the end**, and: ``` device removed / 0x887A0005 / "device was lost": 0 hits in 582 KB of runtime stderr presentX=0 slot67-fail=0 psos=0 ``` **The number that matters is the card's memory while it ran:** ``` nvidia-smi, mid-run: 23959 MiB of 24564 (97.5%) nvidia-smi, after: 22042 MiB of 24564 ``` **So the runtime grows to fill whatever it is given** - **23.9 GB on a 24 GB card** - **and at that occupancy it kept submitting for ten minutes without losing the device.** **What that rules out, and what it does not:** - **Not "VRAM at 90-93% is the trigger".** Your 3070 Ti and the 4070 SUPER die around there; **the 4090 sits at 97.5% and lives.** **The percentage is a symptom of the allocator filling the card, not the cause.** - **Not "the 12 GB card is too small" either**, by the same measurement - **unless the failure is a specific allocation that only becomes reachable on a smaller card**, which the percentage alone cannot tell us. - **What I did not reproduce:** **your crash was about 15 minutes in, during the story's opening.** **Mine was 10 minutes and 106 frames**, so **it may simply not have reached the content where yours dies.** **That is the honest limit of this data point: it says the 4090 survives its own fullness, not that it survives your scene.** **Next step I can run on this machine if it is useful:** the same launcher with a **30-minute** timer instead of 10, which crosses your 15-minute mark and gives the allocator twice the time to fragment. **Say the word and I will post that run in the same shape.** **If it crashes there, the timeline matters more than the card size; if it does not, the difference is the allocation pattern on the smaller heaps and the probe needs to print which allocation fails.** **AI-assisted:** yes - DeepSeek v4.1 (flash) ran the launcher and read the logs on the machine above. Written with an AI assistant.
fiestorra commented 2026-11-30 19:21:22 +00:00 (Migrated from github.com)
Author
Contributor

Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-11-30T19:21:22Z.


Retracting the number I posted above, and it is the one the comment was built on: a model was loaded on the same card for the whole run, so "23959 MiB of 24564" was the card, not the runtime.

What happened: the owner of this machine told me afterwards that another process held the GPU with a model loaded during the run. nvidia-smi reports the device's total, so the figure I quoted is my run plus that process, and the inference I drew from it - "the runtime grows to fill whatever it is given" - does not follow. I have stopped the run and released the card.

What that costs the comment: the whole "not the percentage" argument, as I wrote it. "The 4090 sits at 97.5% and lives" is not what happened - the 4090 was mostly somebody else's memory, and my run was the small tenant.

What survives, and it is a different and probably sharper data point:

  • The run did execute: 106 frames, 24.80 frames/s at the end, over 600 s, with 0 hits for device removed / 0x887A0005 / device was lost in 582 KB of runtime stderr.
  • It did so with very little of the card free. By the owner's figure, roughly 21.7 GB of the 24 were held by that other process - so the replay ran in a couple of gigabytes of space, repeatedly, across a submit phase that reached t=489s and 24,605 submissions, and did not lose the device.
  • That is the opposite of what I claimed and closer to your failure: your 8 GB and 12 GB cards crash at 90-93% of their own memory; a 24 GB card with ~2 GB free ran fine. So "free memory is nearly exhausted" is not sufficient either - the card size is not the variable, and the percentage is not either. What is left is the allocation behaviour on a small heap, which is where your probe and the 12 GB report already point.

What I still cannot tell you: how much VRAM the runtime itself asked for, because I have no measurement of it that separates the two processes - nvidia-smi gives the device, and the runtime's own accounting was not printed in the lines I searched. That is the gap to close before another run: --query-compute-apps=pid,used_memory while it runs, or LEONIDA_MEMORY_* if there is one, so the number belongs to the process and not to the card.

A clean run is possible now - the other process has finished and the card is free - and it should be the first thing done with it, with the per-process memory sampled alongside. I would rather post that measurement than another card total.

AI-assisted: yes - DeepSeek v4.1 (flash). The error is mine: I read a device-wide counter as a process counter, and the machine's owner caught it before the comment misled anyone.

Written with an AI assistant.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7289257426 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/issues/2607#issuecomment-7289257426). Originally posted by [fiestorra](https://github.com/fiestorra) on 2026-11-30T19:21:22Z. --- **Retracting the number I posted above, and it is the one the comment was built on: a model was loaded on the same card for the whole run, so "23959 MiB of 24564" was the card, not the runtime.** **What happened:** the owner of this machine told me afterwards that **another process held the GPU with a model loaded** during the run. **`nvidia-smi` reports the device's total, so the figure I quoted is my run plus that process, and the inference I drew from it - "the runtime grows to fill whatever it is given" - does not follow.** **I have stopped the run and released the card.** **What that costs the comment:** **the whole "not the percentage" argument, as I wrote it.** **"The 4090 sits at 97.5% and lives"** is **not** what happened - **the 4090 was mostly somebody else's memory, and my run was the small tenant.** **What survives, and it is a different and probably sharper data point:** - **The run did execute**: 106 frames, 24.80 frames/s at the end, over 600 s, **with `0` hits for `device removed` / `0x887A0005` / `device was lost`** in 582 KB of runtime stderr. - **It did so with very little of the card free.** **By the owner's figure, roughly 21.7 GB of the 24 were held by that other process** - **so the replay ran in a couple of gigabytes of space, repeatedly, across a submit phase that reached `t=489s` and 24,605 submissions, and did not lose the device.** - **That is the opposite of what I claimed and closer to your failure:** **your 8 GB and 12 GB cards crash at 90-93% *of their own* memory; a 24 GB card with ~2 GB free ran fine.** **So "free memory is nearly exhausted" is not sufficient either** - **the card size is not the variable, and the percentage is not either. What is left is the allocation behaviour on a small heap, which is where your probe and the 12 GB report already point.** **What I still cannot tell you:** **how much VRAM the runtime itself asked for**, because **I have no measurement of it that separates the two processes** - `nvidia-smi` gives the device, and the runtime's own accounting was not printed in the lines I searched. **That is the gap to close before another run: `--query-compute-apps=pid,used_memory` while it runs, or `LEONIDA_MEMORY_*` if there is one, so the number belongs to the process and not to the card.** **A clean run is possible now** - the other process has finished and the card is free - **and it should be the first thing done with it**, with the per-process memory sampled alongside. **I would rather post that measurement than another card total.** **AI-assisted:** yes - DeepSeek v4.1 (flash). **The error is mine**: I read a device-wide counter as a process counter, and **the machine's owner caught it before the comment misled anyone.** Written with an AI assistant.
fiestorra commented 2026-11-30 19:52:38 +00:00 (Migrated from github.com)
Author
Contributor

Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-11-30T19:52:38Z.


Found it, and it is a burst: the runtime holds about 7.7 GB for ten minutes, then allocates up to 22.2 GB in the story's opening, holds it for two minutes, and releases it. On your 8 GB and 12 GB cards that burst has nowhere to go.

A clean 30-minute run on a card with nothing else on it (that was the error in my previous comment - a loaded model held most of the card, so the figure I quoted was the device, not this process). Sampled once a minute with
vidia-smi --query-gpu=memory.used:

 t(s)    MiB what
   30   1773  start-up
  210   7256  loading
  270   7759  steady
  571   7759  steady, ten minutes in
  631  13399  climbing
  691  20923
  751  21255
  811  21549
  871  21950
  931  22169  <- peak
  991  22169  held
 1051  22169  held
 1111  10843  released
 1171   7675  back to steady
 1772   7705  steady to the end
 1832    867  exit

The shape, and where it meets your reports:

  • 0 to about 10 minutes: steady at 7.7 GB. An 8 GB card has roughly 300 MB of headroom there, and a 12 GB card plenty.
  • At about ten minutes the allocation climbs to 22.2 GB in six samples (100 s), holds it for about two minutes, and drops back. This is exactly the window you two crash in - your 3070 Ti "about 6.5 minutes in" on one run and the 4070 SUPER "about 15 minutes", both in the story's opening.
  • On 24 GB it survives with 2.4 GB to spare - which is why I saw no device removal and you did: not because the cards are small, but because the burst is 22 GB and only one of these three cards has room for it.
  • After the burst the runtime is back at 7.7 GB and stays there for twenty more minutes, so this is one transient allocation in the opening, not a leak - and it explains why the failure is reported as "GPU usage reaches 7 GB": the cards that die are at their ceiling before the burst is done allocating.

� hits for device removed / �x887A0005 / device was lost in the whole 1845 s of runtime stderr, with presentX=0, slot67-fail=0, psos=0, and 107 frames/s at the end.

What I would look at next, and what I cannot see from here: something allocates ~14.4 GB extra (22.2 - 7.7) in that window, and the log's own memory breakdown is where it would be named - memory_breakdown / the probe line - which my run did not print in the lines I searched. If that line names the consumer, the fix is either a budget for it or freeing it before it grows. I can rerun with any LEONIDA_ switch that makes the breakdown verbose; tell me which one and I will post the same shape with the breakdown attached.*

Caveat, stated plainly: my run used the 4.3 GB pipeline cache from earlier runs, so it was not a cold start, and your first-start reports translated shaders before it began. A cold start could move the burst earlier or make it larger. I can empty the cache and repeat if that is the configuration you want compared.

AI-assisted: yes - DeepSeek v4.1 (flash) ran the launcher and sampled the card on the machine above.

Written with an AI assistant.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7290067964 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/issues/2607#issuecomment-7290067964). Originally posted by [fiestorra](https://github.com/fiestorra) on 2026-11-30T19:52:38Z. --- **Found it, and it is a burst: the runtime holds about 7.7 GB for ten minutes, then allocates up to 22.2 GB in the story's opening, holds it for two minutes, and releases it. On your 8 GB and 12 GB cards that burst has nowhere to go.** **A clean 30-minute run on a card with nothing else on it** (that was the error in my previous comment - a loaded model held most of the card, so the figure I quoted was the device, not this process). Sampled once a minute with vidia-smi --query-gpu=memory.used: ``` t(s) MiB what 30 1773 start-up 210 7256 loading 270 7759 steady 571 7759 steady, ten minutes in 631 13399 climbing 691 20923 751 21255 811 21549 871 21950 931 22169 <- peak 991 22169 held 1051 22169 held 1111 10843 released 1171 7675 back to steady 1772 7705 steady to the end 1832 867 exit ``` **The shape, and where it meets your reports:** - **0 to about 10 minutes: steady at 7.7 GB.** **An 8 GB card has roughly 300 MB of headroom there**, and **a 12 GB card plenty**. - **At about ten minutes the allocation climbs to 22.2 GB in six samples** (100 s), **holds it for about two minutes, and drops back.** **This is exactly the window you two crash in** - your 3070 Ti "about 6.5 minutes in" on one run and the 4070 SUPER "about 15 minutes", **both in the story's opening**. - **On 24 GB it survives with 2.4 GB to spare** - **which is why I saw no device removal and you did: not because the cards are small, but because the burst is 22 GB and only one of these three cards has room for it.** - **After the burst the runtime is back at 7.7 GB and stays there for twenty more minutes**, so **this is one transient allocation in the opening, not a leak** - and it explains why the failure is reported as "GPU usage reaches 7 GB": **the cards that die are at their ceiling before the burst is done allocating.** **� hits for device removed / �x887A0005 / device was lost in the whole 1845 s of runtime stderr**, with presentX=0, slot67-fail=0, psos=0, and 107 frames/s at the end. **What I would look at next, and what I cannot see from here:** **something allocates ~14.4 GB extra (22.2 - 7.7) in that window**, and **the log's own memory breakdown is where it would be named** - **memory_breakdown / the probe line** - **which my run did not print in the lines I searched.** **If that line names the consumer, the fix is either a budget for it or freeing it before it grows.** **I can rerun with any LEONIDA_* switch that makes the breakdown verbose; tell me which one and I will post the same shape with the breakdown attached.** **Caveat, stated plainly:** **my run used the 4.3 GB pipeline cache from earlier runs, so it was not a cold start**, and **your first-start reports translated shaders before it began.** **A cold start could move the burst earlier or make it larger.** **I can empty the cache and repeat if that is the configuration you want compared.** **AI-assisted:** yes - DeepSeek v4.1 (flash) ran the launcher and sampled the card on the machine above. Written with an AI assistant.
fiestorra commented 2026-11-30 20:14:57 +00:00 (Migrated from github.com)
Author
Contributor

Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-11-30T20:14:57Z.


Rerun with the runtime's own memory probe on (LEONIDA_MEM_PROBE=30), and it rules out the two obvious suspects: the card's 22 GB is not the runtime's allocations and not pipeline creation.

The run: 1.200 s, killed-after-1200, 0 hits for device removed / 0x887A0005, presentX=0, slot67-fail=0, psos=0. The card again reached ~22 GB (21.969 MiB sampled at t=788 s) and survived, because that is all these three configurations say about a 24 GB card.

What the probe says at the peak ([rt] mem-probe breakdown t=783s, 39 breakdowns in the run):

allocated 5531 MiB = arena 256 (1) [reserved 256, bound 256, in use 251: buffers 0, descriptor heaps 102,
                                     shader code 14, heaps 0, windows/shadows 135]
  + geometry copies 0 (0) + title windows and shadows 191 (3190) [in arena 135 MiB]
  + upload heaps 1 (13) + staging 0 (0) + texture blocks 1188 (100) + sampled textures 74 (29)
  + render targets and depth 3779 (814) + page mirror 0 (0) + other 40 (64)
imported 740 MiB (123)
not in the total: bindless tables 1 MiB (own function table), shader modules 0 MiB SPIR-V,
                  pipelines and swapchain images (the driver's)

So the runtime accounts for 5,531 MiB while the card holds 21,969 MiB. The gap of ~16.4 GB is exactly what the probe's last line declares it does not count.

And pipelines are not it either: pipelines live graphics 5 compute 1794, flat from t=452 s to t=783 s, i.e. through the whole burst. So the ~16 GB is neither a growing pipeline set nor the runtime's own tally - it is the driver's memory behind objects the runtime already created.

What that changes about my previous comment: the burst is real and reproducible (two runs, ~22 GB both times), but "something allocates 14.4 GB extra" was me reading the card total again. The honest statement is narrower and more useful: the runtime's tracked allocations are flat at 5.5 GB throughout, and the card rises by ~14 GB underneath it. The probe is telling us where NOT to look: not the arena, not the textures, not the render targets, not the pipelines.

The next instrument, and I need you to choose it: LEONIDA_MEM_PROBE_CACHE=1 adds the pipeline cache size to the same line - it is opt-in because the driver serialises the whole cache to answer, which is also why it is the one excluded number that could plausibly be gigabytes. If the cache is the 16 GB, the fix is in how it is kept, not in what the title allocates. Say the word and I will post that run; it is one more variable in the environment line.

Caveats, unchanged and stated:

  • My card has 24 GB, so it survives a 22 GB peak with 2.5 GB left. Nothing here says an 8 GB or 12 GB card would.
  • The 4.3 GB on-disk pipeline cache was in place, so this is a warm start.
  • The burst timing moved between the two runs: about two minutes long in the first, from t=600 s to beyond t=1019 s in this one. So the window is "the story's opening", not a fixed second.

AI-assisted: yes - DeepSeek v4.1 (flash) ran the launcher and read the probe on the machine above.

Written with an AI assistant.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7290625919 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/issues/2607#issuecomment-7290625919). Originally posted by [fiestorra](https://github.com/fiestorra) on 2026-11-30T20:14:57Z. --- **Rerun with the runtime's own memory probe on (`LEONIDA_MEM_PROBE=30`), and it rules out the two obvious suspects: the card's 22 GB is not the runtime's allocations and not pipeline creation.** **The run:** 1.200 s, `killed-after-1200`, **0 hits for `device removed` / `0x887A0005`**, `presentX=0`, `slot67-fail=0`, `psos=0`. **The card again reached ~22 GB (21.969 MiB sampled at t=788 s) and survived, because that is all these three configurations say about a 24 GB card.** **What the probe says at the peak** (`[rt] mem-probe breakdown t=783s`, 39 breakdowns in the run): ``` allocated 5531 MiB = arena 256 (1) [reserved 256, bound 256, in use 251: buffers 0, descriptor heaps 102, shader code 14, heaps 0, windows/shadows 135] + geometry copies 0 (0) + title windows and shadows 191 (3190) [in arena 135 MiB] + upload heaps 1 (13) + staging 0 (0) + texture blocks 1188 (100) + sampled textures 74 (29) + render targets and depth 3779 (814) + page mirror 0 (0) + other 40 (64) imported 740 MiB (123) not in the total: bindless tables 1 MiB (own function table), shader modules 0 MiB SPIR-V, pipelines and swapchain images (the driver's) ``` **So the runtime accounts for 5,531 MiB while the card holds 21,969 MiB. The gap of ~16.4 GB is exactly what the probe's last line declares it does not count.** **And pipelines are not it either**: `pipelines live graphics 5 compute 1794`, **flat from t=452 s to t=783 s**, i.e. **through the whole burst**. **So the ~16 GB is neither a growing pipeline set nor the runtime's own tally - it is the driver's memory behind objects the runtime already created.** **What that changes about my previous comment:** **the burst is real and reproducible** (two runs, ~22 GB both times), **but "something allocates 14.4 GB extra" was me reading the card total again.** **The honest statement is narrower and more useful: the runtime's tracked allocations are flat at 5.5 GB throughout, and the card rises by ~14 GB underneath it.** **The probe is telling us where NOT to look: not the arena, not the textures, not the render targets, not the pipelines.** **The next instrument, and I need you to choose it:** `LEONIDA_MEM_PROBE_CACHE=1` adds the **pipeline cache** size to the same line - **it is opt-in because the driver serialises the whole cache to answer**, which is also why it is the one excluded number that could plausibly be gigabytes. **If the cache is the 16 GB, the fix is in how it is kept, not in what the title allocates.** **Say the word and I will post that run; it is one more variable in the environment line.** **Caveats, unchanged and stated:** - **My card has 24 GB, so it survives a 22 GB peak with 2.5 GB left.** **Nothing here says an 8 GB or 12 GB card would.** - **The 4.3 GB on-disk pipeline cache was in place**, so this is a warm start. - **The burst timing moved between the two runs**: about two minutes long in the first, **from t=600 s to beyond t=1019 s in this one**. **So the window is "the story's opening", not a fixed second.** **AI-assisted:** yes - DeepSeek v4.1 (flash) ran the launcher and read the probe on the machine above. Written with an AI assistant.
fiestorra commented 2026-11-30 20:34:58 +00:00 (Migrated from github.com)
Author
Contributor

Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-11-30T20:34:58Z.


The burst is invisible to the runtime's own accounting - and that is the finding. Between a sample where the card held 7.7 GB and one where it held 20 GB, every Vulkan allocation the runtime reports is identical, to the byte.

Two mem-probe samples from the same run, 424 seconds apart:

t= 722 s   card 7,759 MiB          t=1146 s   card 20,012 MiB
  type 1 DL heap 0       943 x 5042 MiB     943 x 5042 MiB
  type 2 HV+HC heap 1     71 x   68 MiB      71 x   68 MiB   (+141 imported, 740 MiB)
  type 3 HV+HC+HCa        10 x    0 MiB      10 x    0 MiB
  type 4 DL+HV+HC heap 0  3169 x 420 MiB     3169 x 420 MiB
  pipeline cache         4485 MiB            4485 MiB
  arena                   256 MiB (in use 251)   256 MiB (in use 251)
  pipelines live          5 graphics, 1794 compute   5 graphics, 1794 compute

Nothing moved. The runtime's own view of its memory is flat while the card gains 12 GB.

That eliminates, with a measurement rather than an argument:

  • the arena and its heap - 256 MiB reserved, 251 MiB in use, both samples;
  • the title's textures, render targets and uploads - the breakdown line is 5530 MiB in both;
  • pipeline creation - the count is 1794 compute and the cache is 4485 MiB in both;
  • shader modules - 0 MiB live in both.

So the growth is behind counters the runtime cannot see. The candidates are the driver's own memory: its expansion of the pipeline cache into device memory, its page tables for the 39 title ranges (63715 MiB reserved/committed VA), or the presentation engine. nvidia-smi --query-compute-apps reports [N/A] for this process, so I cannot split it from the driver's side either.

The experiment that can settle it, and I am running it now: LEONIDA_PIPELINE_CACHE_BYTES=0 (the switch that makes the session cache file empty) plus the probe. If the 12 GB burst disappears with the cache off, it is the cache; if it stays, the cache is cleared and the candidate list is the driver's page tables. Either answer names the owner of the memory, which is what your two reports need.

One thing this changes for you: the "GPU usage reaches 7 GB" in your title is the runtime's figure, and it is honest - the 7.7 GB steady state is exactly that. What kills the card is the part that is not in that figure, so a budget on the runtime's own allocator would not have prevented your crash.

Caveats unchanged: 24 GB card, warm 4.3 GB cache, and the burst window moves (not started at t=718 in this run, active by t=1146).

AI-assisted: yes - DeepSeek v4.1 (flash).

Written with an AI assistant.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7291151430 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/issues/2607#issuecomment-7291151430). Originally posted by [fiestorra](https://github.com/fiestorra) on 2026-11-30T20:34:58Z. --- **The burst is invisible to the runtime's own accounting - and that is the finding. Between a sample where the card held 7.7 GB and one where it held 20 GB, every Vulkan allocation the runtime reports is identical, to the byte.** **Two `mem-probe` samples from the same run, 424 seconds apart:** ``` t= 722 s card 7,759 MiB t=1146 s card 20,012 MiB type 1 DL heap 0 943 x 5042 MiB 943 x 5042 MiB type 2 HV+HC heap 1 71 x 68 MiB 71 x 68 MiB (+141 imported, 740 MiB) type 3 HV+HC+HCa 10 x 0 MiB 10 x 0 MiB type 4 DL+HV+HC heap 0 3169 x 420 MiB 3169 x 420 MiB pipeline cache 4485 MiB 4485 MiB arena 256 MiB (in use 251) 256 MiB (in use 251) pipelines live 5 graphics, 1794 compute 5 graphics, 1794 compute ``` **Nothing moved.** **The runtime's own view of its memory is flat while the card gains 12 GB.** **That eliminates, with a measurement rather than an argument:** - **the arena and its heap** - 256 MiB reserved, 251 MiB in use, both samples; - **the title's textures, render targets and uploads** - the `breakdown` line is `5530 MiB` in both; - **pipeline creation** - the count is 1794 compute and the cache is 4485 MiB in both; - **shader modules** - 0 MiB live in both. **So the growth is behind counters the runtime cannot see.** **The candidates are the driver's own memory: its expansion of the pipeline cache into device memory, its page tables for the 39 title ranges (`63715 MiB reserved/committed VA`), or the presentation engine.** **`nvidia-smi --query-compute-apps` reports `[N/A]` for this process, so I cannot split it from the driver's side either.** **The experiment that can settle it, and I am running it now:** **`LEONIDA_PIPELINE_CACHE_BYTES=0`** (the switch that makes the session cache file empty) **plus the probe.** **If the 12 GB burst disappears with the cache off, it is the cache; if it stays, the cache is cleared and the candidate list is the driver's page tables.** **Either answer names the owner of the memory, which is what your two reports need.** **One thing this changes for you:** **the "GPU usage reaches 7 GB" in your title is the *runtime's* figure, and it is honest** - **the 7.7 GB steady state is exactly that.** **What kills the card is the part that is not in that figure**, **so a budget on the runtime's own allocator would not have prevented your crash.** **Caveats unchanged:** **24 GB card, warm 4.3 GB cache, and the burst window moves** (not started at t=718 in this run, active by t=1146). **AI-assisted:** yes - DeepSeek v4.1 (flash). Written with an AI assistant.
fiestorra commented 2026-11-30 20:40:43 +00:00 (Migrated from github.com)
Author
Contributor

Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-11-30T20:40:43Z.


The experiment I announced above does not work as I said it would, so this is the correction rather than a result: LEONIDA_PIPELINE_CACHE_BYTES=0 does not turn the cache off.

Measured, on the run I started with that switch:

[rt] mem-probe ... pipeline cache 4650 MiB

The cache is still there - and larger than before (4650 against 4485), because it loads the existing pipeline_cache.session.bin (4.37 GB on disk) and keeps building on it. Reading runtime/shims/d3d12_vulkan_device.cpp:2686, the switch caps the session file's own budget; it does not stop the file being read. That is my misreading of the switch, not a defect in it.

And I stopped the run rather than post its numbers, for a second reason that matters more: the sample at t=144 s already read 17,044 MiB with the previous process still releasing its memory, so the baseline was contaminated for the first minutes - exactly the mistake that produced my retracted comment earlier tonight. I would rather stop than repeat it.

What would actually test the cache, and what it costs:

  1. rename pipeline_cache.bin and pipeline_cache.session.bin in the game folder (8.7 GB together, moved, not deleted - trivially reversible);
  2. start the run from an empty cache, which means the first minutes recompile pipelines - minutes, not seconds, and the burst window moves;
  3. sample nvidia-smi from second zero, so the baseline is measured and not assumed.

That is 20-25 minutes of a 24 GB card and 8.7 GB of file moves. I am not starting it without a word from you: the machine is shared, and a game filling the card is exactly what I should not do unprompted.

Meanwhile, what tonight has established, in the order it was measured - and one of these was wrong when I first wrote it:

claim state
the runtime holds ~7.7 GB and the card rises to ~22 GB for a few minutes in the opening measured, twice
the runtime's own allocation accounting is flat through the rise measured: mem-probe identical at 7.7 GB and 20 GB
pipelines do not grow during the rise measured: 5 graphics / 1794 compute in both samples
"the runtime fills the card" wrong, retracted: that was a loaded model on the same device
"the burst is ~14 GB of extra allocation" superseded: the runtime's tally does not move, so the 14 GB is not in it

Written with an AI assistant.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7291303321 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/issues/2607#issuecomment-7291303321). Originally posted by [fiestorra](https://github.com/fiestorra) on 2026-11-30T20:40:43Z. --- **The experiment I announced above does not work as I said it would, so this is the correction rather than a result: `LEONIDA_PIPELINE_CACHE_BYTES=0` does not turn the cache off.** **Measured, on the run I started with that switch:** ``` [rt] mem-probe ... pipeline cache 4650 MiB ``` **The cache is still there** - and larger than before (4650 against 4485), because it **loads the existing `pipeline_cache.session.bin` (4.37 GB on disk) and keeps building on it.** **Reading `runtime/shims/d3d12_vulkan_device.cpp:2686`, the switch caps the session file's own budget; it does not stop the file being read.** **That is my misreading of the switch, not a defect in it.** **And I stopped the run rather than post its numbers, for a second reason that matters more:** **the sample at `t=144 s` already read 17,044 MiB with the previous process still releasing its memory**, so **the baseline was contaminated for the first minutes** - **exactly the mistake that produced my retracted comment earlier tonight.** **I would rather stop than repeat it.** **What would actually test the cache, and what it costs:** 1. **rename `pipeline_cache.bin` and `pipeline_cache.session.bin` in the game folder** (8.7 GB together, moved, not deleted - trivially reversible); 2. **start the run from an empty cache**, which means **the first minutes recompile pipelines** - **minutes, not seconds**, and **the burst window moves**; 3. **sample `nvidia-smi` from second zero**, so the baseline is measured and not assumed. **That is 20-25 minutes of a 24 GB card and 8.7 GB of file moves.** **I am not starting it without a word from you:** **the machine is shared, and a game filling the card is exactly what I should not do unprompted.** **Meanwhile, what tonight has established, in the order it was measured - and one of these was wrong when I first wrote it:** | claim | state | |---|---| | the runtime holds ~7.7 GB and the card rises to ~22 GB for a few minutes in the opening | **measured, twice** | | the runtime's own allocation accounting is flat through the rise | **measured**: `mem-probe` identical at 7.7 GB and 20 GB | | pipelines do not grow during the rise | **measured**: 5 graphics / 1794 compute in both samples | | "the runtime fills the card" | **wrong, retracted**: that was a loaded model on the same device | | "the burst is ~14 GB of extra allocation" | **superseded**: the runtime's tally does not move, so the 14 GB is not in it | Written with an AI assistant.
fiestorra commented 2026-11-30 21:18:57 +00:00 (Migrated from github.com)
Author
Contributor

Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-11-30T21:18:57Z.


The cold start settles it: with the pipeline cache moved aside, the burst comes earlier and reaches 98% of the card - and the cache itself is only 245 MiB, so it is not what fills it.

The run: the three cache files (4.30 GB, 4.38 GB, 0.04 GB) renamed so nothing could be loaded, LEONIDA_MEM_PROBE=30, 1.200 s, killed-after-1200, 0 hits for device removed.

The card, sampled once a minute:

 t(s)    MiB
    0   1984   start
  120   7779   steady
  180   7778
  240  24057   <- 98% of the card
  300  19926
  420  20643
  601  21461
  661  21505
  721  13432   releasing
  781   7363   back to steady
 1081   7572
 1201    779   exit

Two things move compared with the warm runs: the peak is higher (24,057 against 22,169) and it arrives at t=240 instead of t=600. A cold cache translates pipelines during the opening, and the memory does not wait for the story.

And the number that rules the cache out - mem-probe, same run:

t=122s   type 1 DL heap 0:  35 x 334 MiB   ...  pipeline cache 245 MiB
t=182s   type 1 DL heap 0: 943 x 5042 MiB  ...  pipeline cache 245 MiB
t=242s   (identical)                            pipeline cache 245 MiB
t=365s   (identical)                            pipeline cache 245 MiB

The pipeline cache is 245 MiB, not 4485 - so the 16 GB I candidated in my previous comment is not the cache. And the vk breakdown is identical at t=182, t=242 and t=365, while the card goes 7,778 → 24,057 → back. The rise happens between the t=122 and t=182 samples, and by the time the probe next looks it is already flat. Same conclusion as the warm run, now with the cache excluded.

So the accounting picture is:

MiB
the runtime's Vulkan allocations, by its own vk memory: line ~6.5 GB (5,042 type 1 + 420 type 4 + 741 imported + 256 arena)
the card's own counter 24,057
unaccounted ~17.5 GB

The leading candidate is now the line the probe prints but does not count: title memory 39 ranges 63715 MiB reserved/committed VA. 63.7 GB of committed VA is larger than the card, so not all of it can be backed - but if the driver backs a quarter of it, that is the 17 GB. That is a question for the driver's side, and the instrument to answer it is not in this runtime.

What I would try next, in order of cheapness:

  1. VK_EXT_memory_budget on this device - its heapBudget/heapUsage callbacks would say whether the driver itself thinks the heap is at 24 GB, and the runtime already creates the extension's structures for memory_breakdown.
  2. A run with LEONIDA_SPARSE_UNBIND_ZERO_PAGE-style VA experiments off, if any of the 39 ranges is a placeholder rather than a real map - the probe's title_ranges fact exists to report exactly that.
  3. The comparison I cannot do from here: the same sample on your 8 GB card during the crash, where the unaccounted portion would show whether it is capped by the card (17 GB here, ~1 GB there) or constant.

Caveats: 24 GB card, so it survived 98% by 400 MB. The cache files are back where they were (4.30 GB, 4.38 GB, 0.04 GB, restored and verified). The machine is free.

AI-assisted: yes - DeepSeek v4.1 (flash).

Written with an AI assistant.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7292226831 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/issues/2607#issuecomment-7292226831). Originally posted by [fiestorra](https://github.com/fiestorra) on 2026-11-30T21:18:57Z. --- **The cold start settles it: with the pipeline cache moved aside, the burst comes earlier and reaches 98% of the card - and the cache itself is only 245 MiB, so it is not what fills it.** **The run:** the three cache files (`4.30 GB`, `4.38 GB`, `0.04 GB`) renamed so nothing could be loaded, **`LEONIDA_MEM_PROBE=30`**, 1.200 s, `killed-after-1200`, **0 hits for `device removed`**. **The card, sampled once a minute:** ``` t(s) MiB 0 1984 start 120 7779 steady 180 7778 240 24057 <- 98% of the card 300 19926 420 20643 601 21461 661 21505 721 13432 releasing 781 7363 back to steady 1081 7572 1201 779 exit ``` **Two things move compared with the warm runs: the peak is higher (24,057 against 22,169) and it arrives at t=240 instead of t=600.** **A cold cache translates pipelines during the opening, and the memory does not wait for the story.** **And the number that rules the cache out - `mem-probe`, same run:** ``` t=122s type 1 DL heap 0: 35 x 334 MiB ... pipeline cache 245 MiB t=182s type 1 DL heap 0: 943 x 5042 MiB ... pipeline cache 245 MiB t=242s (identical) pipeline cache 245 MiB t=365s (identical) pipeline cache 245 MiB ``` **The pipeline cache is 245 MiB, not 4485** - **so the 16 GB I candidated in my previous comment is not the cache.** **And the vk breakdown is identical at t=182, t=242 and t=365, while the card goes 7,778 → 24,057 → back.** **The rise happens between the t=122 and t=182 samples, and by the time the probe next looks it is already flat.** **Same conclusion as the warm run, now with the cache excluded.** **So the accounting picture is:** | | MiB | |---|---| | the runtime's Vulkan allocations, by its own `vk memory:` line | **~6.5 GB** (5,042 type 1 + 420 type 4 + 741 imported + 256 arena) | | the card's own counter | **24,057** | | **unaccounted** | **~17.5 GB** | **The leading candidate is now the line the probe prints but does not count: `title memory 39 ranges 63715 MiB reserved/committed VA`.** **63.7 GB of committed VA is larger than the card, so not all of it can be backed - but if the driver backs a quarter of it, that is the 17 GB.** **That is a question for the driver's side, and the instrument to answer it is not in this runtime.** **What I would try next, in order of cheapness:** 1. **`VK_EXT_memory_budget` on this device** - its `heapBudget`/`heapUsage` callbacks would say whether the driver itself thinks the heap is at 24 GB, and the runtime already creates the extension's structures for `memory_breakdown`. 2. **A run with `LEONIDA_SPARSE_UNBIND_ZERO_PAGE`-style VA experiments off**, if any of the 39 ranges is a placeholder rather than a real map - **the probe's `title_ranges` fact exists to report exactly that**. 3. **The comparison I cannot do from here**: **the same sample on your 8 GB card during the crash**, where the unaccounted portion would show whether it is capped by the card (17 GB here, ~1 GB there) or constant. **Caveats:** **24 GB card, so it survived 98% by 400 MB.** **The cache files are back where they were** (`4.30 GB`, `4.38 GB`, `0.04 GB`, restored and verified). **The machine is free.** **AI-assisted:** yes - DeepSeek v4.1 (flash). Written with an AI assistant.
fiestorra commented 2026-11-30 21:19:37 +00:00 (Migrated from github.com)
Author
Contributor

Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-11-30T21:19:37Z.


VK_EXT_memory_budget on this card reports a device-local budget of 23,370 MiB, and the run peaked at 24,057 MiB - so the runtime goes past the budget the driver publishes, not just past the card's size.

I built a 40-line probe for this (not part of the runtime: vkCreateInstance, vkGetPhysicalDeviceMemoryProperties2 with VkPhysicalDeviceMemoryBudgetPropertiesEXT), compiled with the Vulkan SDK 1.4.363.0, run on the idle card:

device 0: NVIDIA GeForce RTX 4090
  heap 0: 24138 MiB (flags 0x1, DEVICE_LOCAL)
  heap 1: 48006 MiB (host)
budget, device 0:
  heap 0: budget 23370 MiB, usage 0 MiB
  heap 1: budget 47238 MiB, usage 0

So there are three different numbers for "how much is there":

MiB
the heap the driver advertises (VkMemoryHeap.size) 24,138
the budget the driver recommends (heapBudget) 23,370
what the run actually reached (nvidia-smi) 24,057

The run is 687 MiB above the recommended budget, and 81 MiB below the advertised heap. That is a card with no margin at all, and it is the configuration where VK_ERROR_OUT_OF_DEVICE_MEMORY and a device removal are what happens next.

Why that maps onto your reports better than anything I have posted so far: heapBudget is not the card's size. On an 8 GB card the budget is roughly 7.4-7.6 GB, and the runtime's steady state on this content is 7.7 GB - so a 3070 Ti is over budget before the burst even starts, and the burst then wants another 14 GB that is not there. The 12 GB card is the same shape with more room; it dies when its own burst arrives.

What this instrument cannot do, stated plainly: VK_EXT_memory_budget reports per process. My tool sees usage 0 because that is its usage - so it cannot watch your game from outside. The budget figure above is what a fresh process is offered, which is the number I wanted; the usage side needs the query inside the runtime, and runtime/src/memory_breakdown.h already has a DeviceShare for it - that is a small PR, and I would write it if the maintainers want the probe to print heapUsage/heapBudget in the mem-probe line.

Three concrete rules this suggests, in the shape the repo uses for such things:

  1. Stop admitting work at 90% of heapBudget, not of the heap size. The runtime has the extension's structures but is not budget-gating on it.
  2. On a card whose heapBudget is under the steady state (7.7 GB here), the burst is a hard failure, not a slow frame - so the gate has to be before the allocation, not after the vkAllocateMemory returns.
  3. The probe should print both numbers, so the next report says "18.2 of a 19.4 GB budget" instead of "GPU usage reaches 7 GB".

Caveats: 24 GB card, warm caches, 0 device removals in every run I did. The tool is at E:\ports\state\leonida\scratch\mem_budget.cpp and is deliberately not committed - if this belongs in the tree it should be a reviewed PR, not a scratch file.

AI-assisted: yes - DeepSeek v4.1 (flash) wrote, compiled and ran the probe on the machine above.

Written with an AI assistant.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7292243634 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/issues/2607#issuecomment-7292243634). Originally posted by [fiestorra](https://github.com/fiestorra) on 2026-11-30T21:19:37Z. --- **`VK_EXT_memory_budget` on this card reports a device-local budget of 23,370 MiB, and the run peaked at 24,057 MiB - so the runtime goes past the budget the driver publishes, not just past the card's size.** **I built a 40-line probe for this** (not part of the runtime: `vkCreateInstance`, `vkGetPhysicalDeviceMemoryProperties2` with `VkPhysicalDeviceMemoryBudgetPropertiesEXT`), compiled with the Vulkan SDK 1.4.363.0, **run on the idle card**: ``` device 0: NVIDIA GeForce RTX 4090 heap 0: 24138 MiB (flags 0x1, DEVICE_LOCAL) heap 1: 48006 MiB (host) budget, device 0: heap 0: budget 23370 MiB, usage 0 MiB heap 1: budget 47238 MiB, usage 0 ``` **So there are three different numbers for "how much is there":** | | MiB | |---|---| | the heap the driver advertises (`VkMemoryHeap.size`) | **24,138** | | the budget the driver recommends (`heapBudget`) | **23,370** | | what the run actually reached (`nvidia-smi`) | **24,057** | **The run is 687 MiB above the recommended budget, and 81 MiB below the advertised heap.** **That is a card with no margin at all, and it is the configuration where `VK_ERROR_OUT_OF_DEVICE_MEMORY` and a device removal are what happens next.** **Why that maps onto your reports better than anything I have posted so far:** **`heapBudget` is not the card's size.** **On an 8 GB card the budget is roughly 7.4-7.6 GB, and the runtime's steady state on this content is 7.7 GB** - **so a 3070 Ti is over budget before the burst even starts**, and the burst then wants another 14 GB that is not there. **The 12 GB card is the same shape with more room; it dies when its own burst arrives.** **What this instrument cannot do, stated plainly:** **`VK_EXT_memory_budget` reports per process.** **My tool sees `usage 0` because that is *its* usage** - **so it cannot watch your game from outside.** **The budget figure above is what a fresh process is offered, which is the number I wanted; the *usage* side needs the query inside the runtime**, **and `runtime/src/memory_breakdown.h` already has a `DeviceShare` for it** - **that is a small PR, and I would write it if the maintainers want the probe to print `heapUsage`/`heapBudget` in the `mem-probe` line.** **Three concrete rules this suggests, in the shape the repo uses for such things:** 1. **Stop admitting work at 90% of `heapBudget`, not of the heap size.** **The runtime has the extension's structures but is not budget-gating on it.** 2. **On a card whose `heapBudget` is under the steady state (7.7 GB here), the burst is a hard failure, not a slow frame** - **so the gate has to be before the allocation, not after the `vkAllocateMemory` returns.** 3. **The probe should print both numbers**, so the next report says "18.2 of a 19.4 GB budget" instead of "GPU usage reaches 7 GB". **Caveats:** **24 GB card, warm caches, 0 device removals in every run I did.** **The tool is at `E:\ports\state\leonida\scratch\mem_budget.cpp` and is deliberately not committed** - **if this belongs in the tree it should be a reviewed PR, not a scratch file.** **AI-assisted:** yes - DeepSeek v4.1 (flash) wrote, compiled and ran the probe on the machine above. Written with an AI assistant.
Miici0 commented 2026-12-01 19:48:01 +00:00 (Migrated from github.com)
Author
Contributor

Imported from ubiquitarianism/leonida. Originally posted by Miici0 on 2026-12-01T19:48:01Z.


Three more runs on the same machine (RTX 4070 SUPER 12 GB, driver 621.24, 32 GB RAM), now on main 27613ab6b, with leonida.exe rebuilt (diag with DLSS). The device is still removed, so none of the commits since be7690805 changed this here. The three runs rule out three causes, listed below.

1. Not a hung command list or an API error the debug layer sees. One run had -More @{ LEONIDA_D3D12_DEBUG = '1'; LEONIDA_D3D12_DRED = 'light' }, with Windows' Graphics Tools installed. The log confirms crash tracing on (device-removed data) breadcrumbs=true and has no no D3D12 debug layer warning. The device was removed after 9.5 minutes:

ERROR leonida_gpu::host: device-removed data; breadcrumbs (done/count, list) []
ERROR leonida_gpu::host: relay: fence 18446744073709551615 did not reach 118373; device removed: ... (0x887A0005)

The breadcrumb list is empty, so no list was in flight when the device went. The failure text has no debug layer: part, so the debug layer logged no error. Its only output near the end is a warning that repeats 770 times: GetResourceAllocationInfo: ... Alignment cannot be 4KB. No page-fault data was printed.

2. Not running out of the PC's commit limit. The residency lines of all four crashed runs since 2026-11-30 show what was left to commit. It never went below 224 to 265 MB, and it stayed under 1.5 GiB for about half of each run. Commit limit 40.3 GB: 31.8 GB of RAM plus a system-managed 8.7 GB page file. So I tried a fixed 16-24 GB page file, which also meant a reboot, with the same default launch:

  • The runtime used the extra room too: 50.1 of 50.9 GB committed, leonida.exe at 26.6 GB private.
  • The game sat in the pause menu for about 62 minutes (28 fps, 140 draws/frame). Headroom was under 1.5 GiB for 3,828 of 3,917 seconds, with a minimum of 259 MB, and no removal.
  • Play resumed at 19:42:22Z, and the device was removed at 19:46:07Z, 3.7 minutes later.

So low commit headroom alone, held for an hour, does not remove the device, and a larger limit does not delay the removal.

3. It comes during play only. Across nine runs since 2026-11-30 it came 3.7 to 18.5 minutes into actual play, at 14 fps in the world. It did not come during the hour in the pause menu. My reading, still a hypothesis: something in world streaming triggers it, not memory size as such.

Happy to run a specific switch or build if someone has a candidate.

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7323456113 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/issues/2607#issuecomment-7323456113). Originally posted by [Miici0](https://github.com/Miici0) on 2026-12-01T19:48:01Z. --- Three more runs on the same machine (RTX 4070 SUPER 12 GB, driver 621.24, 32 GB RAM), now on `main` `27613ab6b`, with `leonida.exe` rebuilt (`diag` with DLSS). The device is still removed, so none of the commits since `be7690805` changed this here. The three runs rule out three causes, listed below. **1. Not a hung command list or an API error the debug layer sees.** One run had `-More @{ LEONIDA_D3D12_DEBUG = '1'; LEONIDA_D3D12_DRED = 'light' }`, with Windows' Graphics Tools installed. The log confirms `crash tracing on (device-removed data) breadcrumbs=true` and has no `no D3D12 debug layer` warning. The device was removed after 9.5 minutes: ``` ERROR leonida_gpu::host: device-removed data; breadcrumbs (done/count, list) [] ERROR leonida_gpu::host: relay: fence 18446744073709551615 did not reach 118373; device removed: ... (0x887A0005) ``` The breadcrumb list is empty, so no list was in flight when the device went. The failure text has no `debug layer:` part, so the debug layer logged no error. Its only output near the end is a warning that repeats 770 times: `GetResourceAllocationInfo: ... Alignment cannot be 4KB`. No page-fault data was printed. **2. Not running out of the PC's commit limit.** The `residency` lines of all four crashed runs since 2026-11-30 show what was left to commit. It never went below 224 to 265 MB, and it stayed under 1.5 GiB for about half of each run. Commit limit 40.3 GB: 31.8 GB of RAM plus a system-managed 8.7 GB page file. So I tried a fixed 16-24 GB page file, which also meant a reboot, with the same default launch: - The runtime used the extra room too: 50.1 of 50.9 GB committed, `leonida.exe` at 26.6 GB private. - The game sat in the pause menu for about 62 minutes (28 fps, 140 draws/frame). Headroom was under 1.5 GiB for 3,828 of 3,917 seconds, with a minimum of 259 MB, and **no removal**. - Play resumed at 19:42:22Z, and the device was removed at 19:46:07Z, **3.7 minutes later**. So low commit headroom alone, held for an hour, does not remove the device, and a larger limit does not delay the removal. **3. It comes during play only.** Across nine runs since 2026-11-30 it came 3.7 to 18.5 minutes into actual play, at 14 fps in the world. It did not come during the hour in the pause menu. My reading, still a hypothesis: something in world streaming triggers it, not memory size as such. Happy to run a specific switch or build if someone has a candidate. AI-assisted (Claude Code).
Alanls-mx commented 2026-12-01 21:18:12 +00:00 (Migrated from github.com)
Author
Contributor

Imported from ubiquitarianism/leonida. Originally posted by Alanls-mx on 2026-12-01T21:18:12Z.


Related 8 GB NVIDIA datapoint from a different GPU (RTX 4060): during the first-mission run, VRAM approached its limit and system RAM later fell to about 400 MiB free. The game's current log had no 0x8007000E and no DXGI_ERROR_DEVICE_REMOVED; this run was ended manually after memory became critical, so it is not a confirmed crash reproduction. A separate user report of spontaneous game closure remains uncorrelated with this run.

The 16 GB profile now limits runtime pipeline workers to one and texture residency to 72% of the reported VRAM budget, and the existing residency controller logged host-memory pressure. Next validation should record the first error/device-removed reason or WER dump if an actual spontaneous close recurs.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7326049191 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/issues/2607#issuecomment-7326049191). Originally posted by [Alanls-mx](https://github.com/Alanls-mx) on 2026-12-01T21:18:12Z. --- Related 8 GB NVIDIA datapoint from a different GPU (RTX 4060): during the first-mission run, VRAM approached its limit and system RAM later fell to about 400 MiB free. The game's current log had no `0x8007000E` and no `DXGI_ERROR_DEVICE_REMOVED`; this run was ended manually after memory became critical, so it is not a confirmed crash reproduction. A separate user report of spontaneous game closure remains uncorrelated with this run. The 16 GB profile now limits runtime pipeline workers to one and texture residency to 72% of the reported VRAM budget, and the existing residency controller logged host-memory pressure. Next validation should record the first error/device-removed reason or WER dump if an actual spontaneous close recurs.
waze3174 commented 2026-12-02 02:21:49 +00:00 (Migrated from github.com)
Author
Contributor

Imported from ubiquitarianism/leonida. Originally posted by waze3174 on 2026-12-02T02:21:49Z.


The same device removal on two very different cards in one PC: an RTX 2060 6 GB and then an RTX 5080 16 GB. The 16 GB card crashing the same way suggests card memory is not the cause, or at least not the only one.

PC: Ryzen 9 9950X3D, 32 GB DDR5-6000, Gigabyte X870E, Windows 11. Package 1.0.2.1, scripts/play-d3d12.ps1, diag build.

RTX 2060 6 GB RTX 5080 16 GB
Link / resizable BAR PCIe 3.0 x16 / off (BAR1 256 MiB) PCIe 5.0 x16 / on (BAR1 16384 MiB)
Driver 621.40, then 616.64 616.64
Profile Series S (-SeriesS -Adapter 2060) Series X: frame generation 4x, then -Resolution 1080 -NoFrameGen (no DLSS, no frame generation)
main 7c330c76d, 060c47160, b8bd37111 5922f9fc5
Crashes 7, at 6 to 23 min in the world 2, the last 14 min in, with DLSS and frame generation off

Every one is host GPU device removed ... (0x887A0005) (or relay: fence ... did not reach ... with the same removal). There was no particular trigger: it happened while walking, shooting and flying a plane.

What the 2060 runs ruled out:

  • A driver timeout (TDR): no WATCHDOG-*.dmp in C:\Windows\LiveKernelReports for any of the crashes (the newest dump predates them), and no nvlddmkm or Display event in the System log at the crash times.
  • A command of the runtime's: with LEONIDA_D3D12_DRED=light the breadcrumbs are [] and there is no fault address. The runtime reports "nothing of ours was running on the card" every time. One of these crashes had a pipeline-library make in progress; the others had none.
  • Heat or power: nvidia-smi was logged once a second through two crashes: about 65 °C, about 110 W of a 170 W limit, no throttle reason, 96–99 % busy up to the moment of removal.
  • The driver version: 616.64 lasted longer (23 min against 6–16 on 621.40) but crashed the same way.
  • Memory settings: on the 2060 the card was over its budget before every crash (4985–5166 MB in use against 4475–4755 MB). LEONIDA_TEXTURE_ROOM_PERCENT=70 did not lower that, and LEONIDA_CARD_BUFFERS_MB=512 with LEONIDA_WINDOWS_BAR_MB=0 halved the frame rate. Then the 16 GB card crashed too.

Side findings, separate from the crash:

  • 6 GiB cards get the large-card limits: d3d12/scripts/play-nvidia.ps1:354 uses them only for $vram -lt 6GB, and an RTX 2060 reports exactly 6 GiB (HardwareInformation.qwMemorySize 6442450944), so it gets the 16 GB card limits.
  • Water transmission on the RTX 5080: with it on by default since 93e65d91c, black boxes flicker in the water. With LEONIDA_WATER_TRANSMISSION=0, objects standing in the water (posts, a pier, people) render pitch black instead. The re-enable was tested on an RTX 5070.

I can run a build or a switch on either card if it helps narrow this down. I no longer have the 2060 in the PC, though.

Written with an AI assistant (Claude); the numbers come from the runtime's logs and nvidia-smi on this PC.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7332752448 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/issues/2607#issuecomment-7332752448). Originally posted by [waze3174](https://github.com/waze3174) on 2026-12-02T02:21:49Z. --- The same device removal on two very different cards in one PC: an **RTX 2060 6 GB** and then an **RTX 5080 16 GB**. The 16 GB card crashing the same way suggests card memory is not the cause, or at least not the only one. **PC:** Ryzen 9 9950X3D, 32 GB DDR5-6000, Gigabyte X870E, Windows 11. Package 1.0.2.1, `scripts/play-d3d12.ps1`, `diag` build. | | RTX 2060 6 GB | RTX 5080 16 GB | |---|---|---| | Link / resizable BAR | PCIe 3.0 x16 / off (BAR1 256 MiB) | PCIe 5.0 x16 / on (BAR1 16384 MiB) | | Driver | 621.40, then 616.64 | 616.64 | | Profile | Series S (`-SeriesS -Adapter 2060`) | Series X: frame generation 4x, then `-Resolution 1080 -NoFrameGen` (no DLSS, no frame generation) | | `main` | `7c330c76d`, `060c47160`, `b8bd37111` | `5922f9fc5` | | Crashes | 7, at 6 to 23 min in the world | 2, the last 14 min in, with DLSS and frame generation off | Every one is `host GPU device removed ... (0x887A0005)` (or `relay: fence ... did not reach ...` with the same removal). There was no particular trigger: it happened while walking, shooting and flying a plane. **What the 2060 runs ruled out:** - **A driver timeout (TDR):** no `WATCHDOG-*.dmp` in `C:\Windows\LiveKernelReports` for any of the crashes (the newest dump predates them), and no `nvlddmkm` or Display event in the System log at the crash times. - **A command of the runtime's:** with `LEONIDA_D3D12_DRED=light` the breadcrumbs are `[]` and there is no fault address. The runtime reports "nothing of ours was running on the card" every time. One of these crashes had a pipeline-library make in progress; the others had none. - **Heat or power:** nvidia-smi was logged once a second through two crashes: about 65 °C, about 110 W of a 170 W limit, no throttle reason, 96–99 % busy up to the moment of removal. - **The driver version:** 616.64 lasted longer (23 min against 6–16 on 621.40) but crashed the same way. - **Memory settings:** on the 2060 the card was over its budget before every crash (4985–5166 MB in use against 4475–4755 MB). `LEONIDA_TEXTURE_ROOM_PERCENT=70` did not lower that, and `LEONIDA_CARD_BUFFERS_MB=512` with `LEONIDA_WINDOWS_BAR_MB=0` halved the frame rate. Then the 16 GB card crashed too. **Side findings, separate from the crash:** - **6 GiB cards get the large-card limits:** `d3d12/scripts/play-nvidia.ps1:354` uses them only for `$vram -lt 6GB`, and an RTX 2060 reports exactly 6 GiB (`HardwareInformation.qwMemorySize` 6442450944), so it gets the 16 GB card limits. - **Water transmission on the RTX 5080:** with it on by default since `93e65d91c`, black boxes flicker in the water. With `LEONIDA_WATER_TRANSMISSION=0`, objects standing in the water (posts, a pier, people) render pitch black instead. The re-enable was tested on an RTX 5070. I can run a build or a switch on either card if it helps narrow this down. I no longer have the 2060 in the PC, though. Written with an AI assistant (Claude); the numbers come from the runtime's logs and nvidia-smi on this PC.
valenciana-nc commented 2026-12-02 16:35:58 +00:00 (Migrated from github.com)
Author
Contributor

Imported from ubiquitarianism/leonida. Originally posted by valenciana-nc on 2026-12-02T16:35:58Z.


Same 0x887A0005 signature on an 8 GB RTX 4060 Laptop (16 GB RAM, 621.47). There, LEONIDA_D3D12_BACKGROUND=0 (needs Windows Developer mode) or LEONIDA_ALLOCATOR_TRIM=1 held the device for 30-45 min in every run, 5 of 5. Without either, 5 of 6 runs lost it within 3.7-8.5 min. Table and caveats: https://github.com/ProjectLeonida/mandy/issues/2821#issuecomment-7352177565

AI-assisted: yes (Claude Opus 5.5)

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7352181127 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/issues/2607#issuecomment-7352181127). Originally posted by [valenciana-nc](https://github.com/valenciana-nc) on 2026-12-02T16:35:58Z. --- Same 0x887A0005 signature on an 8 GB RTX 4060 Laptop (16 GB RAM, 621.47). There, `LEONIDA_D3D12_BACKGROUND=0` (needs Windows Developer mode) or `LEONIDA_ALLOCATOR_TRIM=1` held the device for 30-45 min in every run, 5 of 5. Without either, 5 of 6 runs lost it within 3.7-8.5 min. Table and caveats: https://github.com/ProjectLeonida/mandy/issues/2821#issuecomment-7352177565 AI-assisted: yes (Claude Opus 5.5)
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
ProjectLeonida/mandy#2607
No description provided.