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

net: accept <addr>: use of closed network connection #27998

Closed
jeanbza opened this issue Oct 3, 2018 · 2 comments
Closed

net: accept <addr>: use of closed network connection #27998

jeanbza opened this issue Oct 3, 2018 · 2 comments
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. OS-Darwin release-blocker
Milestone

Comments

@jeanbza
Copy link
Member

jeanbza commented Oct 3, 2018

What version of Go are you using (go version)?

go version go1.11 darwin/amd64

Does this issue reproduce with the latest release?

Yes.

What operating system and processor architecture are you using (go env)?

amd64/darwin

What did you do?

server, err := net.Listen("tcp", "localhost:0") followed by several conn, err := server.Accept() / conn.Close() pairs in a row.

What did you expect to see?

No errors.

What did you see instead?

Once in every ~10 tests or so, server.Accept() returns something like accept tcp 127.0.0.1:49613: use of closed network connection. I'm not sure what this error means: how can Accept state that the "network connection" is closed when its job is to establish (not use) a connection? Is the listener dead somehow? How is that possible without me having called server.Close()?

@ianlancetaylor
Copy link
Contributor

Can you show us the complete program that demonstrates the problem?

@ianlancetaylor ianlancetaylor added OS-Darwin NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. release-blocker labels Oct 3, 2018
@ianlancetaylor ianlancetaylor added this to the Go1.12 milestone Oct 3, 2018
@jeanbza
Copy link
Member Author

jeanbza commented Oct 3, 2018

So sorry - in the process of making the repro, we found out that the server does indeed get closed and then hides the underlying failure. Shoot. Sorry for wasting y'alls time!

@jeanbza jeanbza closed this as completed Oct 3, 2018
@golang golang locked and limited conversation to collaborators Oct 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. OS-Darwin release-blocker
Projects
None yet
Development

No branches or pull requests

3 participants