[Session] Ignore unused Mamba slots during cleanup by Manfredss · Pull Request #40044 · sgl-project/sglang · GitHub
Skip to content

[Session] Ignore unused Mamba slots during cleanup - #40044

Closed
Manfredss wants to merge 1 commit into
sgl-project:mainfrom
Manfredss:fix/session-lazy-mamba-slots
Closed

Manfredss wants to merge 1 commit into
sgl-project:mainfrom
Manfredss:fix/session-lazy-mamba-slots

Conversation

@Manfredss

@Manfredss Manfredss commented Sep 18, 2026 •

Copy link
Copy Markdown

Motivation

Lazy Mamba buffers contain unused entries marked -1. Closing or aborting a streaming session returned these entries to the pool, so 8 slots could become 9 free slots, including an invalid one.

Related #39838. The report's private 8-GPU workload has not been reproduced.

Modifications

Skip unused entries when counting and releasing session buffers. Rebased on current main and updated the regression tests to use the current request release path.

Accuracy Tests

22 related CPU tests and 8 subtests pass. On current main without the fix, all 4 lazy-buffer regression cases fail with 9 != 8; regular buffers pass.

Speed Tests and Profiling

Not applicable to this buffer cleanup change; model calculations are unchanged.

Checklist

  • Changed-file pre-commit checks pass.
  • Regression tests fail before the fix and pass after it.
  • SGLang code style followed.
  • Documentation changes are not needed.

CI States

Latest PR Test (Base): ❌ Run #36281197970
Latest PR Test (Extra): ❌ Run #36281197906
Latest PR Test (AMD ROCm 10): ❌ Run #36281198004

@Manfredss
Manfredss force-pushed the fix/session-lazy-mamba-slots branch from f2e8786 to 568cc37 Compare September 27, 2026 00:00
@github-actions

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot closed this Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant