Skip to content

[Bug] Qwen3.5+extra_buffer video memory leak during structured JSON response generation. #20640

@Swipe4057

Description

@Swipe4057

Checklist

  • I searched related issues but found no solution.
  • The bug persists in the latest version.
  • Issues without environment info and a minimal reproducible demo are hard to resolve and may receive no feedback.
  • If this is not a bug report but a general question, please start a discussion at https://github.com/sgl-project/sglang/discussions. Otherwise, it will be closed.
  • Please use English. Otherwise, it will be closed.

Describe the bug

When launching the model server with extra_buffer enabled and running tests for structured output, a slow but steady increase in VRAM consumption occurs, eventually causing OOM errors and model restarts in our production environment (every few hours). No leak is observed when extra_buffer is disabled, nor when it is enabled but JSON responses are not requested.

Reproduction

mamba_scheduler_strategy=extra_buffer
and structured JSON response generation

Environment

main

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions