mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[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
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#828
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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
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:
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.ko575.64.05 vs Windowsnvlddmkm.sys576.52) showed:RMPcieGenSwitchOnPmuin both)RmDisableGen2LinkRetrainingis 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: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:
RmDisableGen2LinkRetraining=1(The clock lock
PerfLevelSrc=0x2222and 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.
@MrKop-git commented on GitHub (Oct 12, 2026):
Cross-references:
(#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.@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:pcie_aspm=offthroughout.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.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-gen1restores the workaround in one reboot - stability beats the 3.3x prefill speedup. Will report either way.@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 ... Xwaylandfrom the other GPU in this box (a GT 710 that drives the desktop on nouveau) and a userspaceint3, 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=offstill 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-gen1goes 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.@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=1workaround goes back in from the backup - a daily-driver coding box values uptime over the 3.3x prefill speedup.@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:
RmDisableGen2LinkRetraining=1remains 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.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).
@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:
/reopen. A check runs and either reopens the issue or lists what is still missing.The rules are in CONTRIBUTING.md.