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

Race condition in makeConnectedServerPipe causes win32PipeListener.Close() deadlock #85

Open
djsweet opened this issue Jul 16, 2018 · 0 comments

Comments

@djsweet
Copy link

djsweet commented Jul 16, 2018

On line 273 in pipe.go, makeConnectedServerPipe signals to the connectPipe goroutine that the listener has been closed by closing the underlying pipe it is trying to connect. However, if the connectPipe call succeeds before the call to p.Close(), then err may also be one of cERROR_PIPE_CONNECTED or cERROR_NO_DATA. This causes makeConnectedServerPipe to effectively swallow the control signal sent over l.closeCh, preventing listenerRoutine from accepting it, causing win32PipeListener.Close() to deadlock without ever closing the listener.

I have been able to reproduce this behavior while developing #84, but only by running go test in a loop until the deadlock occurs.

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