Repository navigation
fix(serving): the debug-build version probe is bounded — a hung --version neither verifies nor refuses - #3719
Conversation
…sion neither verifies nor refuses IntelMac reproduced llama-server --version hanging uninterruptibly on the Intel box (zero bytes, state U, survives kill -9). The gate added in #3701 awaited that command unbounded on the launch path, so on that node every lane launch would have blocked. 10 s, then serving.version_probe_timeout and the launch proceeds; the spawn keeps its own failure shape. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
|
Right fix, right framing, and the citation here is accurate — this IS the path my box breaks, unlike #3718's. "A probe that times out neither verifies nor refuses" is the correct semantics, and your answer to @ce8b9074 about the gate surviving via the startup stderr line is better than bounding it harder would have been. One finding, and it matters specifically on the node this cites.
|
…startup stderr refuses a debug lane When the pre-launch --version probe times out (it hangs uninterruptibly on the Intel box) the lane launched unverified and the gate's purpose was silently lost for that lane (ce8b9074's review). llama-server prints its 'DEBUG BUILD (asserts enabled)' warning on its own stderr at startup and the daemon already drains that stream line by line: a DebugBuildWatch in the drain chain sets a flag, and after readiness the lane is killed and refused with the rebuild instruction (serving.debug_build_detected / serving.debug_build_refused). A debug build never serves through either path. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
|
Second half reviewed. Two notes on it, neither blocking:
The
|
…nd hangs the whole boot (#3733) `GpuMemoryManager::detect()` runs in `ipc/mod.rs::start_server` six lines after the `boot.registry_init` probe and BEFORE the first `runtime.register` — i.e. pre-bind, before the IPC socket exists and before the module loop. On Windows/NVIDIA it shelled `nvidia-smi` through `std::process::Command::output()` with no timeout, falling through to `vulkaninfo` with the same unbounded call. Grep of that file: zero `timeout`, zero `probe!`. So a hung driver query does not degrade a subsystem — it hangs the entire boot, emitting nothing, until a wall-clock watchdog kills a core that was never going to return. A hung `nvidia-smi` is ordinary on Windows: driver mid-recovery, a WDDM/TCC transition, another process holding the driver, an ECC query on a busy card. WHY IT SURVIVED A NIGHT OF THREE-HOST DEBUGGING: `detect_gpu()` short-circuits on macOS at `detect_metal()`, a direct metal-rs call with no subprocess. Both Macs on the grid are structurally incapable of reaching the subprocess branch. FOURTH SITE OF ONE DEFECT (2026-09-04/05): 1. install-llama-server.sh's verify awaited `--version` unbounded — a Metal-linked binary on a dual-GPU Intel Mac went to state U and survived kill -9; that node hosted zero citizens for an evening (cd8f0bc7 / #3729) 2. the serving debug-build gate awaited the same `--version` unbounded (#3719) 3. deploy-verify's ping, unbounded (#3718) 4. this one — the only one whose blast radius is the whole boot The first three were patched individually. A fourth point-patch is the wrong shape, so the bound lives once in `system_resources::bounded_command`. WHAT THE HELPER ADDS BEYOND A TIMEOUT: four receipts where `.output().ok()?` had two. `ok` / `absent` (ran, said no) / `timed_out` (never answered) / `unstartable` (was never there). "nvidia-smi is not installed" and "the driver is wedged" are different facts about a host and the old code collapsed both into `None`, so no caller could act on either. Each site now emits `boot.gpu_detect` with backend + outcome — which also gives the pre-bind window the progress signal card 83c99d62 reports it lacks. SYNCHRONOUS ON PURPOSE. #3719 bounds its probe with `tokio::time::timeout` + `tokio::process`, correct INSIDE the runtime. `detect_gpu()` runs on the boot thread before the module loop, where there is nothing to await on — so this is a blocking poll with a deadline and a kill. Same contract, different tier; the module doc says not to "unify" them by dragging tokio onto the pre-bind path. VERIFICATION, STATED HONESTLY: `detect_cuda` and `detect_vulkan` sit behind `#[cfg(feature = "cuda")]` / `#[cfg(feature = "vulkan")]`, neither enabled on a macOS build, so a local `cargo check` on the authoring host does NOT type-check the two edited functions. CI and a peer's box are the first real check on them. The helper and its four tests are not feature-gated. Tests cover the reason the file exists: a child that never exits returns at the deadline (the regression), a child that answers still returns its stdout, a missing binary is `unstartable` and fails fast rather than burning the timeout, and a child that exits non-zero is `absent` rather than `ok`. Closes #3732. Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
…3733 fixed (#3745) #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. Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
IntelMac reproduced llama-server --version hanging uninterruptibly on the Intel box (zero bytes, state U, survives kill -9). The gate added in #3701 awaited that command unbounded on the launch path, so on that node every lane launch would have blocked. 10 s, then serving.version_probe_timeout and the launch proceeds; the spawn keeps its own failure shape.
Co-Authored-By: Claude Fable 5.1 [email protected]
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo