-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
syscall: ECONNRESET is not err.Temporary() #24808
Comments
/cc @bradfitz |
@powerman, are you reporting a regression in Go 1.4? The stackoverflow thread is about Python. Is there some context I'm missing about why this is now relevant, years later? Did this cause a bug somewhere, or were you just reading code? |
@bradfitz Stackoverflow is about syscalls, python is just an example and should have no importance. Yes, I'm just reading the code and man pages - issue looks obvious, but if it's required I can try to implement example from stackoverflow in Go. Original issue was initiated by question in maillist: https://groups.google.com/forum/#!topic/golang-nuts/5Mcc-idtQcg |
I'm reluctant to change this because it seems more likely to break more people than it fixes and it's been like this forever. But if you have a good example of a Go program where the behavior is clearly wrong, we could try it out and see what the fallout looks like. |
Actually it's enough to output Temporary() at end of example mentioned in maillist to see:
Here is modified code: https://play.golang.org/p/Jphm_VSzM1H (run on Linux, not in playground). |
Sure, we can try special-casing "accept". @ianlancetaylor? |
Sure. |
Change https://golang.org/cl/110515 mentions this issue: |
Change https://golang.org/cl/110439 mentions this issue: |
Please add the Go 1.11 milestone to this issue. I just encountered this in real-world use by reporting net.Error.Temporary() in logs, in hopes of seeing actually-recoverable errors :-) |
@networkimprov Done, but in general we don't promise that every issue has the milestone in which it was fixed. It's a good idea but it's not something we have any way of doing reliably. |
Confirmed. Broke something I had in place in a hard-to-notice way. It's probably been broken for months, now. |
Issue #6163 result in adding ECONNRESET to list of temporary errors. While this may be correct for accept syscall (btw, this errno is not documented on accept(2) and maybe it was returned by accept in some Linux kernel versions by mistake), it's for sure wrong for write/send syscalls: https://stackoverflow.com/a/2979806/113120
Either ECONNRESET should be removed from list of temporary errors, or net.OpError should be modified to count ECONNRESET as Temporary() only when
Op=="accept"
.The text was updated successfully, but these errors were encountered: