Repository navigation
gpu-hold: reap a token that names no holder - #2880
Conversation
…s (engine#2875) The 2026-11-19 watcher run alerted `!! UNCOVERED HYV4FlashForConditionalGeneration (new class)` (autotrust/hy4-flash-concise, a re-wrap of atakans/Hy4-flash-NVFP4, itself a quantisation of tencent/Hy4-flash). The class is Hy v4 Flash, a vision+text MoE: a HYV4FlashForConditionalGeneration wrapper plus a HYV4FlashForCausalLM trunk (hidden 3072, 42 layers, 32/32 heads, head_dim 64, vocab 120832, 1M ctx, 16 experts/token, moe_intermediate 1536) whose layer_types alternate deepseek_sparse_attention with sliding_attention under a compressed indexer (compress_ratio 4, indexer head_dim 128, gated key pooling), with engram_* embedding fields on top. The pinned backend registers exactly one hy class, HYV4ForCausalLM -> hy_v4 (conversion/__init__.py:145, conversion/hy_v4.py:24 class HYV4Model(DeepseekV2Model), src/llama-arch.cpp:140) -- the text-only Deepseek-v2-shaped model. There is no hy_v4_vl anywhere in it (0 hits for hy_v4_vl in conversion/__init__.py and src/llama-arch.cpp at pin 8d26add2cf9a), and HYV4FlashForCausalLM is unknown to it, so neither the wrapper class nor the Flash trunk converts. Upstream transformers main does ship hy_v4 and hy_v4_vl, which is why the watcher read the class as native rather than `. REMOTE-CODE`; support in the reference implementation is not support in a backend this engine can call. - registry/significant.json: the entry, `watch: "report"`. - docs/arch-gaps.md: the dated note with the config, the upstream checks and why mapping the name would advertise a family the engine cannot serve. - registry/census.json: declined_architectures 24 -> 25 (derived by tools/census.py from significant.json); declined_models stays 465 because the class has no models in the 2026-11-18 raw sweep. tests/census_watch_test.py, tests/registry_gaps_test.py, tests/registry_content_test.py, tools/registry_build.py --check-gaps and tools/copyright.py --check pass.
…(engine#2875) The 2026-11-19 watcher reported the pinned vllm-project/semantic-router moved (e7c0f99c90cd -> 9db290309815) with watched paths changed, and one d3 repo not in the list. Read the window (100 commits, six touching a watched path): - The System One HTTP contract gains a family and nothing it already says moves. 6179d1bcd (#6840) adds vela3_pico to the family lists in config/schemas/systemone/vllm-sr-5.0.extensions.yaml (roles, preset, head and the rest; 13 lines, all list extensions) and one line of src/model-runtime/vllm_srun/api/openapi.yaml. No field is added, removed or retyped, src/model-runtime/vllm_srun/systemone.py does not move, and the wire protocol string stays vllm-sr/systemone@1. - The five other watched commits change what the upstream d3 runtime answers, not how it is called: 2cdb4e494 (#5940) shares one state encode across equal-state requests of a burst; b14924cbd (#6997) reads control tokens typed in the request text as text; 8faa6efa9 (#7000) keeps whole entities under a raised span threshold and fixes span edges; 34c2c14c2 (#7001) has a span question read the user part of a state without a description; bba8a629a (#7002) validates Vela 3.0 question types, span labels and image-only states. None of it reaches npu/systemone.h, which copies the pack's d3_format.py / d3_runtime.py prompts and answers. A parity check against upstream (engine #653) should expect the answer-side differences on vela3-mini / vela3-flash spans. vllm-sr/d3.1-nano (created 2026-11-12, 236 downloads) is a real d3 pack -- d3_format.py, d3_engine.py, d3_compose.py and MODEL_MANIFEST.json in the repo -- fine-tuned from Qwen/Qwen3.5-2B, so it is a new pack on the way, not a derivative of a listed repo, and it is now in d3_sources.known. tests/census_watch_test.py, tests/registry_content_test.py, tests/registry_gaps_test.py, tools/registry_build.py --check-gaps and tools/copyright.py --check pass.
A token that names no holder is invisible to reap_token()'s dead-pid arm, and the
grant path cannot overwrite it either: the write is `set -o noclobber`, so it fails
silently against the existing file and the poll says nothing. Every ticket on the
box then spins for as long as the file exists.
Measured 2026-11-19 on strixhalo: a crash cycle left a 0-byte ~/GPU-TOKEN, and
ticket ab2 waited 4828 s on it while nine takes logged nothing but their 120 s
retry line. The next poll after `rm -f ~/GPU-TOKEN` granted in 0 s.
An unreadable token is now reaped once it has been unchanged for
GPU_HOLD_TOKEN_GRACE seconds (default 5). The grace is what keeps a holder that is
mid-write from being robbed: a holder writes its token once.
tests/gpu_hold_stale_token_test.sh gains three arms: an empty token, a truncated
token ("gpu-hold waste pi", what a crash writes), and a fresh unreadable token that
must be left alone -- 5/5 green here. The file's other 13 tests are unchanged and
still green.
6198d46 to
70abe3e
Compare
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
What broke
~/GPU-TOKENwas a 0-byte file on strixhalo (mtime from a crash cycle).gpu-holdcould not take it and could not say why:set -o noclobber, so the write simply fails against an existing file;reap_token()only reaps a token whose content names a dead pid, and an empty file names nobody.So every take polled a 2 s loop in silence, forever. Measured: ticket
ab2sat 4828 s, nine take attempts logged nothing but their retry line, and the next poll afterrm -f ~/GPU-TOKENgranted in 0 s.Fix
reap_token()now reaps an unreadable token once it has been unchanged forGPU_HOLD_TOKEN_GRACEseconds (default 5):The grace is the safety: a holder writes its token once, so a fresh unreadable file may be mid-write and is left alone; an unreadable file that has not moved for 5 s is a leftover, not a claim. A token that names a live holder is still left alone, and one that names a dead pid is still reaped immediately — the previous two arms are untouched.
Tests
tests/gpu_hold_stale_token_test.shgains three arms, and all five pass:The other 13
tests/gpu_hold_*_test.share unchanged and green, exceptgpu_hold_fault_abort_test.sh, which times out here on the unmodified script too (git show HEAD:scripts/gpu-hold→ rc=124), i.e. pre-existing on this host and not a regression from this change.Not fixed here
A host-side kill (
bg_killon the orchestrator, a dropped ssh) does not signal the far-sidegpu-hold: its payload keeps the device and keeps faulting until someone kills it on the box. That is harness discipline rather than a gpu-hold bug, but the next lane has to notice it — the escaped-process sweep only runs at release.