Skip to content

fix(core): make array readback fallible - #2284

Merged
inureyes merged 4 commits into
mainfrom
fix/issue-1791-fallible-array-read
Oct 13, 2026
Merged

inureyes merged 4 commits into
mainfrom
fix/issue-1791-fallible-array-read

Conversation

@inureyes

Copy link
Copy Markdown
Member

Summary

  • Return MLX event failures from array_evaluated_bytes through the cxx Result boundary instead of aborting the process.
  • Propagate token readback errors through engine callers and fail only affected lookahead rows after draining and rewinding speculative state.
  • Cover the real failed-Event boundary and both scheduler cleanup shapes while proving an unrelated active request continues.

Test plan

  • Build mlxcel-core and mlxcel CUDA library tests with the test-fast profile.
  • Run the direct failed-Event bridge and engine readback tests.
  • Run scheduler cleanup with and without a submitted next prime.
  • Verify the old infallible signature exits the isolated child with SIGABRT.
  • Run cargo fmt check.
  • Run the repository contract gate after merging current main.

Fixes #1791

A failed MLX event could throw through array_evaluated_bytes without a cxx Result boundary and abort every in-flight server request.

Return readback failures through the engine, unwind failed lookahead rows without replaying them, and preserve unrelated active requests. Add real failed-event boundary coverage plus deterministic scheduler cleanup coverage.

Refs #1791
Bring the latest merged chat-template fix into the issue branch before publication.

Retain the reviewed fallible MLX readback change while validating it against main at 1e8c702.

Refs #1791
Bring the latest merged Granite MoE update into the issue branch before adding its technical reports.

Retain the reviewed fallible MLX readback change while validating it against main at a1c5826.

Refs #1791
Document the fallible array readback design, focused fault coverage, SIGABRT negative control, and refreshed contract evidence in English and Korean.

Refs #1791
@inureyes inureyes added status:review Under review type:bug Bug fixes, error corrections, or issue resolutions priority:medium Medium priority area:core mlxcel-core: MLX FFI, primitives, KV cache, layers area:inference Generation, sampling, decoding (incl. speculative, DRY) status:done Completed and removed status:review Under review labels Oct 13, 2026
@inureyes
inureyes merged commit 61329ee into main Oct 13, 2026
27 checks passed
@inureyes
inureyes deleted the fix/issue-1791-fallible-array-read branch October 13, 2026 12:16
inureyes added a commit that referenced this pull request Oct 13, 2026
Merge main at 61329ee after #2284 so the native-video hardening is validated against the latest central branch.

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

Labels

area:core mlxcel-core: MLX FFI, primitives, KV cache, layers area:inference Generation, sampling, decoding (incl. speculative, DRY) priority:medium Medium priority status:done Completed type:bug Bug fixes, error corrections, or issue resolutions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(core): make array_evaluated_bytes fallible so GPU faults don't abort

1 participant