-
-
Notifications
You must be signed in to change notification settings - Fork 395
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
sendmsg error is too loud for a library code #1750
Comments
This log message is visible so that we learn about unforeseen situations. Known-harmless errors are masked out explicitly. This error is unexpected: Quinn will only permit connection attempts to IPv6 peers if the endpoint itself is bound to an IPv6 address. If your environment is IPv4 only, then the endpoint should not have been able to bind to an IPv6 address. What address is the endpoint bound to? What precise operation prompts the error? Applications or even end users that aren't interested in debugging unexpected behavior have the option of configuring |
My local application doesn't have IPv6 networking and doesn't have ability to connect to IPv6 nodes. However, some nodes on P2P network do have IPv6. In libp2p nodes share addresses with each other, including sharing IPv6 addresses with IPv4-only nodes because they have no idea if those are IPv4-only or not. My expectation is that Rust libraries only log critical errors that should never happen and are bugs, the rest should be bubbled up to application that is using the library to decide what to do with it. So far quinn-udp is the only library I consistently see logging things that are not bugs and are 100% expected. For example here is another one that I suspect might be happening on IPv6-enabled machines:
While I do agree it is possible to tweak log level, current situation is very annoying for two reasons:
|
Okay, but that doesn't answer my questions. Quinn should not permit connection attempts from an IPv4 endpoint to IPv6 peers. Again, what address is the endpoint bound to? What precise operation prompts the error?
As described above, this situation should never happen and looks like a bug. That said, if you only want to see errors, why isn't your log filter set to error level?
This is an interesting example. While we'd like to bubble such conditions up, it's not clear if there's a good way to do so more than we already do: failing a connection outright is probably wrong, because this condition can be transient due to a device's network configuration changing. For example, a connection attempt on a mobile device shouldn't fail immediately because you just turned off wifi and the cellular modem hasn't finished spinning up. There's a case for logging ENETUNREACH at debug level, but this seems like exactly the sort of information you'd want a non-expert user to find in a log file if they're having connectivity issues due to an incorrectly configured environment. |
My understanding is that the following happens:
This is in a P2P network and I am a user of a libp2p library and utilize Quinn indirectly. So that is my understanding of the workflow, but it might be incorrect.
Probably, I'm not yet sure about how widespread this one is, have not seen it on the machines I managed yet, but we do have other indications of network issues in P2P environment like total number of connections and other metrics, so from user's point of view printing these sporadically it non-actionable most of the time. |
same issue |
Hey @Ralith, does my explanation above sound plausible? I'd like to help make some progress on this one in the near future. |
I'm interested in the answers to the specific, concrete questions I asked. Attempts to connect across address family shouldn't get this far, and we can't fix whatever issue is causing it without details. To reiterate:
I'm not categorically opposed to reducing the error severity, but it seems to me that the current severity is working as intended in bringing issues like this to our attention. |
I'm observing these messages in libp2p-based app:
This is just IPv6 address on IPv4-only machine, which is nothing special or problematic really, it should be up to the app to log it or not. However,
quinn-udp
logs it automatically.What do you think about decreasing "sendmsg error" to
debug
ortrace
level?The text was updated successfully, but these errors were encountered: