Skip to content

Open host prefix store before RankExecutor::new() to avoid cuModuleLoadData deadlock with persistent GPU workers - #698

Open
ebfio wants to merge 2 commits into
NVIDIA:mainfrom
ebfio:fix/helios-open-offload-before-persistent-worker
Open

ebfio wants to merge 2 commits into
NVIDIA:mainfrom
ebfio:fix/helios-open-offload-before-persistent-worker

Conversation

@ebfio

@ebfio ebfio commented Dec 2, 2026

Copy link
Copy Markdown

Summary

When serving any core that combines a PersistentWorker with --lossless-kv-compression gpu (GKV1), flare run deadlocks indefinitely inside Start server (GPU pegged at 100% SM, flare-offload-0 pegged at 100% CPU, HTTP server never binds):

  1. helios/src/runtime_core/mod.rs defers loading the embedded kv_codec_gpu cubin during Prepare kernels so offload::open() loads it lazily only when GPU compression is enabled.
  2. In helios/src/server/runtime.rs, RankExecutor::new(manifest, peers) runs before crate::offload::open(...) and calls control.start()?, launching the persistent GPU worker kernel on the device context (100% SM until control.stop()).
  3. ~90 lines later, crate::offload::open(...) spawns flare-offload-0, which calls GpuRankCodec::new → cuModuleLoadData() on the same CUDA context.
  4. libcuda.so.1!cuModuleLoadData() spins waiting for active kernels on the context to quiesce — which can never happen while flare-model is blocked waiting for flare-offload-0 to finish opening and control.stop() has not been called.

Confirmed directly via gdb on the wedged flare-offload-0 thread on a DGX Station GB300 (SM103, CUDA 13.2):

#0  0x00000000007bfda4 in ?? () from /lib/aarch64-linux-gnu/libcuda.so.1
...
#7  0x00000000006610f0 in cuModuleLoadData () from /lib/aarch64-linux-gnu/libcuda.so.1

Changes

  • helios/src/server/runtime.rs:
    • Move crate::offload::open(prepared, gpu_cubins, copy_gate) ahead of RankExecutor::new(manifest, peers) so GpuRankCodec::new loads kv_codec_gpu via cuModuleLoadData() while the GPU is idle, before any persistent worker kernel launches.
    • manifest.offload and its CUDA contexts are already prepared prior to RankExecutor::new, and RankExecutor::new only checks offload metadata (not the taken payload).
    • Add LIFO cleanup on all early-error paths after store opens (store.close() directly if RankExecutor::new fails; executor.close() first, then store.close() only when shutdown.drained, matching Worker::close_store()).
    • Startup is now exact LIFO-symmetric with the existing shutdown path (runtime.rs: executor.close() before worker.close_store()).

Verification

  • Verified on Ubuntu 24.04 aarch64 DGX Station GB300 (SM103) serving a persistent-worker core with --lossless-kv-compression gpu (GKV1) and a local selene-manager pool:
    • Before: Start server hung indefinitely (>400s, GB300 100% SM / 0% MEM, flare-offload-0 stuck in cuModuleLoadData()).
    • After: Start server completes cleanly in 0.6s, GKV1 GPU codec loads and compresses checkpoints (1.239–1.259× lossless on FP8 MLA KV, 0 CRC/verification failures), and SIGTERM shutdown (drain_on_shutdown) completes cleanly in 3.6s with zero cuModuleUnload deadlock.
    • (Note: On SM103 Green Context cores with cooperative persistent workers, GKV1 still contends with cooperative decode graphs at runtime because model.rs opens the codec stream on rank.execution_context() — a separate runtime issue independent of this startup-ordering deadlock fix.)
  • Suggested test command:
    cargo test -p helios --features runtime-core

Submission validation

On Hades Linux aarch64 (kernel 6.17.0-1029-nvidia-64k), using the current package name:

cargo test -p flare-helios --features runtime-core
1243 passed; 0 failed; 37 ignored

The existing GB300 before/after evidence above is retained from the supplied reproduction. No fresh GPU startup reproduction was run for this submission.

Discord: ebfio

Move offload store opening ahead of executor construction and close the
store and executor in LIFO order on every early failure path, preserving
ownership of drained resources.

This lets GPU KV-compressed cores reach server startup without the
persistent-worker startup deadlock. Other runtime GKV1 contention remains
outside this change.

Validation: cargo test -p flare-helios --features runtime-core on Hades
Linux aarch64: 1243 passed, 0 failed, 37 ignored. Existing GB300
before/after hardware evidence is supplied in the PR description; no fresh
GPU startup reproduction was run for this submission.

Signed-off-by: Eduardo Fonseca <ebf@ebf.io>
Design-Signed-Off-By: Iris; design-review=2e5b
Signed-off-by: Iris (Eduardo's coding agent)
@flare-autobot

Copy link
Copy Markdown
Collaborator

A case file has been opened for 698.
Case File Intake Report

Future reviews will auto-run 90 minutes after code updates are pushed.

  • Re-review sooner: Call @flare-autobot after push.
  • Opt-out: Include #autobot:ignore in the PR or any comment.

@flare-autobot flare-autobot added bug Something isn't working triage:review Proposed change needs code review; this does not imply merge readiness. labels Dec 3, 2026
@flare-autobot

Copy link
Copy Markdown
Collaborator

Autobot Review

Full Review · Value Proposition · Case File

Recommendation: Changes Requested

The core startup reorder—opening the host prefix store before RankExecutor::new() launches persistent GPU workers—directly fixes a verified cuModuleLoadData deadlock with a minimal, model-agnostic footprint. It cannot merge as-is: the three new post-open cleanup blocks violate the HostStore::close ownership contract (swallowing close errors, dropping the store on failure/unwind, reporting drained: true anyway), and the cited validation run omitted the server feature so none of the diff was compiled or tested.

  • Blockers: 2 · Should fix: 0 · Subtract/Simplify: 1 · Nits: 1
Walkthrough
  • helios/src/server/runtime.rs:657-691: Moves crate::offload::open(prepared, gpu_cubins, copy_gate) ahead of RankExecutor::new(manifest, peers), reading manifest.offload directly after the multi-process non-sharded guard (:644-656) so GpuRankCodec::new (helios/src/offload/transfer/gpu_codec.rs:268-283) loads the deferred kv_codec_gpu cubin before control.start()? (helios/src/execution/transport.rs:793-808) launches persistent GPU workers.
  • helios/src/server/runtime.rs:695-707: Adds early cleanup on RankExecutor::new failure (let _ = store.close();), returning Shutdown { drained: true, error: Some(error) }.
  • helios/src/server/runtime.rs:714-726 and :784-796: Adds cleanup on scheduler construction and scheduler configuration failures—calling executor.close(), then let _ = store.close() if shutdown.drained or std::mem::forget(store) otherwise.
  • helios/src/server/runtime.rs:806, :829-830: Preserves happy-path worker.attach_store(store) and LIFO shutdown (executor.close() before worker.close_store(&mut shutdown)).
Merge Risk: Medium · up to 9ed34da
  • Blast radius: ModelRuntime::start_retaining_drain (helios/src/server/runtime.rs:657-796) runs on every prefix-cache offload configuration (CPU/GPU compression, memory/disk/pool tiers, single-rank and multi-rank), not just --lossless-kv-compression gpu.
  • Happy-path / hot-path impact: Zero steady-state runtime cost and strictly less startup concurrency—offload::open completes on the flare-model thread before RankExecutor::new runs tuning graphs or launches persistent GPU workers.
  • Failure-path risk: Today, if RankExecutor::new or scheduler setup fails and store.close() fails or unwinds, the new ad-hoc cleanup reports drained: true to flare/src/controller.rs:2905-2910 and drops the store while transfer/pool/disk threads may still reference registered host slabs or GPU destinations.
Pre-merge checks: ✅ 3 passed · ⚠️ 1 warnings

Have your agent review the Full Review for complete verified findings, file:line citations, and suggested changes.

To opt out, include #autobot:ignore in your post or comment.

Reuse the worker's drain-aware store close logic for executor and scheduler
startup failure paths. Retain the host store when executor drain or store close
fails or unwinds, and preserve the first startup error.

Validation on Hades Linux aarch64:
FLARE_TEST_TEMPLATE_DIR=/tmp/flare-test-templates-pr698 cargo test --locked
--release --manifest-path helios/Cargo.toml --features runtime-core,server
1897 passed, 0 failed, 84 ignored. The gated muse_spark fixture was unavailable;
its only consumer is ignored. No fresh GB300 GKV1 startup reproduction was run.

Signed-off-by: Eduardo Fonseca <ebf@ebf.io>
Design-Signed-Off-By: Iris; design-review=2e5b
Signed-off-by: Iris (Eduardo's coding agent)
lukealonso added a commit that referenced this pull request Dec 3, 2026
…Helios Green Contexts (#709)

* Unblock lossless KV compression across Ignition, selene-manager, and Helios Green Contexts

Why

End-to-end lossless KV checkpoint compression (`--lossless-kv-compression cpu`
using `ZKV1/v1/64-pivots` and `--lossless-kv-compression gpu` using
`GKV1/v2/64-pivots-rans32`) fails at three independent gates:

1. Ignition contract authoring (`ignition/preparation/contract.py`):
   `selene/src/shared/codec_layout.rs` defines 11 field encodings with strict
   block-byte divisibility and alignment rules (`selene/src/shared/codec.rs`),
   yet `contract.codec_layout` exposed no typed enum or validation, hardcoded
   `buffer="state_pool"`, and iterated every entry in `regions` without
   skipping `CONTINUATION_STATE`. Recipes that place `CONTINUATION_STATE` inside
   `regions` either hit `KeyError("state_pool")` or emitted duplicate
   overlapping `state_pool` fields rejected by Selene `Plan::new`.
2. Shared pooling in `selene-manager` (`selene-manager/src/pool/`):
   `selene` supports packed v4 pooling for single-host multi-GPU tensor-parallel
   instances (`TP>=2`), and `selene-manager` distinguishes multi-process
   sessions from single-process sessions by `session.ranks.is_some()` (set when
   `OpenSession.rank_secret` is nonempty). However, `store_bridge.rs` (`PutBegin`)
   and `claims.rs` (`PinAck` grant) checked `descriptor.ranks.len() >= 2`,
   rejecting every single-host TP>=2 packed put and peer export. Conversely,
   `core.rs`, `lookup.rs`, and `claims.rs` did not negotiate raw-only or exclude
   packed records (including all-literal v4 records) for true multi-process
   sessions.
3. GPU codec execution on persistent-worker cores (`helios/src/runtime_core/`,
   `helios/src/server/runtime.rs`):
   On cores that partition the GPU with CUDA Green Contexts for a resident
   persistent worker, two hazards occur under `--lossless-kv-compression gpu`:
   - `Runtime::start` constructed `RankExecutor::new` (launching the persistent
     worker graph) before calling `crate::offload::open`, which invokes
     `cuModuleLoadData` to load `kv_codec_gpu.cubin`. Calling `cuModuleLoadData`
     while a persistent worker kernel is resident deadlocks inside the CUDA
     driver (#698).
   - `NativeModel::prepare_offload` passed `rank.execution_context()` (the
     compute green context) to `GpuRankCodec`. Launching batched GPU codec
     kernels on either the compute green context or the device primary context
     (which overlaps 100% of compute SMs) contends with full-grid cooperative
     compute kernels, collapsing decode throughput and hanging multi-request
     batches (#701).

What changed

1. Ignition (`ignition/preparation/contract.py`, `tests/preparation/test_codec_layout.py`):
   - Before: `codec_layout(pool, regions, buffers, *, field_encoding=None)`
     accepted arbitrary untyped integers, hardcoded `"state_pool"`, and treated
     every `regions` item as a paged plane.
   - After: Added `CodecEncoding(IntEnum)` matching all 11 Selene IDs with
     `block_bytes` and `offset_alignment` properties, added export-time
     validation (`_validate_codec_encoding`) checking integer type, valid ID,
     positive block-multiple length, and 4-byte matrix offset alignment, added
     conservative `default_field_encoding(name, dtype, shape)`, and updated
     `codec_layout` (with optional `state_buffer=None`) to skip
     `CONTINUATION_STATE` regions, resolve the row buffer from
     `CONTINUATION_STATE` or `state_buffer`, sort and bounds-check row regions,
     and reject duplicate or conflicting buffers. Calling `codec_layout` with
     `field_encoding=None` continues to return `None`.

2. `selene-manager` (`selene-manager/src/pool/{core,store_bridge,lookup,claims}.rs`,
   `selene-manager/tests/packed.rs`, `selene-manager/tests/support/pool.rs`):
   - Before: `store_bridge.rs` and `claims.rs` gated packed puts and peer
     exports on `descriptor.ranks.len() >= 2`; `core.rs` echoed negotiated codec
     capabilities to multi-process sessions, and `lookup.rs`/`claims.rs` did not
     filter packed holdings by multi-process requester or source.
   - After: `store_bridge.rs` gates packed `PutBegin` on
     `self.sessions[&sid].ranks.is_some()`, and `claims.rs` gates packed peer
     `PinAck` grants on `claim.mp.req.layout.world() > 1 || claim.mp.src.layout.world() > 1`.
     `core.rs` keeps `offered_codec` for `RankAttach` and reconnect consistency
     checks while negotiating `codec = None` when `ranks.is_some()`. `lookup.rs`
     and `claims.rs` (`claim_begin` and `get_answer`) pass `None` codec
     capabilities to `permits_holding`/`permits_offer` whenever requester or
     source is multi-process, excluding all packed records (including
     all-literal v4 records) while leaving raw v3 records accessible.

3. Helios Green Contexts & startup drain (`helios/src/runtime_core/{persistent_worker,mod,model,memory}.rs`,
   `helios/src/server/runtime.rs`, `helios/src/server/runtime/phase_tests.rs`,
   `docs/prefix-cache-offload.md`):
   - Before: `GreenContextPartition` split the device into two partitions
     (`worker` + `compute`); `model.rs` passed `rank.execution_context()` to
     `prepare_offload`, `memory.rs` passed `self.ranks[0].execution_context()`
     as pool `registration_context`, and `server/runtime.rs` opened the host
     prefix store after `RankExecutor::new` started the persistent worker.
   - After: `plan_sm_split` and `GreenContextPartition::create` accept
     `reserve_codec_partition: bool` (enabled only when
     `options.prefix_cache.enabled() && !model.gpu_codec_cubins.is_empty()`).
     When enabled, `cuDevSmResourceSplit` creates three disjoint structured SM
     partitions (`worker`, one minimal aligned `codec` partition, and `compute`
     backfill preserving 16-CTA co-scheduling alignment with baseline fallback);
     devices too small for three partitions return an error recommending
     `--lossless-kv-compression cpu`. When compression is `off` or `cpu`, the
     existing 2-way split is unchanged (0 SMs lost). Added
     `NativeResources::offload_context()` returning `codec_context` when present
     and `self.context` otherwise, updated `model.rs` (`prepare_offload`) to use
     `offload_context()`, updated `memory.rs` (`registration_context`) to use
     `self.ranks[0].context`, and updated teardown to handle `codec_green_ctx`.
     In `helios/src/server/runtime.rs`, moved `crate::offload::open(...)` ahead
     of `RankExecutor::new(...)` (after the `binding.sharded()` guard) and
     extracted `fn close_store(...)` preserving `ManuallyDrop` slab retention on
     drain errors, panics, or undrained executors across all three early startup
     error paths before signaling readiness failure.

Claimed benefit and result

- Ignition exposes a validated, `CONTINUATION_STATE`-safe `codec_layout` helper
  so companion recipe repositories can emit valid `ModelContract.cache.codec_layout`
  across all model families.
- Single-host TP>=2 instances can store, recover, and peer-export packed v4
  checkpoints through `selene-manager` over SHM and TCP while multi-process
  sessions stay raw-only.
- On a persistent-worker core with `--lossless-kv-compression gpu`, loading
  `kv_codec_gpu.cubin` completes before persistent-worker launch and GPU codec
  kernels run on physically disjoint SMs. Measured in a component SM120 CUDA
  concurrency test on an NVIDIA RTX PRO 6000 Blackwell (188 SMs, 3-way split
  8 worker + 8 codec + 172 compute): concurrent cooperative compute sustained
  135,922.6 steps/s (baseline 7.6 us/step, 136,046 steps in 1.0 s, zero hangs)
  alongside 251 bit-exact 1.06 MiB `GKV1` encode+decode rounds (266.4 MiB/s
  combined encode+decode, 5.98x ratio). Whole-model SM103 serving speedup and
  multi-request B>=2 throughput are expected results pending SM103 qualification.

Supporting evidence and limitations

- SM120 CUDA test (`CUDA_VISIBLE_DEVICES=6`, RTX PRO 6000 Blackwell):
  `persistent_worker::tests::cuda_green_context_three_way_gpu_codec_runs_concurrently_with_persistent_worker_and_cooperative_compute`
  passed with real `ignition/preparation/kv_codec_gpu.cu` cubin.
- Python + CUDA tests (`FLARE_RUN_CUDA_TESTS=1 CUDA_VISIBLE_DEVICES=6` on
  `tests/preparation/test_codec_layout.py`, `tests/preparation/test_core_boundary.py`,
  `tests/test_kv_codec.py`, `tests/cli`): 163 passed, 0 skipped.
- Rust test suites (`--locked --release`):
  - `eos`: 12 passed.
  - `selene --features test-support`: 553 passed.
  - `selene-manager --features test-support`: 408 passed, 1 ignored (including
    12/12 in `tests/packed.rs` covering single-host TP2 packed put, TP2 peer
    DRAM packed export over SHM/TCP, and multi-process TP2 exclusion).
  - `helios --features runtime-core,server --lib`: 1,835 passed, 48 ignored
    (including all 20 targeted `persistent_worker`, `codec_layout_tests`, and
    `close_store` tests; 6 chat-template tests failed because
    `FLARE_TEST_TEMPLATE_DIR` was unset).
  - `flare`: 255 passed (247 lib + 7 `packed_canonical_download` + 1
    `reference_workflows`; 2 localhost `hub::tests::` flaked under parallel
    load and passed cleanly on re-run).
  - `flare-cli`: 246 passed, 3 ignored.
- TLA+ formal verification (`verification/helios-lifecycle/check.py` with
  `tla2tools-1.7.4.jar`): all 8 TLA+ models and Rust conformance checks passed
  with 0 errors.
- Limitations / unrun checks: Live SM103 Parallax `flare run` with exported
  cores at `B>=2` was not run (no SM103 hardware or exported model checkpoints
  on this host). Helios chat-template tests requiring `FLARE_TEST_TEMPLATE_DIR`
  were not run. Existing `persistent_worker::tests::cuda_*` tests with
  hardcoded `0x800_0000_0000` fixed VA collide with CUDA UVA placement on this
  16-GPU host and were not modified.

Design-Signed-Off-By: Antigravity (Gemini 3.1 Pro); design-review=2e5b

* Apply PR #709 review fixes for codec context settings, normative docs, and helpers

Why

- `NativeResources::prepare_kernels` applied recorded CUDA context limits and
  cache configuration to the primary, worker, and compute Green Contexts, but
  omitted `partition.codec_context`. Under `--lossless-kv-compression gpu`,
  `kv_codec_gpu` kernels and offload DMA streams ran with driver defaults on
  persistent-worker cores rather than the core's recorded context settings.
- Two normative specifications contradicted or omitted behavior changed in this
  branch: `docs/runtime-core-design.md` still specified a two-group Green
  Context split and two-context settings/teardown, and `selene-manager/PROTOCOL.md`
  did not specify that single-process sessions (including single-host `TP >= 2`)
  remain packed-capable while multi-process sessions negotiate raw-only and
  exclude packed holdings/offers.
- Secondary review items identified duplicated `selene-manager` capability
  gating (including an implicit source-world assumption in `get_answer`),
  `numbers.Integral` scalar rejection in `ignition.preparation.contract`,
  unreachable `state_buffer` validation when `row_regions` is empty, an implicit
  `row_buffer` collision check, a `0` sentinel in `plan_sm_split`, and a
  duplicated `TestFiles` fixture in `persistent_worker.rs`.

What changed

- Helios (`helios/src/runtime_core/{mod,model,persistent_worker}.rs`):
  - After storing `self.green_partition = Some(partition)`, call
    `apply_context_settings(&driver, codec_context, &core.context)?` whenever
    `codec_context` is non-null.
  - Assert recorded `CU_LIMIT_STACK_SIZE` (`4096`) on `worker_context`,
    `compute_context`, and `codec_context` in the 3-way SM120 CUDA test.
  - Compute `reserve_codec_partition` directly from
    `options.prefix_cache.enabled() && options.prefix_cache.compression == KvCompression::Gpu`.
  - Use `Option<u32>` for `aligned_codec` in `plan_sm_split` and clarify the
    small-SM error message.
  - Hoist a single `TestFiles` fixture in `persistent_worker::tests`.
- `selene-manager` (`selene-manager/src/pool/{core,lookup,claims}.rs`):
  - Extracted `packed_caps(&self.sessions, requester_sid, multi_process)` and
    routed `lookup.rs`, `claims.rs::claim_begin`, and `claims.rs::get_answer`
    through it, checking both `claim.mp.req.layout.world() > 1` and
    `claim.mp.src.layout.world() > 1` in `get_answer`.
- Ignition (`ignition/preparation/contract.py`,
  `tests/preparation/test_codec_layout.py`):
  - Accepted `numbers.Integral` (still rejecting `bool`) for codec encodings,
    offsets, and lengths.
  - Validated `state_buffer` before the empty `row_regions` early return and
    separated continuation-buffer collision checks from duplicate paged buffer
    checks, with unit tests covering all three.
- Normative docs (`docs/runtime-core-design.md`, `selene-manager/PROTOCOL.md`):
  - Documented the 2-way vs 3-way Green Context split, context settings and
    teardown for `codec_context`, pre-worker `offload::open`, and the
    single-process vs multi-process revision-4 packed rules.

Verification

- SM120 CUDA (`CUDA_VISIBLE_DEVICES=6`, RTX PRO 6000 Blackwell):
  `cuda_green_context_three_way_gpu_codec_runs_concurrently_with_persistent_worker_and_cooperative_compute`
  passed (`worker=8, codec=8, compute=172` SMs; `CU_LIMIT_STACK_SIZE=4096` verified
  on all three Green Contexts; concurrent cooperative compute `134,996.0 steps/s`
  alongside 250 bit-exact `GKV1` encode+decode rounds, `265.5 MiB/s`, `5.98x`).
- Rust (`--locked --release`):
  - `selene-manager --features test-support`: full suite passed (including 12/12
    in `tests/packed.rs`).
  - `helios --features runtime-core,server --lib`: `persistent_worker::tests`
    (9 passed), `runtime::phase_tests` (129 passed), `codec_layout_tests` (6 passed).
  - `RUSTFLAGS="-D warnings" cargo check --locked --all-targets` passed with
    0 warnings on `selene-manager` and `helios`.
- Python: `pytest tests/preparation/test_codec_layout.py tests/preparation/test_core_boundary.py`
  (12 passed).

Design-Signed-Off-By: Antigravity (Gemini 3.1 Pro); design-review=2e5b
Signed-off-by: Luke Alonso <lalonso@gmail.com>
@flare-autobot flare-autobot added duplicate This issue or pull request already exists performance Performance, latency, throughput, or memory-efficiency investigation or improvement. triage:superseded Behavior appears covered by main; check residual scope, then close if none remains. and removed triage:review Proposed change needs code review; this does not imply merge readiness. labels Dec 4, 2026
@flare-autobot

Copy link
Copy Markdown
Collaborator

Autobot Review

Full Review · Value Proposition · Case File

Recommendation: Close

Commit 501bb0e cleanly fixed Round 1's ownership/drain blocker, but PR #698 is now fully superseded by already-merged PR #709 — rebasing onto main would leave zero functional diff. Recommend closing as superseded, with explicit credit to @ebfio for the GB300 cuModuleLoadData deadlock diagnosis.

  • Blockers: 2 · Should fix: 0 · Subtract/Simplify: 1 · Nits: 2
Walkthrough
  • helios/src/server/runtime.rs:657-691: Moves crate::offload::open(prepared, gpu_cubins, copy_gate) ahead of RankExecutor::new(manifest, peers) (after the multi-process non-sharded check at :644-656), reading manifest.offload directly so GpuRankCodec::new finishes cuModuleLoadData before persistent GPU workers launch.
  • helios/src/server/runtime.rs:695-706, :713-719, :777-783: Replaces Round 1's ad-hoc let _ = store.close() / std::mem::forget blocks on all three post-open startup failure paths with calls to the shared close_store(store, &mut shutdown) helper.
  • helios/src/server/runtime.rs:1137-1157, :1353-1355: Extracts fn close_store(store: Option<Box<dyn flare_selene::HostStore>>, shutdown: &mut Shutdown) preserving ManuallyDrop retention when !shutdown.drained, on close error, or on unwind, and delegates Worker::close_store to it.
  • main supersession (#709): main helios/src/server/runtime.rs:760-794, :798-886, :1282-1302, :1465-1467 already carry the identical reorder and close_store helper, plus phase_tests.rs:2399-2459, docs/prefix-cache-offload.md:59-63, and credit at persistent_worker.rs:2939.
Merge Risk: Low · up to 501bb0e
  • Already landed & conflicting with main: The single-file diff in helios/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 onto main leaves no functional change.
  • No code correctness or hot-path defects in 501bb0e: All RankExecutor::new constructors (GraphExecutor::new, ThreadedExecutor::new, TensorParallelExecutor::new) enforce drain-or-abort on failure, and close_store preserves the ManuallyDrop slab-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 on main passed the runtime-core,server suite and SM120 3-way Green Context CUDA test in #709.
Pre-merge checks: ✅ 2 passed · ⚠️ 2 warnings
  • ✅ Security / malicious screen: Single-file startup reorder and teardown helper extraction in helios/src/server/runtime.rs; no new unsafe blocks, dependencies, flags, or external I/O.
  • ✅ 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 #709 and follow-on P1 #701 and should be credited on close (#229).
  • ⚠️ Related / duplicate / conflict check: Fully superseded by merged #709 (same hunk in helios/src/server/runtime.rs already on main, plus tests and docs); conflicts with main as-is.
  • ⚠️ Tests & verification evidence: Reported cargo test -p flare-helios --features runtime-core omits server (helios/src/lib.rs:30-31, helios/Cargo.toml:21,25) and suggested -p helios does not exist (helios/Cargo.toml:2), so zero lines of 501bb0e were compiled or tested here.

Have your agent review the Full Review for complete verified findings, file:line citations, and suggested changes.

To opt out, include #autobot:ignore in your post or comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working duplicate This issue or pull request already exists performance Performance, latency, throughput, or memory-efficiency investigation or improvement. triage:superseded Behavior appears covered by main; check residual scope, then close if none remains.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants