Blackbox: Open-source post-mortem tooling for GB10 boxes (DGX Spark / GB10 clones), and the cgroups gap that keeps causing half of this

I just open-sourced blackbox: GitHub - lcasarin-maker/blackbox: Post-mortem forensic instrumentation for NVIDIA GB10 AI workstations (DGX Spark, ASUS Ascent GX10, Gigabyte AI TOP ATOM): Xid, PCIe, xHCI, thermal, OOM, and crash diagnostics · GitHub — forensic instrumentation for NVIDIA GB10-class AI workstations. Built and tested on my own Gigabyte AI TOP ATOM, but the GB10-specific logic (Xid, PCIe/AER, xHCI, unified-memory quirks, PSI) isn’t brand-specific — should apply the same to a DGX Spark, an ASUS Ascent GX10, or whatever else ships on this chip.

It started from one incident: a GUI app hung, zero renderer processes, no OOM, no segfault, no thermal event — and no root cause, because core dumps weren’t captured. Since then it’s grown into a scan of everything that can silently fail on this hardware, an inventory of which of those checks is actually armed on a given box, and a couple of live-repair tools (bb protect raises the core limit on processes already running, without restarting them).

Browsing this forum, the shape of the problem repeats constantly: silent shutdown under load, GPU falls back to CPU with zero error, USB controller dies mid-session, a box that “just turns off” with nothing in the logs to explain why. blackbox exists so the next one of those leaves evidence instead of another unresolved thread. If you’re running one of these boxes, I’d genuinely like data points from hardware that isn’t mine — does a given check fire correctly on your unit, does your firmware revision change any of the thresholds. Issues and PRs welcome.

What it actually monitors, current version

  • GPU Xid codes — nvidia-smi/dmesg carry them, but nothing greps for them by default.
  • Named throttle reasons + lifetime counters — nvidia-smi -q -d PERFORMANCE separates SW Power Cap from HW/SW Thermal Slowdown from HW Power Brake, plus how many seconds each has accumulated since the last driver reload. Not just a binary “throttled: yes/no.”
  • GPU processes that already exited — --query-compute-apps only sees what’s running now. GPU accounting mode (nvidia-smi -am 1, root-only) plus --query-accounted-apps keeps per-PID usage around after the process is gone, for exactly the question a post-mortem actually asks.
  • PCIe replay counters — nvidia-smi -q’s PCI section (Replays Since Reset/Replay Number Rollovers). A link retransmit can happen without the kernel ever writing an AER log line, so this is a second, independent signal.
  • PCIe power/AER events, xHCI/USB controller death, GPU stuck at 0% while memory is reserved (silent CPU fallback), GDM boot hangs, kernel-vs-userspace GUI hang differentiation, the OCI/nvidia-container-runtime silent-fallback-to-legacy bug, kdump kernel crash captures, PSI (/proc/pressure) memory stall pressure, and systemd-coredump capture with live prlimit protection of processes that were already running before capture was armed.
  • NVIDIA’s own Field Diagnostic results, if you’ve run it yourself — see below.

Every check that can’t run gets counted and printed, never silently skipped — a report saying could_not_run: 0 means something; one that just omits the row doesn’t.

Checked directly against this hardware and confirmed not applicable, so nobody else has to re-check: ECC, PAGE_RETIREMENT, and ROW_REMAPPER all return N/A via nvidia-smi -q -d {ECC,PAGE_RETIREMENT,ROW_REMAPPER} on GB10.

I also checked whether the PCIe link itself tells you anything — this GPU enumerates at 1x/Gen1 against a 16x/Gen5 max, which looked alarming until I ran a real 96%-utilization CUDA load against it and the link didn’t retrain at all, idle or loaded. Didn’t build a check on that number — on GB10 (coherent CPU/GPU memory over NVLink-C2C), that PCIe field almost certainly isn’t measuring the path that carries compute traffic. Confirmed independently below.

The complaint: NVIDIA GPUs — and GB10’s unified memory in particular — have no cgroup accounting, and that’s causing a chunk of the failures in this forum

Linux cgroups give you memory.max, memory.events (with an OOM-kill signal), and PSI (/proc/pressure/memory) for host RAM. None of that exists for GPU memory, and on GB10 that’s worse than on a discrete card, because CPU and GPU share the same physical pool. A process that maps 15 GB of unified memory through the driver can starve every other process on the box — GPU workload or not — without that allocation ever showing up against any cgroup’s accounting, and without tripping the cgroup OOM killer the way a plain RSS overrun would. The failure mode instead is a hard shutdown, a driver-level abort, or a silent CPU fallback — exactly the pattern in half the “randomly powers off / freezes under load” threads here.

Concretely, what’s missing:

  • No GPU/UMA-aware memory controller. cgroup.memory only ever sees host RSS. There’s no way to say “this cgroup gets N GB of unified memory” the way memory.max works for RAM.
  • No gpu.pressure (or equivalent) alongside /proc/pressure/memory. PSI tells you how long tasks stalled waiting on host memory; there’s no equivalent for GPU/UMA contention — nothing in the standard interface reports it at all.
  • No cgroup-visible OOM event for GPU/UMA exhaustion. A system OOM kill is visible in memory.events, dmesg, and journald. A GPU/UMA memory exhaustion is not — it just aborts or hangs.
  • No kernel-level compute-share primitive analogous to cpu.max. Anything resembling admission control or per-job GPU quota has to be hand-rolled in userspace (we wrapped interactive jobs in systemd-run --scope -p MemoryMax=..., which only fences host RSS — not what unified memory actually consumes, so it’s a best-effort guess, not a real limit).
  • The OCI/nvidia-container-runtime prestart hook fails silently when GPU cgroup device access can’t be granted — falls back to “legacy” mode with no real GPU, and the container still reports Up.

None of this is exotic — it’s the same accounting memory and cpu controllers already do, just missing for the one resource actually causing the crashes. If NVIDIA shipped a real cgroup memory controller for GPU/UMA (even just accounting + a pressure file, before hard limits), a lot of the “it just died” threads here would turn into “the cgroup logged what it was starving on” instead.

A community theory that would make this worse than I first thought

Someone on another thread here proposed a specific mechanism for the “dies under load, fine at idle, no warning, no log” pattern: on GB10, weights + KV cache + CUDA workspace share the same unified pool, and if total allocation creeps too close to the ceiling, the result isn’t a clean OOM — it’s a UVM (Unified Virtual Memory) page-migration livelock that hard-locks the machine with no warning and no log, because the OOM-killer never fires. I can’t verify that mechanism myself (inducing it means crashing my own box on purpose), but it would explain exactly the blind spot above: a livelock during page migration wouldn’t route through the kernel OOM path, the cgroup OOM path, or PSI, since none of those instrument UVM directly.

Their mitigation list, in order: cap what a server actually claims (e.g. vLLM’s --gpu-memory-utilization at 0.85–0.92 instead of 0.94+), update platform firmware (BIOS/BMC, separate from OS/driver packages), lock GPU clocks, and cap GPU power draw. I checked the last two against my own box before repeating them: clock locking (nvidia-smi -lgc) was already running here, but nvidia-smi -pl power capping is not supported at all on this GB10 — every power-limit field (nvidia-smi -q -d POWER) reads N/A. If you’re on this hardware, that knob isn’t there for you either.

sparkview vs. blackbox

I see a lot of people converging on trying to fix or at least understand what’s happening here — I asked for a comparison against one that seemed similar, but they’re complementary, not competing:

parallelArchitect/sparkview is a live TUI dashboard (GPU/CPU/PSI/clock state in real time, anomaly auto-logger). blackbox is forensic-after-the-fact + instrumentation inventory — not GPU-monitor-specific, explicitly no live UI. They don’t compete: sparkview watches the machine while you’re not looking at it; blackbox reconstructs what happened once something already broke. blackbox’s PSI mechanism traces back to sparkview’s forum write-up, and nvml-unified-shim independently confirms the same GB10 nvmlDeviceGetMemoryInfo quirk our README documents.

I also went through the bigger pile of GitHub GPU-monitoring repos people pointed me at (nvidia_gpu_exporter, gpustat, nvitop, gpu-hot, various Zabbix/Prometheus exporters, and a dozen more). Nothing new there — they all read the same nvidia-smi fields blackbox and sparkview already use, or are wrong-domain entirely (crypto mining, carbon accounting, one that turned out to be a computer-vision dataset toolkit with no GPU monitoring at all). One, matpool/mpu, does something genuinely different — reverse-engineers NVIDIA’s ioctl interface to fix container PID attribution — but it’s a custom kernel module hooking a proprietary interface, and blackbox is staying at zero non-standard dependencies on purpose, so that one’s noted, not adopted.

NVIDIA’s own Field Diagnostic tool, and a real trap in it

dgx-spark-fieldiag is NVIDIA’s official RMA pre-check suite — read the full user guide before touching it. It’s legitimately disruptive by design (disables Secure Boot, drops to a text console, stops docker, 30–40 minutes), so blackbox never installs or runs it — it only checks whether it’s present, and if you’ve run it yourself, cross-references its summary.json verdict against blackbox’s own scan window.

The trap, in case it saves someone else the afternoon it cost me: the current package version (2.0.4-1) hard-depends on the entire Mellanox/InfiniBand stack (ofed-scripts, mft, opensm, infiniband-diags) — even on a box with no ConnectX-7 NIC at all. Installing that stack triggers DKMS kernel-module builds, and with Secure Boot on (default), the first one pops a Machine-Owner-Key enrollment dialog that is not cancellable and has no timeout. If nothing’s watching that terminal, apt just sits there — mine sat for over 7 hours. If you hit “Depende: ofed-scripts pero no es instalable”: check lspci for an actual Mellanox device first, and if you don’t have one, pin the older version:

sudo apt-get install -y dgx-spark-fieldiag=1.0.9-1

That version only needs stress-ng/fio/memtester — no OFED, no DKMS, no MOK dialog — and runs every test except CX7Stress, which can’t run without ConnectX-7 hardware anyway.

One more thing out of that guide: it documents C2CStress as its own separate test from GpuStress/CpuStress — “stress chip-to-chip interface between CPU and GPU.” That’s independent, official confirmation that NVLink-C2C, not the PCIe device nvidia-smi enumerates, is the real GPU↔CPU data path on this chip — exactly why that stuck-at-1x PCIe link above never mattered.

Repo, issues, PRs: GitHub - lcasarin-maker/blackbox: Post-mortem forensic instrumentation for NVIDIA GB10 AI workstations (DGX Spark, ASUS Ascent GX10, Gigabyte AI TOP ATOM): Xid, PCIe, xHCI, thermal, OOM, and crash diagnostics · GitHub


As per usual: I’m no technical guy, I’m a lawyer processing the obstacles with my simple logic, so please excuse any blunders along the way — obviously Claude made this post, but I just published my previously private repo because it may help us all play well with the new toy.

1 Like