[GH-ISSUE #2084] System hard-freezes during long-prompt prefill on NVIDIA Pascal = driver bug 6869496 (PMU halt from PCIe link retraining) — verified workaround: NVreg RmDisableGen2LinkRetraining=1 #828

Closed
opened 2026-11-04 01:46:16 +07:00 by bsakaguchi · 6 comments
Owner

Originally created by @MrKop-git on GitHub (Oct 12, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/2084

Not a Strata bug — but a Strata workload pattern that reliably triggers an NVIDIA driver bug, and a fix that may save other users of older NVIDIA GPUs a lot of pain. Suggest adding it to the troubleshooting docs.

Setup

  • GTX 1080 Ti (GP102), nvidia 575.64.05 proprietary, kernel 6.18 (also reproduced on 580.178.04 / 580.159.04, kernel 7.2)
  • Strata serving a ~46k-token conversation (IQ3_S MoE, experts streaming over PCIe)

Symptom

The machine hard-freezes mid "reading the prompt" (the sustained prefill phase), requiring a power cycle — MTBF 15–50 min under load, never while idle. No kernel messages survive (journal cut off before the disk flush); it looks exactly like "running Strata freezes my computer" with nothing to go on.

Root cause (as far as we could take it)

Streaming kernel netconsole over UDP caught the death:

NVRM: GPU at PCI:0000:84:00: GPU-611b1183-...
NVRM: Xid (PCI:0000:84:00): 62, 00002810 ...   ← PMU_HALT_ERROR

Xid 62 = the GPU's PMU microcontroller halted — NVIDIA-tracked internal bug 6869496 (forums.developer.nvidia.com threads 384008, 385543 — the latter is the same GPU, works fine under Windows).

Reverse-engineering both driver binaries (Linux nvidia.ko 575.64.05 vs Windows nvlddmkm.sys 576.52) showed:

  • PCIe link speed switching is executed on the PMU (RMPcieGenSwitchOnPmu in both)
  • The registry key RmDisableGen2LinkRetraining is live/wired in the Linux driver's registry table (two descriptor entries) but a dead string in the Windows build (no table entry) — i.e. the legacy dynamic link-retraining machinery is still active on Linux builds but effectively retired on Windows. Consistent with Windows users not seeing this.

Mechanism: bursty prefill traffic → the RM/PMU oscillates the PCIe link between Gen3 and low speed for power saving → frequent PMU link-retrain handshakes → hits the bug → PMU halts → GPU dead → system frozen.

Verified workaround (A/B tested)

/etc/modprobe.d/nvidia.conf:

options nvidia NVreg_RegistryDwords="RmDisableGen2LinkRetraining=1"

This pins the link at its max negotiated speed (Gen3, no bandwidth loss) and stops the PMU from doing link-speed transitions entirely. With everything else identical, crashes stopped completely:

config result
575 + clock lock + power cap + new BIOS + CPU microcode + PC6/ASPM fixes froze at 4.5 min, then at 35 min
same + RmDisableGen2LinkRetraining=1 40-min soak with continuous 40k-token prefills: 0 freezes; real load since: 0 freezes

(The clock lock PerfLevelSrc=0x2222 and power-limit changes were not sufficient — the retraining key was the discriminating variable.)

Suggestion for the project

Consider documenting this under a "system freezes while reading a long prompt (NVIDIA)" entry: the user-visible symptom points straight at Strata, the real culprit is the NVIDIA driver + old-GPU PMU bug, and the fix is one registry line. Possibly worth linking NVIDIA threads 384008 / 385543 and bug 6869496 so affected users can find it by searching either direction.

Happy to provide the netconsole logs and the driver-analysis notes if useful.

Originally created by @MrKop-git on GitHub (Oct 12, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/2084 ## Hard system freezes during long-prompt prefill on NVIDIA Pascal — driver bug 6869496 (PMU halt from PCIe link retraining), with a verified driver-registry workaround Not a Strata bug — but a Strata workload pattern that **reliably triggers** an NVIDIA driver bug, and a fix that may save other users of older NVIDIA GPUs a lot of pain. Suggest adding it to the troubleshooting docs. ### Setup - GTX 1080 Ti (GP102), nvidia 575.64.05 proprietary, kernel 6.18 (also reproduced on 580.178.04 / 580.159.04, kernel 7.2) - Strata serving a ~46k-token conversation (IQ3_S MoE, experts streaming over PCIe) ### Symptom The machine **hard-freezes** mid "reading the prompt" (the sustained prefill phase), requiring a power cycle — MTBF 15–50 min under load, never while idle. No kernel messages survive (journal cut off before the disk flush); it looks exactly like "running Strata freezes my computer" with nothing to go on. ### Root cause (as far as we could take it) Streaming kernel netconsole over UDP caught the death: ``` NVRM: GPU at PCI:0000:84:00: GPU-611b1183-... NVRM: Xid (PCI:0000:84:00): 62, 00002810 ... ← PMU_HALT_ERROR ``` Xid 62 = the GPU's PMU microcontroller halted — NVIDIA-tracked internal bug **6869496** (forums.developer.nvidia.com threads 384008, 385543 — the latter is the same GPU, works fine under Windows). Reverse-engineering both driver binaries (Linux `nvidia.ko` 575.64.05 vs Windows `nvlddmkm.sys` 576.52) showed: - PCIe **link speed switching is executed on the PMU** (`RMPcieGenSwitchOnPmu` in both) - The registry key `RmDisableGen2LinkRetraining` is **live/wired in the Linux driver's registry table** (two descriptor entries) but a **dead string in the Windows build** (no table entry) — i.e. the legacy dynamic link-retraining machinery is still active on Linux builds but effectively retired on Windows. Consistent with Windows users not seeing this. Mechanism: bursty prefill traffic → the RM/PMU oscillates the PCIe link between Gen3 and low speed for power saving → frequent PMU link-retrain handshakes → hits the bug → PMU halts → GPU dead → system frozen. ### Verified workaround (A/B tested) `/etc/modprobe.d/nvidia.conf`: ``` options nvidia NVreg_RegistryDwords="RmDisableGen2LinkRetraining=1" ``` This pins the link at its max negotiated speed (Gen3, **no bandwidth loss**) and stops the PMU from doing link-speed transitions entirely. With everything else identical, crashes stopped completely: | config | result | |---|---| | 575 + clock lock + power cap + new BIOS + CPU microcode + PC6/ASPM fixes | froze at 4.5 min, then at 35 min | | same + `RmDisableGen2LinkRetraining=1` | 40-min soak with continuous 40k-token prefills: 0 freezes; real load since: 0 freezes | (The clock lock `PerfLevelSrc=0x2222` and power-limit changes were **not** sufficient — the retraining key was the discriminating variable.) ### Suggestion for the project Consider documenting this under a "system freezes while reading a long prompt (NVIDIA)" entry: the user-visible symptom points straight at Strata, the real culprit is the NVIDIA driver + old-GPU PMU bug, and the fix is one registry line. Possibly worth linking NVIDIA threads 384008 / 385543 and bug 6869496 so affected users can find it by searching either direction. Happy to provide the netconsole logs and the driver-analysis notes if useful.
Author
Owner

@MrKop-git commented on GitHub (Oct 12, 2026):

Cross-references:

  • #267 — the engine-visible sibling of this failure class: the verify-window stall wedging the GPU into an unrecoverable state requiring a manual power cycle, with nothing logged. Our engine logs cite (#267) verbatim when the GPU stalls (verify: timed out at layer 5; its GPU waits were released but the GPU did not finish within 5 s (#267)) — on the machine analyzed here, that recoverable-stall symptom and the hard-freeze PMU halt in this issue are two faces of the same underlying driver/GPU problem (NVIDIA 6869496), differing only in whether the driver survived long enough to log anything.
  • #2054 — unrelated bug (update.sh build stamping), but found during the same investigation on this machine; documenting the link for timeline continuity in case anyone traces back through the same saga.
<!-- gh-comment-id:6121406549 --> @MrKop-git commented on GitHub (Oct 12, 2026): **Cross-references:** - #267 — the engine-visible sibling of this failure class: the verify-window stall wedging the GPU into an unrecoverable state requiring a manual power cycle, with nothing logged. Our engine logs cite `(#267)` verbatim when the GPU stalls (`verify: timed out at layer 5; its GPU waits were released but the GPU did not finish within 5 s (#267)`) — on the machine analyzed here, that recoverable-stall symptom and the hard-freeze PMU halt in this issue are two faces of the same underlying driver/GPU problem (NVIDIA 6869496), differing only in whether the driver survived long enough to log anything. - #2054 — unrelated bug (update.sh build stamping), but found during the same investigation on this machine; documenting the link for timeline continuity in case anyone traces back through the same saga.
Author
Owner

@MrKop-git commented on GitHub (Oct 12, 2026):

Update on this workaround: I removed NVreg_RegistryDwords="...;RmDisableGen2LinkRetraining=1" today (it was capping the link at Gen1: 3,191 MB/s peak, prefill pinned at the Gen1 x16 ceiling - found via #2137/#2099) and re-tested the original trigger conditions:

  • Driver 580.178.04, GTX 1080 Ti, kernel cmdline has had pcie_aspm=off throughout.
  • After a clean reboot the link trains Gen3 x16 at boot and stays there: LnkSta: Speed 8GT/s, 3,401 sub-second samples over a request window, gen 3 at every sample - with ASPM off there is no idle downtrain, so no retrain events for the PMU halt to bite on.
  • The original workload ran clean: a 52 s saturated cold prefill at 14,423 MB/s peak (Gen3 x16 saturated, 4.5x the Gen1 ceiling), plus three more long prompts after it. No freeze (n=1 session).

So the current theory for why the freeze may not come back: bug 6869496 halts on the retraining transition, and with pcie_aspm=off + the option removed, the link uptrains once during boot and never transitions again - there is no runtime Gen1→Gen3 retrain left to trigger the PMU halt. The old setup (option on) also never froze, it just paid 4x PCIe bandwidth.

Plan: running with Gen3 and watching for the hard-freeze under long-prompt prefill. If it returns even once, the backup /etc/modprobe.d/nvidia.conf.bak-gen1 restores the workaround in one reboot - stability beats the 3.3x prefill speedup. Will report either way.

<!-- gh-comment-id:6128787588 --> @MrKop-git commented on GitHub (Oct 12, 2026): Update on this workaround: I removed `NVreg_RegistryDwords="...;RmDisableGen2LinkRetraining=1"` today (it was capping the link at Gen1: 3,191 MB/s peak, prefill pinned at the Gen1 x16 ceiling - found via #2137/#2099) and re-tested the original trigger conditions: - Driver 580.178.04, GTX 1080 Ti, kernel cmdline has had `pcie_aspm=off` throughout. - After a clean reboot the link trains **Gen3 x16 at boot and stays there**: `LnkSta: Speed 8GT/s`, 3,401 sub-second samples over a request window, gen 3 at every sample - with ASPM off there is no idle downtrain, so no retrain events for the PMU halt to bite on. - The original workload ran clean: a 52 s saturated cold prefill at **14,423 MB/s peak** (Gen3 x16 saturated, 4.5x the Gen1 ceiling), plus three more long prompts after it. No freeze (n=1 session). So the current theory for why the freeze may not come back: bug 6869496 halts on the **retraining transition**, and with `pcie_aspm=off` + the option removed, the link uptrains once during boot and never transitions again - there is no runtime Gen1→Gen3 retrain left to trigger the PMU halt. The old setup (option on) also never froze, it just paid 4x PCIe bandwidth. Plan: running with Gen3 and watching for the hard-freeze under long-prompt prefill. If it returns even once, the backup `/etc/modprobe.d/nvidia.conf.bak-gen1` restores the workaround in one reboot - stability beats the 3.3x prefill speedup. Will report either way.
Author
Owner

@MrKop-git commented on GitHub (Oct 12, 2026):

n=2 update, unfortunately: the freeze came back. About an hour of Gen3 uptime with lighter traffic (a 52 s saturated prefill, short decodes, the sibling-fan-out bench - all clean), then a hard freeze during another 14.5K-token cold prefill at Gen3 saturation (~14 GB/s). Same signature as before: no nvidia driver trace, no AER, no MCE - the journal's last lines are nouveau ... DATA_ERROR ... Xwayland from the other GPU in this box (a GT 710 that drives the desktop on nouveau) and a userspace int3, so attribution to the PMU halt is by workload signature, not by log proof.

Current state after reboot: the BIOS now forces Link Speed = Gen3 and the link trains 8 GT/s x16 (UEFI-only mode, CSM off - trying whether the boot path matters); pcie_aspm=off still set; the workaround option stays removed. Continuing the watch with an explicit abort criterion: if the freeze recurs under long-prompt prefill again, /etc/modprobe.d/nvidia.conf.bak-gen1 goes back in and the box stays at Gen1 - stability beats the 3.3x prefill speedup for a daily-driver coding assistant.

One measurement note for the record: before the freeze, the retry/edit-last-message bench on Gen3 completed - B turns now cost 2.0 s / 3.0 s wall (99.6%/99.4% reuse), down from 3.7 s at Gen1 and 11.4 s before STRATA_CACHE_MESSAGE_BOUNDARY=1. So the compounding holds: prefix flags remove the tokens, Gen3 moves what is left.

<!-- gh-comment-id:6129153326 --> @MrKop-git commented on GitHub (Oct 12, 2026): n=2 update, unfortunately: the freeze came back. About an hour of Gen3 uptime with lighter traffic (a 52 s saturated prefill, short decodes, the sibling-fan-out bench - all clean), then a hard freeze during another 14.5K-token cold prefill at Gen3 saturation (~14 GB/s). Same signature as before: no nvidia driver trace, no AER, no MCE - the journal's last lines are `nouveau ... DATA_ERROR ... Xwayland` from the **other** GPU in this box (a GT 710 that drives the desktop on nouveau) and a userspace `int3`, so attribution to the PMU halt is by workload signature, not by log proof. Current state after reboot: the BIOS now forces Link Speed = Gen3 and the link trains 8 GT/s x16 (UEFI-only mode, CSM off - trying whether the boot path matters); `pcie_aspm=off` still set; the workaround option stays removed. Continuing the watch with an explicit abort criterion: if the freeze recurs under long-prompt prefill again, `/etc/modprobe.d/nvidia.conf.bak-gen1` goes back in and the box stays at Gen1 - stability beats the 3.3x prefill speedup for a daily-driver coding assistant. One measurement note for the record: before the freeze, the retry/edit-last-message bench on Gen3 completed - B turns now cost 2.0 s / 3.0 s wall (99.6%/99.4% reuse), down from 3.7 s at Gen1 and 11.4 s before `STRATA_CACHE_MESSAGE_BOUNDARY=1`. So the compounding holds: prefix flags remove the tokens, Gen3 moves what is left.
Author
Owner

@MrKop-git commented on GitHub (Oct 12, 2026):

n=3: the freeze pattern is now unambiguous - both n=2 and n=3 hard-froze at the same spot, the first saturated cold prefill of the same bench (14.5K-token prompt, ~14 GB/s on the link), while an hour of lighter Gen3 traffic (one 52 s cold prefill, decodes, the sibling bench) survived. So the trigger concentrates on sustained saturated prefill, exactly the original workload in this issue's title. No nvidia/AER/MCE trace either time; the desktop card's (GT 710 / nouveau) error lines remain an unexcludable confound.

Config changes tried since n=2, none sufficient so far: UEFI-only boot (n=3 froze anyway); now the BIOS Gen3 equalization phases are disabled - the link still trains 8 GT/s x16 (LnkSta2: EqualizationComplete+ Phase1+, -6 dB de-emphasis) and the next single-cold-prefill probe will tell whether the EQ path was the trigger.

Standing decision rule: one more freeze under saturated prefill and the RmDisableGen2LinkRetraining=1 workaround goes back in from the backup - a daily-driver coding box values uptime over the 3.3x prefill speedup.

<!-- gh-comment-id:6129338466 --> @MrKop-git commented on GitHub (Oct 12, 2026): n=3: the freeze pattern is now unambiguous - both n=2 and n=3 hard-froze at the **same spot**, the first saturated cold prefill of the same bench (14.5K-token prompt, ~14 GB/s on the link), while an hour of lighter Gen3 traffic (one 52 s cold prefill, decodes, the sibling bench) survived. So the trigger concentrates on sustained saturated prefill, exactly the original workload in this issue's title. No nvidia/AER/MCE trace either time; the desktop card's (GT 710 / nouveau) error lines remain an unexcludable confound. Config changes tried since n=2, none sufficient so far: UEFI-only boot (n=3 froze anyway); now the BIOS Gen3 equalization phases are disabled - the link still trains 8 GT/s x16 (`LnkSta2: EqualizationComplete+ Phase1+`, -6 dB de-emphasis) and the next single-cold-prefill probe will tell whether the EQ path was the trigger. Standing decision rule: one more freeze under saturated prefill and the `RmDisableGen2LinkRetraining=1` workaround goes back in from the backup - a daily-driver coding box values uptime over the 3.3x prefill speedup.
Author
Owner

@MrKop-git commented on GitHub (Oct 12, 2026):

n=4 and closing this experiment on this box: the freeze recurred with the BIOS Gen3 EQ phases disabled (and with UEFI-only boot before that), at the same spot - the first saturated cold prefill of the same bench, minutes after a single identical cold prefill had passed clean. Across the whole trial with the workaround removed, saturated cold prefills ended 4 freezes / 4 passes, ~50% per attempt, three of the four freezes on the identical request, and zero kernel/driver/hardware trace in every case (the crashed boot's journal is entirely absent - the PMU halt does not even let the journal flush). Neither UEFI-only nor EQ-phase-disable moved the odds.

Conclusions for anyone hitting this on Pascal:

  1. The trigger is per-attempt probabilistic under sustained saturated transfer, not time-since-boot, not the boot/firmware path, and not the equalization phases - both BIOS workarounds were inert against it.
  2. RmDisableGen2LinkRetraining=1 remains the only reliable mitigation we know: it has now been re-installed on this box (config backup restored, effective next boot). The cost is concrete: the PCIe tier sits at the Gen1 ceiling (~3.2 GB/s), cold prefill ~3x slower (171 s vs 52 s per 14.4K tokens) - but a daily-driver coding assistant cannot take a coin-flip hard freeze per long prompt.
  3. What Gen3 bought when it held, for the record: pcie_rx up to ~14 GB/s, cold prefill 171->52 s, sibling sub-agents 37->4.2 s, retry turns 3.7->2.0 s. All numbers measured with the prefix-reuse flags from #2099 in place.

If a future driver fixes 6869496, the re-test procedure is one file edit away (remove the dword, reboot, run a few saturated cold prefills).

<!-- gh-comment-id:6129632544 --> @MrKop-git commented on GitHub (Oct 12, 2026): n=4 and closing this experiment on this box: the freeze recurred with the BIOS Gen3 EQ phases disabled (and with UEFI-only boot before that), at the same spot - the first saturated cold prefill of the same bench, minutes after a single identical cold prefill had passed clean. Across the whole trial with the workaround removed, saturated cold prefills ended **4 freezes / 4 passes, ~50% per attempt**, three of the four freezes on the identical request, and zero kernel/driver/hardware trace in every case (the crashed boot's journal is entirely absent - the PMU halt does not even let the journal flush). Neither UEFI-only nor EQ-phase-disable moved the odds. Conclusions for anyone hitting this on Pascal: 1. The trigger is **per-attempt probabilistic under sustained saturated transfer**, not time-since-boot, not the boot/firmware path, and not the equalization phases - both BIOS workarounds were inert against it. 2. `RmDisableGen2LinkRetraining=1` remains the only reliable mitigation we know: it has now been re-installed on this box (config backup restored, effective next boot). The cost is concrete: the PCIe tier sits at the Gen1 ceiling (~3.2 GB/s), cold prefill ~3x slower (171 s vs 52 s per 14.4K tokens) - but a daily-driver coding assistant cannot take a coin-flip hard freeze per long prompt. 3. What Gen3 bought when it held, for the record: pcie_rx up to ~14 GB/s, cold prefill 171->52 s, sibling sub-agents 37->4.2 s, retry turns 3.7->2.0 s. All numbers measured with the prefix-reuse flags from #2099 in place. If a future driver fixes 6869496, the re-test procedure is one file edit away (remove the dword, reboot, run a few saturated cold prefills).
Author
Owner

@Niko1221 commented on GitHub (Oct 19, 2026):

Thanks for taking the time to report this.

We're resetting the tracker for 0.2.0-beta. There are more than 1,300 open issues and pull requests, too many for us to read properly, so we're closing everything that isn't being worked on right now. Closed here does not mean rejected.

To reopen it takes about two minutes:

  1. Re-test on 0.2.0-beta. It may already be fixed. Write down what you see.
  2. Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other].
  3. Fill in the parts of the issue form: what happened, the Strata version, your graphics card, memory and system.
  4. Comment /reopen. A check runs and either reopens the issue or lists what is still missing.

The rules are in CONTRIBUTING.md.

<!-- gh-comment-id:6270776660 --> @Niko1221 commented on GitHub (Oct 19, 2026): Thanks for taking the time to report this. We're resetting the tracker for 0.2.0-beta. There are more than 1,300 open issues and pull requests, too many for us to read properly, so we're closing everything that isn't being worked on right now. Closed here does not mean rejected. To reopen it takes about two minutes: 1. Re-test on 0.2.0-beta. It may already be fixed. Write down what you see. 2. Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other]. 3. Fill in the parts of the issue form: what happened, the Strata version, your graphics card, memory and system. 4. Comment `/reopen`. A check runs and either reopens the issue or lists what is still missing. The rules are in [CONTRIBUTING.md](https://github.com/Niko1221/Strata/blob/main/CONTRIBUTING.md).
Sign in to join this conversation.
No milestone
No project
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.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#828
No description provided.