You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: hold a shared socket until the child adopts it, and free exec slots at the close
Windows CI, intermittently, on 3.14 and 3.15: a popen worker died before
its handshake with WSAENOTSOCK, which reached the coordinator as a reset
connection during makegateway. socket.share() hands the child a *blob*,
and there is no socket on the other end until it calls fromshare() -- so
closing our copy the moment the spawn returns is a race the child loses.
The POSIX comment ("the child holds its own copy now") was true for
pass_fds and quietly wrong for share. We now close after the handshake
there, which is the point where the child has provably adopted.
The server side has the same race and is not fixed: it cannot wait for a
handshake that goes to the coordinator, and holding the socket instead
would cost the coordinator its EOF when a worker dies. Recorded with the
option it needs (a marker byte from the worker) in HANDOFF and the roadmap.
Second, from a flake in the exec-capacity test under -n 12, which turned
out to be the feature and not the test: the admission slot was released
when the exec *task* unwound, a moment after executetask had already sent
the channel close. That close is exactly what tells a coordinator at
capacity it may send the next request, so waitclose() + remote_exec()
could be refused for a slot that was already free. The release moved into
_close_finished, ahead of the close, and is idempotent so the task's
finally still covers whatever never got that far.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
0 commit comments