跳到主要内容
Octopus Research Institute
RN-2026-0013研究札记同行评审: 未经同行评审证据强度: 实验性状态: 已发布

A falsify-first root cause for a concurrent 4-bit decode crash: batch-composition KV-pool wipe trips a re-seed precondition

Ran Tao (Octoryn Research)

本文未经同行评审。请将其视为工作文档,而非经验证的结果。

摘要

Falsify-first root cause for a fatal trap that killed a single-resident 4-bit ~30B sparse-MoE decode daemon under concurrent decode on one Apple Silicon machine. An orchestration-free reproducer isolates the trigger: concurrent chat and interleaved chat-plus-embed crash, while embeddings-only and sequential traffic survive, refuting an "embeddings poison decode" guess. The mechanism is a batch-composition-change wipe of resident KV pools tripping a re-seed precondition no steady-state decode meets. Serializing GPU decode prevents it but gives no speedup; the per-stream fix is unimplemented.

本 Research Object 以其原始语言(英文)发表。

A falsify-first root cause for a concurrent 4-bit decode crash: batch-composition KV-pool wipe trips a re-seed precondition

1. Contribution

Claimed. A code-level root cause, established falsify-first, for a fatal trap (a runtime precondition failure) that killed a single-resident 4-bit ~30B sparse mixture-of-experts (MoE) decode daemon when multiple decode streams ran concurrently. We contribute: (a) a minimal, orchestration-free reproducer (pure HTTP requests against the resident daemon, no agent stack) that isolates the trigger to the resident inference backend; (b) a four-cell reproduction matrix that localizes the crash to concurrent decode and refutes an initial "embeddings poison decode state" hypothesis; (c) the precise mechanism — resident key/value (KV) pools on the GPU matrix-multiply layer are keyed by stream identity and batch size and are wiped on any batch-composition change, after which re-seeding demands a full KV prefix that steady-state decode never carried; (d) a contained mitigation (a feature flag that serializes GPU decode) that makes multi-sub-agent orchestration safe.

NOT claimed. No parallel-decode speedup (the mitigation serializes GPU decode). No fix to the underlying pool design (a per-stream isolation rewrite is unimplemented). No behavior beyond a single machine. No reproduction across multiple machines, model families, or precisions. This is a single-machine diagnostic with a single observed reproduction per scenario; it is not a throughput benchmark.

2. Methods

ItemValue
Model~30B-parameter sparse mixture-of-experts, 4-bit packed-int4 single-resident store
EngineInternal Apple-Silicon 4-bit resident decode path
HardwareSingle Apple Silicon machine. Exact SKU/RAM/OS: not recorded in source
BuildRecent build carrying the root-cause analysis plus mitigation; an adjacent prior fix added execution serialization for a shared-KV-pool data race
ReproducerPure HTTP requests against the resident daemon, no orchestration/agent stack; fresh daemon per scenario; six concurrent streams
Capstone regressionOrchestration regression at low max concurrency
Oracle / paritynot applicable (crash diagnostic, not a parity run)
Precision4-bit (packed int4 resident)
Crash classificationRuntime precondition failure → fatal trap, faulting frames read from crash reports

3. Results

Reproduction matrix (real 4-bit ~30B model, six concurrent streams, one observed run per scenario):

ScenarioVerdictMeaning
Sequential chat + embedSURVIVEDa single in-flight stream is fine
Concurrent chat completionsCRASHEDconcurrent decode is the trigger
Concurrent embeddingsSURVIVEDembeddings concurrency is safe
Interleaved chat + embedCRASHEDcrashes because chat (decode) is involved

Two crash sites, one cause. Both the batched decode path and the single-stream decode path fail on a precondition with the same intent ("key history too short to seed"). One fires in the batched decode loop, the other in the single-stream cached-step path.

Root cause. The resident KV pools are persistent mutable state on the GPU matrix-multiply layer, keyed by stream identity (single-stream) and by batch size (batched slabs). They assume a stable in-flight stream set. The batch loop performs continuous batching (active, non-finished streams only), so the batch size changes as requests join and finish; a batch-size change wipes the slabs, resets the filled counter, and the seed loop then tries to re-seed every continuing stream up to its current position. Because decode-appended K/V lives only in the GPU pools — the host-side cache is merely a counter — steady-state decode carries only the incremental KV, not the full prefix, and the precondition fails. The single-stream precondition fires symmetrically when a stream migrates between the batched and single pool sets as the active count crosses one.

Why the existing lock did not help. The prior execution-serialization lock prevents a GPU data race but not the state collision: a batch-size change or path migration between locked calls still wipes a continuing stream's KV.

Mitigation (shipped, no engine hot-path code). A feature flag disables single-encoder batched decode, which forces request-granular serialization: the batch loop truncates each step to the oldest job until it finishes, so exactly one stream's pool is live at a time and no wipe collision occurs. Observed: the concurrent-chat scenario with the flag → SURVIVED; the orchestration capstone regression at low max concurrency → all checks PASS, daemon SURVIVED, with all governed sub-agents correct (a calculator action, a memory action, a denied send-email action, and a summarize action).

4. Ablations / negative controls

  • Refuted hypothesis (recorded honestly). The initial hypothesis "embeddings poison decode state" is falsified by the matrix: concurrent embeddings SURVIVED while concurrent chat completions CRASHED. The trigger is concurrent decode, not embeddings.
  • Lock-domain control. The prior execution-serialization fix does not prevent the crash, isolating the failure to shared-pool state composition rather than a GPU data race.
  • Lockstep negative case. A prior constant-batch-size batched-serving benchmark never crashed because it ran all streams in lockstep at a fixed batch size, never triggering the batch-size-change re-seed — showing the crash is specifically a batch-composition-change phenomenon, not batching per se.

5. Threats to validity / limitations

  • Single observed run per scenario; no variance, no repeat counts recorded. Evidence level is experimental, not reproduced. The matrix verdicts are crash/no-crash observations, not statistics.
  • Hardware under-specified. Exact machine SKU, RAM, and OS version are not recorded in source.
  • Single model, single precision. Only the one ~30B sparse-MoE 4-bit configuration was exercised; no claim for other families, precisions, or model sizes.
  • Mitigation trades throughput for safety. The serialized-decode mode is concurrent submission with serialized GPU decode: no parallel-decode speedup, and micro-batch throughput is off in this mode. It is a per-deployment choice, not a default flip; the default keeps batched throughput for single-stream and lockstep-batch serving but remains unsafe under the agent-concurrency pattern.
  • Root cause is unfixed. The real single-machine fix (per-stream KV/scratch isolation) is a change to the validated batched path and is not implemented; it would require re-validating batched throughput and per-stream byte-identical parity. A scale-out alternative (multi-resident data-parallel federation) is cross-machine only, since one machine cannot hold two copies of the model resident.
  • Capstone scope. The PASS at low max concurrency demonstrates safety and correctness under the mitigation; it does not establish an upper concurrency bound or sustained-load durability.

6. Reproducibility

  • Reproducer. Run the concurrency-decode reproducer against a fresh 4-bit ~30B resident daemon; observe the two concurrent-decode scenarios crash and the sequential and embeddings-only scenarios survive. Confirm the mitigation by enabling the serialized-decode flag and re-running the concurrent-chat scenario (→ SURVIVED) and the orchestration capstone regression at low max concurrency (→ all checks PASS).
  • Environment. Machine SKU / RAM / OS / toolchain versions: not recorded in source.

声明边界

作者对范围的明确界定——本工作证明了什么、未证明什么——沿用自 Octoryn Research 的发表模型。

证明

  • The crash trigger is concurrent decode, not embeddings: concurrent chat and interleaved chat-plus-embed crash, while concurrent embeddings and sequential traffic survive in a minimal orchestration-free reproducer.
  • High-level cause: resident key/value pools keyed by stream identity and batch size are wiped on continuous-batching batch-composition changes; re-seeding then requires a full prefix that steady-state decode never carried, tripping a precondition.
  • A contained mitigation that serializes GPU decode prevents the crash: the concurrent-chat scenario survived and an orchestration regression passed at low max concurrency with the daemon surviving.

未证明

  • Any parallel-decode speedup; the mitigation serializes GPU decode and disables micro-batch throughput.
  • A per-stream KV isolation fix, which is unimplemented and would require re-validation of batched throughput and per-stream parity.
  • Statistical reliability: a single observed run per scenario, with no variance or repeat counts recorded.
  • Behavior beyond a single machine, beyond the one ~30B sparse-MoE model, or at any precision other than 4-bit.

适用于

  • A single-resident 4-bit ~30B sparse mixture-of-experts decode daemon on one Apple Silicon machine.
  • Multiple decode streams submitted concurrently so batch composition changes under continuous batching.
  • A build with single-encoder batched decode enabled by default.

不适用于

  • Sequential or single in-flight decode, or embeddings-only concurrency.
  • Lockstep batched serving at a constant batch size, which never triggers the batch-change re-seed.
  • Running with the serialized-decode mitigation engaged.
  • Cross-machine multi-resident data-parallel deployments.

作者

  • Ran Tao — 调查研究, 写作

引用本文

引用格式

Tao, R., Octoryn Research. (2026). A falsify-first root cause for a concurrent 4-bit decode crash: batch-composition KV-pool wipe trips a re-seed precondition (RN-2026-0013). Octopus Research Institute.

BibTeX

@techreport{orirn20260013,
  title       = {A falsify-first root cause for a concurrent 4-bit decode crash: batch-composition KV-pool wipe trips a re-seed precondition},
  author      = {Tao, Ran and {Octoryn Research}},
  institution = {Octopus Research Institute},
  year        = {2026},
  note        = {Permanent ID RN-2026-0013. Not peer reviewed.}
}

披露

资助
硬件与基础设施由 Octoryn / Octopus Core Pty Ltd 提供。
利益冲突
Octoryn 提供商业推理与治理工具;相关发现独立报告。