Control: back-to-back Windows bridge clients fail with EINVAL #481

Open
opened 2026-11-14 16:17:23 +00:00 by monsterlag · 1 comment

On main9c9d69ed, native Windows Python3.14.7 repeatedly fails tests/test_oot_state_tap.py when socket_cases opens four clients back-to-back. The third Bridge construction fails at scripts/longshot_ctl.py:87, open(name, "r+b", buffering=0), with OSError errno22 / Invalid argument. The failure then becomes "no game listens" although the authored server is running.

The constructor retries only an exception whose winerror is231 (ERROR_PIPE_BUSY). The server creates one listener and replaces it after accepting. A transient busy-pipe race is a hypothesis; the current exception does not retain a Win32 error, so errno22 alone is not sufficient proof. Blanket retry of EINVAL would also hide unrelated errors and is not proposed.

Reproduction: native Windows, llvm-mingw and Python3.14.7, python -I -B tests/run_all.py test_oot_state_tap. Both a full suite and a fresh focused run failed in the same connection sequence. This uses the project's authored game-free fixture, no game files.

Claimed for bounded diagnosis, then a focused production-client fix if a real named-pipe fixture confirms the cause. Preserve missing/access-denied behavior and the existing connection deadline. PR457 handles a POSIX fixture race and explicitly leaves Windows unchanged; no matching open PR was found. The Matrix broadcast is queued for the next allowed hourly window; no force post.

Priority: S3 contributor/control-client reliability defect; confidence1.0 for the reproduced failure, causal hypothesis pending. Affected reach is unmeasured; no player-impact score is assigned.

On main9c9d69ed, native Windows Python3.14.7 repeatedly fails tests/test_oot_state_tap.py when socket_cases opens four clients back-to-back. The third Bridge construction fails at scripts/longshot_ctl.py:87, open(name, "r+b", buffering=0), with OSError errno22 / Invalid argument. The failure then becomes "no game listens" although the authored server is running. The constructor retries only an exception whose winerror is231 (ERROR_PIPE_BUSY). The server creates one listener and replaces it after accepting. A transient busy-pipe race is a hypothesis; the current exception does not retain a Win32 error, so errno22 alone is not sufficient proof. Blanket retry of EINVAL would also hide unrelated errors and is not proposed. Reproduction: native Windows, llvm-mingw and Python3.14.7, python -I -B tests/run_all.py test_oot_state_tap. Both a full suite and a fresh focused run failed in the same connection sequence. This uses the project's authored game-free fixture, no game files. Claimed for bounded diagnosis, then a focused production-client fix if a real named-pipe fixture confirms the cause. Preserve missing/access-denied behavior and the existing connection deadline. PR457 handles a POSIX fixture race and explicitly leaves Windows unchanged; no matching open PR was found. The Matrix broadcast is queued for the next allowed hourly window; no force post. Priority: S3 contributor/control-client reliability defect; confidence1.0 for the reproduced failure, causal hypothesis pending. Affected reach is unmeasured; no player-impact score is assigned.
Author

Confirmed with a real held pipe: CRT open reports errno22 without winerror, while native CreateFileW returns231. Ready PR494 retries only that busy code within the deadline. Two interleaved held-pipe pairs fail on main and pass here; five native methods, the original state-tap check and live actual-game status interoperability pass. Missing/access-denied behavior and all remaining gaps are documented; no blanket EINVAL retry.

Confirmed with a real held pipe: CRT open reports errno22 without winerror, while native CreateFileW returns231. Ready PR494 retries only that busy code within the deadline. Two interleaved held-pipe pairs fail on main and pass here; five native methods, the original state-tap check and live actual-game status interoperability pass. Missing/access-denied behavior and all remaining gaps are documented; no blanket EINVAL retry.
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
MagicBeanDev/Longshot#481
No description provided.