Repository navigation
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR updates the Windows named-pipe readiness check to treat winio.ErrTimeout as retryable and adds a regression test covering the pipe “state 1” timeout behavior.
Changes:
- Update
awaitPipeReadyto retry whenwinio.DialPipereturnswinio.ErrTimeoutinstead of failing immediately. - Add a Windows-only test that reproduces the “listener created but
Acceptnot yet called” timeout scenario.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| pkg/shim/shim_windows.go | Adjusts retry logic in awaitPipeReady to consider winio.ErrTimeout retryable. |
| pkg/shim/shim_windows_await_test.go | Adds a regression test validating retries when dialing a state-1 named pipe times out. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
eginez
force-pushed
the
dev/eginez/1104-fix-shim-windows-awaitpipeready-bails-on
branch
from
June 8, 2026 15:57
0cd1722 to
e0287bf
Compare
eginez
force-pushed
the
dev/eginez/1104-fix-shim-windows-awaitpipeready-bails-on
branch
from
June 8, 2026 16:09
ee02c90 to
e1aa8a1
Compare
eginez
force-pushed
the
dev/eginez/1104-fix-shim-windows-awaitpipeready-bails-on
branch
from
June 8, 2026 16:27
e1aa8a1 to
b5a393a
Compare
eginez
force-pushed
the
dev/eginez/1104-fix-shim-windows-awaitpipeready-bails-on
branch
from
June 8, 2026 21:18
28e2c65 to
b5a393a
Compare
dmcgowan
approved these changes
Jun 9, 2026
awaitPipeReady retried only when DialPipe returned os.IsNotExist or context.DeadlineExceeded, but winio.DialPipe converts the per-attempt deadline into winio.ErrTimeout before returning. A pipe in state 1 (ListenPipe called, Accept not yet called) causes DialPipe to block for the full per-attempt timeout and return winio.ErrTimeout, which the old check treated as a fatal error instead of retrying. Also guard windows.ERROR_PIPE_BUSY explicitly to match the error checks in containerd/nerdbox#218. Adds a regression test that forces the state-1 to state-2 transition race by delaying Accept past the 1-second per-attempt timeout. Signed-off-by: Esteban Ginez <[email protected]>
eginez
force-pushed
the
dev/eginez/1104-fix-shim-windows-awaitpipeready-bails-on
branch
from
June 10, 2026 21:51
b5a393a to
be3fcf3
Compare
austinvazquez
approved these changes
Jun 11, 2026
dmcgowan
approved these changes
Jun 16, 2026
This was referenced Sep 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Root cause
awaitPipeReadyretried only onos.IsNotExistandcontext.DeadlineExceeded, butwinio.DialPipereturnswinio.ErrTimeout— notcontext.DeadlineExceeded—when the per-attempt timeout fires. A pipe in state 1 (
ListenPipecalled,Acceptnot yet called) causesDialPipeto block for the 1-second per-attempttimeout and return
winio.ErrTimeout. The old check treated that as fatal andreturned immediately — discarding the rest of the 5-second budget.
Fix
Matches the error checks from containerd/nerdbox#218.
Tests
Added
shim_windows_await_test.go:TestAwaitPipeReady_State1_RetriesOnErrTimeout: server listens immediately butdelays
Acceptby 1.5 s (longer than the 1-second per-attempt timeout, forcingErrTimeout) — must succeed by retryingSame bug class fixed in nerdbox: containerd/nerdbox#218