Recommendation: Close
Commit 501bb0e cleanly resolved Round 1's ownership/drain blocker by extracting the shared close_store helper and routing all three early-error paths and Worker::close_store through it (with zero verified code bugs remaining). However, PR #698 is now 100% superseded by already-merged PR #709 (e899a4f, which explicitly states it addresses #698 and #701), and #709 already landed this exact helios/src/server/runtime.rs reorder and close_store helper on main together with close_store unit tests, updated docs, and explicit #698 credit in code (helios/src/runtime_core/persistent_worker.rs:2939). Recommend closing PR #698 as superseded by #709 with explicit credit to @ebfio for the GB300 cuModuleLoadData deadlock diagnosis, rather than asking for a rebase and server-feature test re-run that would produce zero functional diff.
Merge Risk
Level: Low
- Already landed & conflicting with
main: The single-file diff inhelios/src/server/runtime.rs(+65/−53) is completely duplicated by merged#709(main helios/src/server/runtime.rs:760-794,:798-886,:1282-1302,:1465-1467) and cannot merge as-is; rebasing ontomainleaves no functional change. - No code correctness or hot-path defects in
501bb0e: AllRankExecutor::newconstructors (GraphExecutor::new,ThreadedExecutor::new,TensorParallelExecutor::new) enforce drain-or-abort on failure, andclose_storepreserves theManuallyDropslab-retention and panic-safety contract with zero hot-path overhead. - Unresolved verification gap on this branch: The PR's reported validation (
cargo test -p flare-helios --features runtime-core) still does not compile#[cfg(feature = "server")]code, though the landed equivalent onmainpassed theruntime-core,serversuite and SM120 3-way Green Context CUDA test in#709.
Walkthrough
helios/src/server/runtime.rs:657-691: Movescrate::offload::open(prepared, gpu_cubins, copy_gate)ahead ofRankExecutor::new(manifest, peers)(after the multi-process non-sharded check at:644-656), readingmanifest.offloaddirectly soGpuRankCodec::newfinishescuModuleLoadDatabefore persistent GPU workers launch.helios/src/server/runtime.rs:695-706,:713-719,:777-783: Replaces Round 1's ad-hoclet _ = store.close()/std::mem::forgetblocks on all three post-open startup failure paths with calls to the sharedclose_store(store, &mut shutdown)helper.helios/src/server/runtime.rs:1137-1157,:1353-1355: Extractsfn close_store(store: Option<Box<dyn flare_selene::HostStore>>, shutdown: &mut Shutdown)preservingManuallyDropretention when!shutdown.drained, on close error, or on unwind, and delegatesWorker::close_storeto it.mainsupersession (#709):main helios/src/server/runtime.rs:760-794,:798-886,:1282-1302,:1465-1467already carry the identical reorder andclose_storehelper, plusphase_tests.rs:2399-2459,docs/prefix-cache-offload.md:59-63,docs/runtime-core-design.md:684(not opened), and credit atpersistent_worker.rs:2939.
Pre-merge Checks
- [PASS] Security / malicious screen: Single-file startup reorder and teardown helper extraction in
helios/src/server/runtime.rs; no newunsafeblocks, dependencies, flags, or external I/O. - [PASS] Charter & value fit: Root-cause startup-ordering fix for a real CUDA deadlock (
#397) with minimal model-agnostic footprint; contributor@ebfio's diagnosis directly informed#709and follow-on P1#701and should be credited on close (#229). - [WARN] Related / duplicate / conflict check: Fully superseded by merged
#709(same hunk inhelios/src/server/runtime.rsalready onmain, plus tests and docs); conflicts withmainas-is. - [WARN] Tests & verification evidence: Reported
cargo test -p flare-helios --features runtime-coreomitsserver(helios/src/lib.rs:30-31,helios/Cargo.toml:21,25) and suggested-p heliosdoes not exist (helios/Cargo.toml:2), so zero lines of501bb0ewere compiled or tested here.
Blockers
-
PR is fully superseded by merged PR #709 (
helios/src/server/runtime.rs:657-783, 1137-1157, 1353-1355vsmain helios/src/server/runtime.rs:760-886, 1282-1302, 1465-1467)- Verified behavior & impact: Merged PR
#709("Unblock lossless KV compression across Ignition, selene-manager, and Helios Green Contexts") explicitly addresses#698and already landed every element of this single-file diff onmain: the pre-RankExecutor::newcrate::offload::openreorder (main :760-794), the byte-identicalclose_storehelper (main :1282-1302), all three early-error call sites (main :805, :818, :882), andWorker::close_storedelegation (main :1465-1467).#709also landed the four-caseclose_storeunit test (main helios/src/server/runtime/phase_tests.rs:2399-2459), updated docs (main docs/prefix-cache-offload.md:59-63,docs/runtime-core-design.md:684(not opened)), and credited#698in code (main helios/src/runtime_core/persistent_worker.rs:2939). Rebasing#698ontomainleaves zero functional diff. - Concrete fix: Close PR
#698as superseded by#709, explicitly thanking and crediting@ebfiofor diagnosing the GB300cuModuleLoadDatastartup deadlock (and noting that their follow-on P1 report#701was addressed by#709's 3-way codec Green Context and extended in#723).
- Verified behavior & impact: Merged PR
-
Prior Blocker #2 (Gate 3) remains unresolved — mandatory
server-feature test suite was never compiled or run (helios/src/lib.rs:30-31,helios/Cargo.toml:2,21,25)- Verified behavior & impact:
helios/src/server/runtime.rsis gated on#[cfg(feature = "server")](helios/src/lib.rs:30-31), which is disjoint fromruntime-core(helios/Cargo.toml:21,25). The reported validation (cargo test -p flare-helios --features runtime-core) never compiled or tested any line of501bb0e, and the suggested command (cargo test -p helios --features runtime-core) names a nonexistent package (helios/Cargo.toml:2isflare-helios). Perdocs/design-review.md:180-184, 247-251, leaving the applicable Layer-1 crate test unrun blocks merge. - Concrete fix: Moot if closing as superseded by
#709(which already validated the landed code under--features runtime-core,server). Only if this branch were ever rebased and pursued for any remaining change would it require runningcargo test --locked --release --manifest-path helios/Cargo.toml --features runtime-core,server.
- Verified behavior & impact:
Should Fix
None.
Subtract / Simplify
- Close PR #698 as superseded by merged
#709(helios/src/server/runtime.rs): The cleanest subtraction is closing the PR rather than carrying a redundant rebase; every functional line is already onmain(main helios/src/server/runtime.rs:760-886, 1282-1302, 1465-1467).
Nits
helios/src/server/runtime.rs:716-717,:780-781:shutdown.error = Some(error);overwrites any error recorded byclose_store(store, &mut shutdown)on the previous line (main :819, :883usesshutdown.error.get_or_insert(error.clone());and signalsready_txafterclose_store). Benign in501bb0ebecauseready_tx.send(Err(error.clone()))already deliverederrorto the caller (:855-864), which only readsshutdown.drainedonOk(Err(error)).- The PR description still describes Round 1's removed ad-hoc cleanup (
store.close()directly /std::mem::forget) rather than501bb0e'sclose_storehelper; no rewrite needed if closing as superseded.
Dropped on verification
- Round 1 Blocker #1 (
HostStore::closeownership violation andstd::mem::forgetleak): Resolved in501bb0evia sharedfn close_store(helios/src/server/runtime.rs:1137-1157) andWorker::close_storedelegation (:1353-1355). - Code Correctness Audit Minor 1 ("
RankExecutor::newfailure tears down the store under an unverifieddrained: true"): Verified false against all threeRankExecutor::newcallees. Every constructor enforces"Constructor failure cannot return an undrained ownership lease"by callingstd::process::abort()whenever startup GPU drain cannot be confirmed (helios/src/execution/transport.rs:778-782,helios/src/execution/threaded.rs:711, 722, 739, 760, 794-821,helios/src/execution/parallel.rs:154, 168, 201-204). For persistent workers,finish_startup→control.start()(transport.rs:804,helios/src/runtime_core/persistent_worker.rs:410-430, 611-630) issues a singlecuGraphLaunch: on errorWorkerStateremainsIdle(nothing launched), and on successGraphExecutor::newreturnsOk. Thus anErrreturn fromRankExecutor::newis always drained (matchingmain helios/src/server/runtime.rs:801-807). - Code Correctness Audit Minor 2 ("No test covers early-error store teardown"): Moot —
#709already landedearly_startup_close_store_preserves_drain_and_slab_retention_contractonmain(main helios/src/server/runtime/phase_tests.rs:2399-2459). - Code Correctness Audit Informational ("
docs/prefix-cache-offload.md:840-842contradicts code"):#709already documented the new ordering onmain(docs/prefix-cache-offload.md:59-63,docs/runtime-core-design.md:684(not opened)); the older line in section 2.8 (main docs/prefix-cache-offload.md:889-890) is a minor doc cleanup onmain, not a reason to keep#698open. - Subtraction Audit #2, #4, #6 (
Binding::take_open/open_binding,failed_starthelper,DrainGuard::close_with): Dropped as out-of-scope refactoring churn for a minimal, already-superseded fix. - Subtraction Audit #3 & Gates Audit Finding 4.1 (
shutdown.error = Some(error)overwrite and stale PR description): Downgraded to Nits (non-blocking given theClosedisposition and the verifiedready_txflow athelios/src/server/runtime.rs:850-865).