Issues / #3134

#3134 Random "verify: layer N never rang (an illegal instruction was encountered)" crashes in MTP/verify path — also kills the whole engine (exit code 1)

open · @Justsoso-W · 1 comentários · No GitHub

BenchmarksSetup & installNVIDIA / CUDAModels & quantsWindows

Descrição

[issue-github-en.md](https://github.com/user-attachments/files/33653973/issue-github-en.md)
[issue-github-zh.md](https://github.com/user-attachments/files/33653974/issue-github-zh.md)
## Summary

On a Windows + CUDA 12 Strata build, speculative decoding (MTP) randomly crashes mid-generation with `verify: layer N never rang (an illegal instruction was encountered)`. The layer index `N` differs on every crash (observed: 2, 12, 17, 25, 26, 41, 44). In most cases the affected request returns HTTP 400 and the engine keeps serving, but sometimes the entire engine process dies with exit code 1 and has to be restarted (~60s reload). The crash also breaks `setup.py --calibrate`.

## Environment

- **Engine:** Strata CUDA 12 build, `0.1.44.1` (also reproduced on the older `0.1.41` build on Oct 13)

- **GPU:** RTX 3080 Ti Laptop 16GB (PCIe Gen3 x16, no ReBar), driver **576.28** (using the `--cuda 12` engine path)

- **CPU:** Xeon E5-2696 v3 (Haswell, no AVX-512), 128GB DDR3L-1600 quad-channel

- **OS:** Windows 11

- **Model:** `Qwen3.8-Flash-Next` IQ3_S, `--kv int8`, `--mtp rt`, `--spec 4`, max-context 262144

- **Engine flags:**

  ```
  --expert-cache auto --prefill auto:8192 --kv-resident 8192 --spec-min-p 0.70 \
  --pool-workers 17 --adapt-every 1 --adapt-swaps 160 --adapt-decay 0.97 \
  --vram-reserve-mib 1472 --adapt-async 1
  ```

- **Env vars:** `STRATA_PIN_BY_NEED=1 STRATA_ARENA_PIN_GIB=40` (2 MiB large pages confirmed working)

## Steps to Reproduce

1. Launch the engine on the hardware above with the flags listed in **Environment**.
2. Enable MTP / speculative decoding (`--mtp rt --spec 4`).
3. Send a continuous stream of chat / inference requests to the server (single request is not enough; the crash is random).
4. Observe the server logs and HTTP responses.
5. (Optional) Run `setup.py --calibrate`; note that round 1/3 (PCIe share) completes and the same error then aborts the run.

## Expected Behavior

- Every request completes successfully and returns a valid response.
- The engine process stays alive across requests.
- `setup.py --calibrate` runs to completion.

## Actual Behavior

1. Random requests fail mid-generation with:

   ```
   verify: layer N never rang (an illegal instruction was encountered)
   ```

   `N` changes every time. The server returns HTTP 400 for that request; the engine usually keeps serving afterwards.
2. Sometimes the whole engine process exits (exit code 1) right after a `suffix drafts` log line; the server restarts it on the next request (~60s reload).
3. Frequency is roughly **1 crash per 15–20 requests** with `--pool-workers 17`. With `--pool-workers 24` it crashed **3 requests in a row**, so higher worker counts make it much more likely.
4. `setup.py --calibrate` is also broken: round 1/3 completes, then the same error kills the tuning ("layer 2 never rang").

## Frequency & Trigger Factors

| Condition                      | Observed behavior              |
| ------------------------------ | ------------------------------ |
| `--pool-workers 17`            | ~1 crash per 15–20 requests    |
| `--pool-workers 24`            | 3 consecutive crashes in a row |
| 3-channel vs 4-channel RAM     | occurs on both                 |
| with / without `--pcie-frac`   | occurs on both                 |
| engine `0.1.41` and `0.1.44.1` | occurs on both                 |

The crash is **not** tied to a specific config change — it reproduces across versions, RAM layouts, and flags.

## Additional Observations

- Crash sites in the server log always mention either `verify:` or `suffix drafts:` — i.e. the draft / MTP verification path.
- Apart from the crash, throughput is excellent and stable between crashes (~46 tok/s warm decode, 69% cache hit on the 16GB card).
- The CPU is a Haswell part without AVX-512; worth noting in case the illegal-instruction fault is CPU-side (a SIMD opcode the CPU cannot execute) rather than GPU-side.

## Logs / Further Help

I can provide full server logs on request (`strata-iq3_s.log` is ~400KB per day) and am happy to run any test build or additional diagnostics you suggest.

No site

Links install, modelos, releases.