[GH-ISSUE #2892] [Engine] unbatched replicas still cross DONE ownership on 0.2.0-beta #1169

Closed
opened 2026-11-04 01:49:03 +07:00 by bsakaguchi · 4 comments
Owner

Originally created by @dynaxbill on GitHub (Oct 17, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/2892

Area

[Engine] (the Python server and API)

Desktop app, Terminal or source?

Source: CPU-only protocol replay against the official 0.2.0-beta Python server. No model started.

What happened

Re-tested after the tracker reset: the two request-ownership failures remain in release 3d1fb48. An early-closed replica child can release the pipe lock before its DONE is drained; a successor can receive zero tokens or the predecessor's frames. Independently, shared DONE statistics can be overwritten after unlock. Expected: finish native cleanup before handoff and report only the caller's own DONE.

The official added replica-selected callback updates request telemetry; it does not close the child or snapshot DONE. PR #2886 now preserves that callback and repairs both ownership failures. This is a serving correctness fix, not a GPU kernel/default/performance change.

Smallest steps or command that reproduce it

git clone --single-branch --branch fix/replica-done-ownership-20261017 https://github.com/dynaxbill/Strata.git
cd Strata
# Install the Python runtime requirements in an isolated environment first.
python tools/replay_replica_lifetime.py --output ./replica-v020-controls-new
python -m unittest -v serve.test_replica_lifetime

Choose an unused output directory. The replayer compares the pinned official release with close-only and full A using the actual repository reader/pump. It never loads a model or uses a GPU. Fetch 3d1fb48090e8f2cefc22d7b5845fb7f5b71f33fa in shallow checkouts or supply its replicas.py via --baseline-file.

Reproduction status

Reproduced locally: CPU protocol fixtures, including real OS pipes. This is not a new GPU/model reproduction.

Strata version

Strata 0.2.0-beta release 3d1fb48090e8f2cefc22d7b5845fb7f5b71f33fa (release engine package 0.1.45.3, not executed here). Refreshed repair tested on main f57c0adcb31c00f3f216550c004dac4e713a9f70. Those two upstream Python files equal the release before applying A.

Graphics card, memory and system

Current replay: Windows-11-10.0.26200-SP0, CPython 3.12.14; no GPU/VRAM or model used. The replay PC's RAM was not recorded; no memory/performance claim. Historical GPU evidence only: 2x RTX 3090 24 GiB, dual EPYC 7663, VM 64 vCPU/384 GiB RAM, Ubuntu 26.04, driver 610.43.02 on engine 0.1.44.1. Do not treat those historical runs as 0.2.0-beta GPU qualification.

Model, size and settings

New reproduction: deterministic synthetic native protocol producer, not an LLM. Affected path is unbatched replicas with concurrent callers routed to the same native engine; both resident-KV and KVGROW can use it. Historical model was GSQ-RCO IQ3_S. No claim that every batched C4 request fails.

Logs

Current CPU control Passed / 18
Official v0.2.0-beta 9
Close only 16
Full A, official callback preserved 18

102/102 selected CPU serving tests also pass, including the official callback/telemetry tests. Commands, actual logs, environments and limits, control results, manifest.

Failed (intentional red controls): official source9/18 and close-only 16/18. An earlier close-only15/18 run is retained; no fixed assertion was relaxed. Two initial missing-module/dependency setup failures are also retained and explained.

Not run: new-release GPU/model execution, native CUDA/HIP/SYCL/Metal builds, GPU performance, full-logits/KL and long-soak testing. Existing historical evidence and the original investigation remain linked in #2886.

Originally created by @dynaxbill on GitHub (Oct 17, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/2892 ### Area [Engine] (the Python server and API) ### Desktop app, Terminal or source? Source: CPU-only protocol replay against the official 0.2.0-beta Python server. No model started. ### What happened Re-tested after the tracker reset: the two request-ownership failures remain in release `3d1fb48`. An early-closed replica child can release the pipe lock before its DONE is drained; a successor can receive zero tokens or the predecessor's frames. Independently, shared DONE statistics can be overwritten after unlock. Expected: finish native cleanup before handoff and report only the caller's own DONE. The official added replica-selected callback updates request telemetry; it does not close the child or snapshot DONE. PR #2886 now preserves that callback and repairs both ownership failures. This is a serving correctness fix, not a GPU kernel/default/performance change. ### Smallest steps or command that reproduce it ```sh git clone --single-branch --branch fix/replica-done-ownership-20261017 https://github.com/dynaxbill/Strata.git cd Strata # Install the Python runtime requirements in an isolated environment first. python tools/replay_replica_lifetime.py --output ./replica-v020-controls-new python -m unittest -v serve.test_replica_lifetime ``` Choose an unused output directory. The replayer compares the pinned official release with close-only and full A using the actual repository reader/pump. It never loads a model or uses a GPU. Fetch `3d1fb48090e8f2cefc22d7b5845fb7f5b71f33fa` in shallow checkouts or supply its replicas.py via `--baseline-file`. ### Reproduction status Reproduced locally: CPU protocol fixtures, including real OS pipes. This is not a new GPU/model reproduction. ### Strata version Strata 0.2.0-beta release `3d1fb48090e8f2cefc22d7b5845fb7f5b71f33fa` (release engine package 0.1.45.3, not executed here). Refreshed repair tested on main `f57c0adcb31c00f3f216550c004dac4e713a9f70`. Those two upstream Python files equal the release before applying A. ### Graphics card, memory and system Current replay: Windows-11-10.0.26200-SP0, CPython 3.12.14; no GPU/VRAM or model used. The replay PC's RAM was not recorded; no memory/performance claim. Historical GPU evidence only: 2x RTX 3090 24 GiB, dual EPYC 7663, VM 64 vCPU/384 GiB RAM, Ubuntu 26.04, driver 610.43.02 on engine 0.1.44.1. Do not treat those historical runs as 0.2.0-beta GPU qualification. ### Model, size and settings New reproduction: deterministic synthetic native protocol producer, not an LLM. Affected path is unbatched replicas with concurrent callers routed to the same native engine; both resident-KV and KVGROW can use it. Historical model was GSQ-RCO IQ3_S. No claim that every batched C4 request fails. ### Logs | Current CPU control | Passed / 18 | |---|---:| | Official v0.2.0-beta | 9 | | Close only | 16 | | Full A, official callback preserved | 18 | 102/102 selected CPU serving tests also pass, including the official callback/telemetry tests. [Commands, actual logs, environments and limits](https://github.com/dynaxbill/Strata/blob/da681b7b263d319952b98927858c07b934e19ac6/tests/data/replica_lifetime/v020-beta/README.md), [control results](https://github.com/dynaxbill/Strata/blob/da681b7b263d319952b98927858c07b934e19ac6/tests/data/replica_lifetime/v020-beta/controls.json), [manifest](https://github.com/dynaxbill/Strata/blob/da681b7b263d319952b98927858c07b934e19ac6/tests/data/replica_lifetime/manifest.json). **Failed (intentional red controls):** official source9/18 and close-only 16/18. An earlier close-only15/18 run is retained; no fixed assertion was relaxed. Two initial missing-module/dependency setup failures are also retained and explained. **Not run:** new-release GPU/model execution, native CUDA/HIP/SYCL/Metal builds, GPU performance, full-logits/KL and long-soak testing. Existing historical evidence and the original investigation remain linked in #2886.
Author
Owner

@Niko1221 commented on GitHub (Oct 19, 2026):

Thanks for taking the time to report this.

We're resetting the tracker for 0.2.0-beta. There are more than 1,300 open issues and pull requests, too many for us to read properly, so we're closing everything that isn't being worked on right now. Closed here does not mean rejected.

To reopen it takes about two minutes:

  1. Re-test on 0.2.0-beta. It may already be fixed. Write down what you see.
  2. Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other].
  3. Fill in the parts of the issue form: what happened, the Strata version, your graphics card, memory and system.
  4. Comment /reopen. A check runs and either reopens the issue or lists what is still missing.

The rules are in CONTRIBUTING.md.

<!-- gh-comment-id:6271345983 --> @Niko1221 commented on GitHub (Oct 19, 2026): Thanks for taking the time to report this. We're resetting the tracker for 0.2.0-beta. There are more than 1,300 open issues and pull requests, too many for us to read properly, so we're closing everything that isn't being worked on right now. Closed here does not mean rejected. To reopen it takes about two minutes: 1. Re-test on 0.2.0-beta. It may already be fixed. Write down what you see. 2. Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other]. 3. Fill in the parts of the issue form: what happened, the Strata version, your graphics card, memory and system. 4. Comment `/reopen`. A check runs and either reopens the issue or lists what is still missing. The rules are in [CONTRIBUTING.md](https://github.com/Niko1221/Strata/blob/main/CONTRIBUTING.md).
Author
Owner

@dynaxbill commented on GitHub (Oct 19, 2026):

/reopen

Retested on v0.2.0-beta (3d1fb48090). The title and issue form are updated above. Current CPU protocol controls: official 9/18, close-only 16/18, full A 18/18; 102/102 selected CPU serving tests pass. The earlier close-only 15/18 run is retained rather than hidden.

PR #2886 is updated at da681b7b26, integrates main f57c0ad, and preserves the official selected-replica callback. Sanitized logs, commands and environments: github.com/dynaxbill/Strata@da681b7b26/tests/data/replica_lifetime/v020-beta/README.md

Scope: actual Python reader/pump with CPU protocol fixtures, including real OS pipes; no new-release GPU/model execution or performance claim. Existing GPU evidence remains explicitly historical engine 0.1.44.1 qualification.

<!-- gh-comment-id:6272050439 --> @dynaxbill commented on GitHub (Oct 19, 2026): /reopen Retested on v0.2.0-beta (3d1fb48090e8f2cefc22d7b5845fb7f5b71f33fa). The title and issue form are updated above. Current CPU protocol controls: official 9/18, close-only 16/18, full A 18/18; 102/102 selected CPU serving tests pass. The earlier close-only 15/18 run is retained rather than hidden. PR #2886 is updated at da681b7b263d319952b98927858c07b934e19ac6, integrates main f57c0ad, and preserves the official selected-replica callback. Sanitized logs, commands and environments: https://github.com/dynaxbill/Strata/blob/da681b7b263d319952b98927858c07b934e19ac6/tests/data/replica_lifetime/v020-beta/README.md Scope: actual Python reader/pump with CPU protocol fixtures, including real OS pipes; no new-release GPU/model execution or performance claim. Existing GPU evidence remains explicitly historical engine 0.1.44.1 qualification.
Author
Owner

@github-actions[bot] commented on GitHub (Oct 19, 2026):

Reopened, thank you. A maintainer will pick it up from here.

<!-- gh-comment-id:6272054289 --> @github-actions[bot] commented on GitHub (Oct 19, 2026): Reopened, thank you. A maintainer will pick it up from here.
Author
Owner

@Niko1221 commented on GitHub (Nov 5, 2026):

Hello dynaxbill,

Thank you for the protocol replay and for PR #2886, it pointed straight at the cause. In Strata 0.2.11 a replica's request now closes its engine exchange before the replica's lock is released, and the end-of-answer figures are copied per request, so a second request can no longer read the first one's DONE or tokens. We reproduced it with a forced hand-off (30 of 30 crossed before, 0 of 30 now). The window is microseconds wide in real traffic, so we could only force it, not catch it by chance. If you see a reply that belongs to another request on 0.2.11, please tell us the number of replicas and the request pattern.

The Strata project

<!-- gh-comment-id:6658421401 --> @Niko1221 commented on GitHub (Nov 5, 2026): Hello dynaxbill, Thank you for the protocol replay and for PR #2886, it pointed straight at the cause. In Strata 0.2.11 a replica's request now closes its engine exchange before the replica's lock is released, and the end-of-answer figures are copied per request, so a second request can no longer read the first one's DONE or tokens. We reproduced it with a forced hand-off (30 of 30 crossed before, 0 of 30 now). The window is microseconds wide in real traffic, so we could only force it, not catch it by chance. If you see a reply that belongs to another request on 0.2.11, please tell us the number of replicas and the request pattern. The Strata project
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#1169
No description provided.