Skip to content

Eval bug: "Chunk not found" crash with hybrid attention models (Qwen3.5) under parallel load #20222

Closed

Description

@SubAllStar

Name and Version

Native build from commit 2850bc6 (build 8212) and commit c5a7788 (latest master as of 2026-03-07). Also reproduced with Docker image ghcr.io/ggml-org/llama.cpp:server-cuda (build 8212).

Operating systems

Linux (Debian 12, LXC container)

Which llama.cpp modules do you know to be affected?

llama-server

Command line

llama-server \
  --model /models/Qwen3.5-35B-A3B-UD-Q6_K_XL.gguf \
  --mmproj /models/mmproj-BF16.gguf \
  --host 0.0.0.0 --port 8000 \
  --ctx-size 196608 --parallel 6 \
  --tensor-split 24,12 \
  --cache-type-k q4_0 --cache-type-v q4_0 \
  --batch-size 2048 --ubatch-size 512 \
  -fa 1

Problem description & steps to reproduce

Qwen3.5-35B-A3B crashes with std::runtime_error: Chunk not found when running with multiple parallel slots (tested with 3 and 6). The crash occurs during context checkpoint restoration under parallel load.

Qwen3.5 uses hybrid attention (sliding window + DeltaNet/recurrent layers), which appears to interact badly with the checkpoint restore path when multiple slots are active simultaneously.

Steps to reproduce

  1. Start llama-server with Qwen3.5-35B-A3B and --parallel 3 or higher
  2. Send 3+ concurrent /v1/chat/completions requests
  3. Wait for one request to complete and a new request to arrive on the same slot
  4. Server crashes when it tries to restore the context checkpoint for the reused slot

Crash log

slot update_slots: id 2 | task 47 | restored context checkpoint (pos_min = 1460, pos_max = 1460, size = 1.250 MiB)
terminate called after throwing an instance of 'std::runtime_error'
  what():  Chunk not found

The crash always follows a "restored context checkpoint" log entry.

What I've tested

Config Result
--parallel 6 (latest master c5a7788) Crashes within minutes
--parallel 3 (latest master c5a7788) Crashes within minutes
--parallel 6 (rollback to 2850bc6) Crashes within ~20 min
--parallel 6 + --ctx-checkpoints 0 (2850bc6) Reduced but still crashes
--parallel 6 + --ctx-checkpoints 0 --no-cache-prompt Stable (45+ min stress test, 0 crashes)
--parallel 1 (any commit) Stable (no parallel slot reuse)

Workaround

--ctx-checkpoints 0 --no-cache-prompt prevents the crash entirely but sacrifices prompt caching performance (~1s extra per request).

Related issues/PRs

None of these fully resolve the crash for Qwen3.5 under parallel load.

Hardware

  • 2x NVIDIA GPUs: RTX 3090 (24GB) + RTX 3060 (12GB), tensor-split 24,12
  • CUDA 13.0, compute capability 8.6 (Ampere)
  • 80GB system RAM

Note: This issue was filed with assistance from an AI agent based on hands-on testing and debugging.

Activity

  1. ggerganov commented on Mar 8, 2026

    @ggerganov
    Member

    Can you confirm that #20232 fixes the problem?

  2. SubAllStar commented on Mar 8, 2026

    @SubAllStar
    Author

    Confirmed — PR #20232 fixes the crash.

    Test setup:

    • Qwen3.5-35B-A3B (UD-Q6_K_XL) with mmproj-BF16
    • RTX 3090 + RTX 3060, tensor-split 24,12
    • --parallel 6 --ctx-size 196608 --cache-type-k q4_0 --cache-type-v q4_0 -fa 1
    • Cherry-picked the fix onto commit 2850bc6

    Results:

    • 18 parallel requests across 3 waves with slot reuse — zero crashes
    • Prompt caching working correctly (removed --no-cache-prompt and --ctx-checkpoints 0 workarounds)
    • Server stable under sustained production load (Frigate GenAI + LLM sub-agents hitting all 6 slots continuously)

    Previously crashed within minutes under the same load. The fix resolves it completely.

  3. jcartu commented on Mar 10, 2026

    @jcartu

    The hybrid attention (sliding window + DeltaNet) in Qwen3.5 doesn't play well with context checkpointing when slots get reused. The DeltaNet recurrent state isn't properly saved/restored in the checkpoint path.

    Your workaround (--ctx-checkpoints 0 --no-cache-prompt) is the right call for now. In my setup I run Qwen3.5 Q8_0 with:

    --batch-size 4096 --ubatch-size 2048 \
    --cache-type-k q4_0 --cache-type-v q8_0 \
    --flash-attn \
    --ctx-size 393216 \
    --tensor-split 1,1
    

    Also FYI: speculative decoding doesn't work with Qwen3.5 in llama.cpp either — same DeltaNet recurrent state issue. Save yourself the debugging time.

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

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