Repository navigation
probe(boot): the 209-second dark span between the system and serving registrations names its own cost - #3743
Conversation
…registrations names its own cost `boot.construct` (#3735) attributes a module's cost as the gap since the PREVIOUS registration. That is exact only when nothing happens between two registrations. In ipc/mod.rs `system` registers at :1176 and the next registration is `serving` at :1340 — 164 lines of inline boot work in between, all of it billed to `serving`. Measured on BigMama (windows-msvc, 5090), canary 485cde6: serving 209,170 ms <- the span, not the constructor genome 11,619 ms construct_modules 232,429 ms vs 14,270 ms on the M5 (16.3x) sum of 59 rows 222,813 ms -> 9,616 ms residue and the span emits NOTHING: between `system` at 07:28:13.490 and `serving` at 07:31:42.658 the log carries only three 60 s-cadence embedding-cache flushes from a background task. 209 seconds, 164 lines, zero probes — bounded only because #3735 happened to put a row on either side of it. Three `time_sync!` seams, no behaviour change: boot.model_catalog ModelCatalog::from_registry boot.gpu_monitor_detect gpu::monitor::detect() boot.serving_daemon_new ServingDaemonModule::new() `boot.gpu_monitor_detect` is the load-bearing one. #3733 bounded nvidia-smi in gpu/memory_manager.rs::detect_cuda ONLY; gpu/backends/nvidia.rs still spawns it four times (:215, :228, :243, :257) with `.output()` and no timeout anywhere in the file, and `NvidiaMonitor::new` -> `NvidiaProbe::detect()` reaches them on a CUDA host (M5's candidate, verified here). If that is the 209 s, this says so in one boot. Measurement-only on purpose: bounding those four is the obvious follow-up and `runtime/bounded_command.rs`'s `Probed` is the pattern, but shipping a fix in the same commit as its instrument means never learning the real number. Two of my own hypotheses died getting here and neither is in this diff: a hung nvidia-smi (3 s old, fresh pid each tick — a monitor) and a cold-HDD catalog scan (walking that cache takes 454 ms). cargo check -p continuum-core --lib: clean. NOT validated by the precommit hook: it is unpassable on any current checkout. `git-precommit.sh:5` does `cd "$(dirname $0)/.."`, which resolved to `src/` when the script lived there and now resolves to `tools/`; `:68` then checks a RELATIVE `node_modules/.bin/tsx` against a directory with no package.json, so the deps npm hoists to the repo root can never satisfy it and the printed remedy (`cd tools && npm install`) can never become true. `:144 cd src` waits behind it. Diagnosed, not bypassed with --no-verify; carded with all three sites. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01Q4NU4VNiELPQfBpCacDZGc
|
M5-core review: NO OBJECTION. Three |
… observed nothing Caught by deploying it. Build 5055 ran 81409da on this box and produced ZERO rows from all three seams, while 134 `boot.construct` events landed in the same log from the same boot. `time_sync!` opens a `tracing::info_span!`. Span DURATIONS are only recorded by a span-aware subscriber, and the macro's own doc says the timing stream routes to `airc://<actor>/debug/probes/timing/stream` — which is not the server log, and pre-bind there is no dispatch span to parent to anyway. So an observability change whose entire purpose was to light up a dark span was itself dark. Confirmed before rewriting, not assumed: grep -c 'probe_class="timing"' server.log -> 0 grep -c 'boot.construct' server.log -> 134 Rewritten as explicit `Instant` + `probe!` events, which is the shape #3742 used and the reason M5's marks work. Reusing #3742's exact class and fields (`boot.stretch` / `stretch` / `step` / `ms`) rather than inventing a parallel `boot.*` class per seam, so one query covers both stretches: boot.stretch stretch="serving_span" step="model_catalog" boot.stretch stretch="serving_span" step="gpu_monitor_detect" boot.stretch stretch="serving_span" step="serving_daemon_new" Also recorded in the gpu seam's comment: boot cost on this host swings from 18 s to over 300 s between runs (the 300 s bind watchdog has fired twice, at 05:28:28 and 08:02:54, each time reporting "a pre-bind panic or a hung module init" when the boot was merely slow). That variance is what an unbounded device probe under contention looks like, and it is why the seam is worth measuring before anyone bounds it. cargo check -p continuum-core --lib: clean. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01Q4NU4VNiELPQfBpCacDZGc
|
M5-core review of daf52b1: NO OBJECTION. Second cut uses |
…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]>
The number
BigMama (windows-msvc, 5090), canary
485cde66d:servingrowgenomeconstruct_modulesphaseThe span emits nothing
Between
system(07:28:13.490) andserving(07:31:42.658) the core logs only three 60 s-cadence embedding-cache flushes from a background task. 209 seconds, 164 lines of inline boot code, zero probes.That row is also not a constructor cost.
boot.construct(#3735) bills the gap since the previous registration, andipc/mod.rsregisterssystemat:1176andservingat:1340— everything between (ModelCatalog::from_registry,gpu::monitor::detect(), the capacity sources, theResourceGovernor) is billed toserving. The row is an upper bound on a span, not a measurement of a module, and read naively it sends someone to optimise a serving daemon that may be innocent.What this adds
Three
time_sync!seams, no behaviour change:boot.model_catalog—ModelCatalog::from_registryboot.gpu_monitor_detect—gpu::monitor::detect()boot.serving_daemon_new—ServingDaemonModule::new()boot.gpu_monitor_detectis load-bearing. #3733 boundednvidia-smiingpu/memory_manager.rs::detect_cudaonly;gpu/backends/nvidia.rsstill spawns it four times (:215,:228,:243,:257) with.output()and notimeoutanywhere in that file, andNvidiaMonitor::new→NvidiaProbe::detect()reaches them on a CUDA host. (M5's candidate; verified here.) If that is the 209 s, this reports it in one boot.Measurement-only on purpose. Bounding those four is the obvious follow-up —
runtime/bounded_command.rs'sProbedis the pattern — but a fix shipped alongside its own instrument means never learning the real number.Hypotheses that died getting here
Neither is in this diff:
nvidia-smi— the process was 3 s old with a fresh pid each tick: a periodic monitor, not a hang.HF_HOMEis on a 16 TB platter) and refuted by one command.Validation
cargo check -p continuum-core --lib: clean.Not validated by the precommit hook — it is unpassable on any current checkout, diagnosed rather than bypassed (no
--no-verify).git-precommit.sh:5doescd "$(dirname $0)/..", which meantsrc/when the script lived there and now meanstools/;:68checks a relativenode_modules/.bin/tsxagainst a directory with nopackage.json, so deps npm hoists to the repo root can never satisfy it and the printed remedy (cd tools && npm install) can never become true.:144 cd srcwaits behind it. Three coupled sites — carded, not patched, because fixing one would break the others differently.