Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The win32PipeListener.Close() hangs if nobody calls Accept() #281

Open
thallgren opened this issue Mar 29, 2023 · 0 comments
Open

The win32PipeListener.Close() hangs if nobody calls Accept() #281

thallgren opened this issue Mar 29, 2023 · 0 comments

Comments

@thallgren
Copy link

The win32PipeListener.Close() function attempts to write to an unbuffered channel that has no reader unless someone calls the Accept() function. As a result, the call to Close() hangs indefinitely. The stack trace from the goroutine that is hanging can look like this:

goroutine 84 [chan receive, 5 minutes]:
github.com/Microsoft/go-winio.(*win32PipeListener).Close(0xc0002cdb30)
	github.com/Microsoft/go-winio@v0.6.0/pipe.go:513 +0x85
net/http.(*onceCloseListener).close(...)
	net/http/server.go:3501
sync.(*Once).doSlow(0xc0009a7a50?, 0x1e0d56?)
	sync/once.go:74 +0xc2
sync.(*Once).Do(...)
	sync/once.go:65
net/http.(*onceCloseListener).Close(0xc0005e4bd0?)
	net/http/server.go:3497 +0x4a
net/http.(*Server).closeListenersLocked(0x0?)
	net/http/server.go:2850 +0xad
net/http.(*Server).Shutdown(0xc0002020f0, {0x2690400, 0xc000376500})
	net/http/server.go:2776 +0xa5
thallgren added a commit to telepresenceio/telepresence that referenced this issue Mar 30, 2023
Microsoft's Go implementation of named pipes sometimes causes the
Telepresence daemons to hang indefinitely. This is the culprit:

microsoft/go-winio#281

This commit removes the use of named pipes (once implemented due to
buggy Go implementation of unix sockets), in favor of using the same
socket implementation (almost) as we do on other platforms.

Signed-off-by: Thomas Hallgren <thomas@datawire.io>
thallgren added a commit to telepresenceio/telepresence that referenced this issue Mar 30, 2023
Microsoft's Go implementation of named pipes sometimes causes the
Telepresence daemons to hang indefinitely. This is the culprit:

microsoft/go-winio#281

This commit removes the use of named pipes (once implemented due to
buggy Go implementation of unix sockets), in favor of using the same
socket implementation (almost) as we do on other platforms.

Signed-off-by: Thomas Hallgren <thomas@datawire.io>
thallgren added a commit to telepresenceio/telepresence that referenced this issue Mar 30, 2023
Microsoft's Go implementation of named pipes sometimes causes the
Telepresence daemons to hang indefinitely. This is the culprit:

microsoft/go-winio#281

This commit removes the use of named pipes (once implemented due to
buggy Go implementation of unix sockets), in favor of using the same
socket implementation (almost) as we do on other platforms.

Signed-off-by: Thomas Hallgren <thomas@datawire.io>
thallgren added a commit to telepresenceio/telepresence that referenced this issue Mar 30, 2023
Microsoft's Go implementation of named pipes sometimes causes the
Telepresence daemons to hang indefinitely. This is the culprit:

microsoft/go-winio#281

This commit removes the use of named pipes (once implemented due to
buggy Go implementation of unix sockets), in favor of using the same
socket implementation (almost) as we do on other platforms.

Signed-off-by: Thomas Hallgren <thomas@datawire.io>
thallgren added a commit to telepresenceio/telepresence that referenced this issue Mar 31, 2023
Microsoft's Go implementation of named pipes sometimes causes the
Telepresence daemons to hang indefinitely. This is the culprit:

microsoft/go-winio#281

This commit removes the use of named pipes (once implemented due to
buggy Go implementation of unix sockets), in favor of using the same
socket implementation (almost) as we do on other platforms.

Signed-off-by: Thomas Hallgren <thomas@datawire.io>
thallgren added a commit to telepresenceio/telepresence that referenced this issue Mar 31, 2023
Microsoft's Go implementation of named pipes sometimes causes the
Telepresence daemons to hang indefinitely. This is the culprit:

microsoft/go-winio#281

This commit removes the use of named pipes (once implemented due to
buggy Go implementation of unix sockets), in favor of using the same
socket implementation (almost) as we do on other platforms.

Signed-off-by: Thomas Hallgren <thomas@datawire.io>
thallgren added a commit to telepresenceio/telepresence that referenced this issue Apr 1, 2023
Microsoft's Go implementation of named pipes sometimes causes the
Telepresence daemons to hang indefinitely. This is the culprit:

microsoft/go-winio#281

This commit removes the use of named pipes (once implemented due to
buggy Go implementation of unix sockets), in favor of using the same
socket implementation (almost) as we do on other platforms.

Signed-off-by: Thomas Hallgren <thomas@datawire.io>
thallgren added a commit to telepresenceio/telepresence that referenced this issue Apr 1, 2023
Microsoft's Go implementation of named pipes sometimes causes the
Telepresence daemons to hang indefinitely. This is the culprit:

microsoft/go-winio#281

This commit removes the use of named pipes (once implemented due to
buggy Go implementation of unix sockets), in favor of using the same
socket implementation (almost) as we do on other platforms.

Signed-off-by: Thomas Hallgren <thomas@datawire.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant