#5674 [Engine] Metal: --batch 2 --batch-mtp exits on the first concurrent pair ("two rows of one batch window are the same slot")

closed · @vbrhino · 1 comments · View on GitHub

Setup & installServer & APIModels & quantsDocumentationWindows

Description

### Area

Engine

### Desktop app, Terminal or source?

Source (START-HERE.bat, setup.sh or a build)

### What happened

With `--batch 2 --batch-mtp` on the Metal engine, the first two concurrent chat requests fail (one HTTP 400, one HTTP 503) and the engine exits:

```
[strata] the engine reported an error: metal window: two rows of one batch window are the same slot
[strata] 400 invalid request: metal window: two rows of one batch window are the same slot
[strata] the engine stopped unexpectedly (exit code 1). The engine exited (code 1) after it reported: metal window: two rows of one batch window are the same slot
```

The server restarts the engine and the next concurrent pair fails the same way. With `--batch 2` alone (no `--batch-mtp`) the same load runs: a full 81-task coding run with two concurrent clients finished with no error.

Side note: docs/MAC.md ("Several requests at once") says `--parallel N`; the Metal engine rejects that flag (`unknown argument: --parallel`). `--batch N` is the flag that works.

### Smallest steps or command that reproduce it

1. `./setup.sh --model IQ3_S --vision no --no-start --yes` (writes `strata-iq3_s.json`).
2. Add `"--batch", "2", "--batch-mtp"` to the config's `args` and start it: `.venv/bin/python serve/server.py --engine strata --config strata-iq3_s.json --port 8080`.
3. Send two requests at once:
   ```sh
   for i in 1 2; do curl -s -o /dev/null -w "%{http_code}\n" http://127.0.0.1:8080/v1/chat/completions \
     -H 'Content-Type: application/json' \
     -d "{\"model\":\"x\",\"messages\":[{\"role\":\"user\",\"content\":\"Write a Python function that reverses a linked list. Variant $i.\"}],\"max_tokens\":200,\"temperature\":0,\"chat_template_kwargs\":{\"enable_thinking\":false}}" & done; wait
   ```
   Result: `400` and `503`, and the three lines above in the server output.

### Reproduction status

Reproduced locally

### Strata version

Source build at `37d5c9e` (v0.2.13, engine 0.1.59-metal)

### Graphics card, memory and system

Mac Studio, Apple M5 Ultra, 96 GB unified memory, macOS 27.2, `iogpu.wired_limit_mb` 86016

### Model, size and settings

Qwen3.8-Flash-Next IQ3_S (ISTA-DASLab, setup's pinned revision), resident, setup's Mac config (`--spec 3 --spec-min-p 0.5`, MTP draft layer, `--max-context 65536`, `--mmap-experts`) plus `--batch 2 --batch-mtp`.

### Logs

Server output lines are above. The engine log shows the engine restarting every ~14 s while the client kept sending pairs; it holds no error line besides `PCIe probe failed -> pcie_frac default 0.55`, which every start on this Mac prints.

Related on this site

Quick links to related pages.