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
UDP Problem on Windows #1737
Comments
What is this error?
This is not a log message of quic-go. Please enable logging as described in the wiki. Otherwise we can’t see what going on here. |
Should this be reopened? |
Is there any update on this? There was some discussion at libp2p/go-libp2p#519. |
To be honest, I don't really understand the problem and I have no idea how to reproduce it, so unfortunately, there's no update for this. |
I have seen all kind of wsa errors when connection is broken (I'm testing this). |
I think my former guess was right: libp2p/go-libp2p#519 (comment) Potentially around here: https://github.com/lucas-clemente/quic-go/blob/272a2c88e670fcb39fe93b9dc74e5f2d5acc67a6/conn.go#L40 In the meantime, if someone has a reproducible, that'd make checking this easier. I think you just need to set up a server and kill a client in the middle of a send to get this error on Windows. Among other things for other errors, like having the network interface lose connection while receiving on the server side. |
@djdv You mean we should check if |
It seems that @djdv has created a screencast for the issue: https://www.youtube.com/watch?v=GAkn9KI4ceY&t=183s. |
Interesting screencast, @djdv. Is there any related Go issue yet? |
That's right.
I found an issue related to file errors (golang/go#35131), but the CL is discussing WSA values as well (https://go-review.googlesource.com/c/go/+/208537/). |
Responded on golang/go/issues/35131 |
I have a partial fix for this issue in b7f05b5. Partial because, if I understand the screencast correct, not all WSA values are correctly marked as temporary errors by Go. |
I think the linked patch is good for now. While it won't solve the issue on Windows yet, if these errors get added as "temporary" errors then it will in later Go versions. I'm in the middle of a different IPFS/libp2p fix right now, but will look into the Go side of things afterwards (if nobody beats me to it). If Go starts treating these errors as temporary, then nothing further should be necessary. If it's important that this be fixed now, we can do the second option with build constraints to the Go version as well. |
Go 1.18 deprecated the This means that we should also get rid of the logic to ignore temporary errors: https://github.com/lucas-clemente/quic-go/blob/d1498c360e207522c7f45c3fb30c39b66139b008/packet_handler_map.go#L347-L350 Regarding this issue, looks like we will need to finally identify WSA errors properly to actually fix this issue. As I'm not a Windows user, I'll need help with that. |
Actually, we probably shouldn't remove this code. We shouldn't cause a regression. However, probably can't continue relying on |
Reference here: https://docs.microsoft.com/en-us/windows/win32/api/winsock/nf-winsock-recvfrom?redirectedfrom=MSDN Someone should reproduce the error and see which error code was causing the issues: |
I use quic transmission,but sometimes quic will close all network connections.
source code:
ts, err := c.conn.AcceptStream()
i detecte error
InternalError: read udp4 0.0.0.0:55289: wsarecvfrom: The connection has been broken due to keep-alive activity detecting a failure while the operation was in progress
The text was updated successfully, but these errors were encountered: