Repository navigation
fix(gpu): bound the remaining driver probes — six sites, not the one #3733 fixed - #3745
Merged
Merged
Conversation
…3733 fixed #3733 bounded `gpu::memory_manager::detect_cuda` and stopped there. A full-tree sweep for `nvidia-smi` / `vulkaninfo` / `rocminfo` finds five more, and the worst of them is on the same class of path: module CONSTRUCTION, before the IPC socket exists. gpu/backends/nvidia.rs::probe_blocking 2 calls CONSTRUCTION Reached from `NvidiaMonitor::new` → `gpu::monitor::detect()`. An unbounded wait here does not degrade telemetry, it stalls BOOT — precisely the shape #3733 fixed one file over. BigMama measured a 209 s `serving` constructor on a CUDA host (2026-09-05); this is a candidate for where those seconds went, and the probe now names itself either way. gpu/backends/nvidia.rs::query_gpu per TICK gpu/backends/nvidia.rs::query_process_bytes per TICK Different failure, and quieter. These do not stall boot: they park the monitor task forever on the first hang and the atomics FREEZE AT LAST-GOOD. Stale telemetry that reports itself as current is worse than a missing reading, because the scheduler keeps placing lanes against numbers that stopped moving — the same defect as `ready:true` surviving a SIGKILL. inference_capability/hw_probe.rs::try_detect_cuda nvidia-smi inference_capability/hw_probe.rs::try_detect_vulkan vulkaninfo Neither was in anyone's list. Both are reached from `probe_hardware_profile`, which the inference coordinator and the capacity profile call. The Vulkan one runs when the CUDA probe declines, so on a host whose GPU stack is unwell it is the SECOND unbounded wait in a row — the exact pattern `detect_gpu` had. The word `timeout` appeared nowhere in `gpu/backends/nvidia.rs` before this. TWO TOOLS ON PURPOSE, matching the tier rather than unifying for neatness: the blocking construction probes use `system_resources::bounded_command`, which is sync because it runs on the boot thread with no runtime to await on. The per-tick queries use `tokio::time::timeout`, correct INSIDE the runtime. Same contract, different tier — and the module doc on bounded_command already warns against dragging tokio onto the pre-bind path. One 10 s ceiling everywhere, matching `GPU_PROBE_TIMEOUT` and #3719's serving probe, so a host that is slow in one place is not judged by three clocks. Every bounded site emits `boot.gpu_detect` with backend + stage + outcome, so `ok` / `absent` / `timed_out` / `unstartable` stay four distinct facts rather than one `None`. That is complementary to BigMama's #3743, which measures these same seams: if her probes land first they name which call hangs; this turns whichever it is into a named row plus a boot that CONTINUES. VERIFICATION, split honestly: - `gpu/backends/nvidia.rs` is deliberately ungated (its own mod.rs says "do not tidy a cfg onto it"), so it compiles on this Intel Mac. `cargo check -p continuum-core --lib --no-default-features --features livekit-webrtc,llama/mac-cpu-only` → exit 0, no errors or warnings in the changed files. This half is locally verified. - `hw_probe.rs`'s two blocks are inside `cfg(feature = "cuda")` / `cfg(feature = "vulkan")` and CANNOT be type-checked on macOS. CI and a CUDA host are their first real reader, same as #3733. Card 0f09fec7 follow-up. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
Contributor
Author
|
M5-core review: NO OBJECTION with the receipt — whole mods on the branch head: SEQUENCING (BigMama's point, agreed in the room): merge #3743 first and let the 5090 take ONE boot so |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#3733 bounded
gpu::memory_manager::detect_cudaand stopped there. A full-tree sweep fornvidia-smi/vulkaninfo/rocminfofinds five more — and the worst are on the same class of path: module construction, before the IPC socket exists.The six sites
nvidia.rs::probe_blocking(×2)NvidiaMonitor::new→gpu::monitor::detect()nvidia.rs::query_gpunvidia.rs::query_process_byteshw_probe.rs::try_detect_cudaprobe_hardware_profilehw_probe.rs::try_detect_vulkanThe word
timeoutappeared nowhere ingpu/backends/nvidia.rsbefore this. The last two were in nobody's list.Two different failures, deliberately
The construction probes stall boot — BigMama measured a 209s
servingconstructor on a CUDA host, and this is a candidate for where those seconds went.The per-tick queries are quieter and arguably worse: they don't stall boot, they park the monitor task forever on the first hang and freeze the atomics at last-good. Stale telemetry reporting itself as current keeps the scheduler placing lanes against numbers that stopped moving — the same defect as
ready:truesurviving a SIGKILL.Two tools, matching the tier
Blocking construction probes use
system_resources::bounded_command(sync — it runs on the boot thread with no runtime to await on). Per-tick queries usetokio::time::timeout, correct inside the runtime. Same contract, different tier;bounded_command's module doc already warns against dragging tokio onto the pre-bind path.One 10s ceiling everywhere, matching
GPU_PROBE_TIMEOUTand #3719 — so a host that's slow in one place isn't judged by three clocks.Every site emits
boot.gpu_detectwith backend + stage + outcome, keepingok/absent/timed_out/unstartableas four distinct facts rather than oneNone.Complementary to #3743, not overlapping: that PR measures these seams, this one bounds them. If its probes land first they name which call hangs; this turns whichever it is into a named row plus a boot that continues. Deliberately not folded together — a measurement PR that also changes behaviour can't tell you whether the number moved because you measured it or because you changed it.
gpu/backends/nvidia.rsis deliberately ungated (its ownmod.rssays "do not tidy a cfg onto it"), so it compiles on this Intel Mac.cargo check -p continuum-core --lib --no-default-features --features livekit-webrtc,llama/mac-cpu-only→ exit 0, no errors or warnings in the changed files.hw_probe.rs's two blocks are insidecfg(feature = "cuda")/cfg(feature = "vulkan")and cannot be type-checked on macOS. CI and a CUDA host are their first real reader, same as fix(gpu): bound every detect_* subprocess — an unbounded probe pre-bind hangs the whole boot #3733.Card 0f09fec7 follow-up.
🤖 Generated with Claude Code
https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE