-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
quic: Error from peer should be explicit that it is coming from remote peer rather than a local error #1928
quic: Error from peer should be explicit that it is coming from remote peer rather than a local error #1928
Comments
Is that something that quic-go should do? The string representation is generated there. Any suggestion where to sneak that bit of information into the message?
It's also scary. We should be more deliberate about what we send in the error message. Having an error code for "you exceed a resource limit" would definitely make sense though (see libp2p/specs#479 for a proposal). |
We should add extra information to the error on the receiving side, so that out of date clients or malicious/broken clients can't send confusing errors. We should also sanitize the errors we send back. I think a "I'm overloaded try again later" style error is fine. But we shouldn't be sending errors with this high level of fidelity back. |
I think so.
Not sure. Maybe wherever we receive the application error code and the error string? |
quic-go/quic-go#3629 would fix this. @MarcoPolo, would you mind doing a quick review over in quic-go? |
Thanks @marten-seemann . A couple of things:
|
Definitely won't make it into v0.24.0, because that one has shipped last night :)
That's correct. |
I think we can do this for for the final release in case other stuff comes up between now and then. Thanks @marten-seemann . |
Hi, Sorry for posting in a closed issue, but this seems to be touching exactly what i "thought" i was looking for. This is all with Kubo 0.18.1 (yup, brand spanking new for just some hours as i write this).
Is a message that is spammed so much when warning logs are enabled. So now i'm like totally confused. Some clarity would be helpful here. To be clear here. The mentioned error message starts popping up within mere seconds of starting ipfs when it certainly doesn't have many connections yet. |
As the message says, this error happened on the remote node. For some reason a resource limit is being exceeded there. There's nothing you can do about it locally. |
@marten-seemann : I'm going to reopen given this is still causing confusion for Kubo users per: I think the suggestion here and here are good input for driving clarity:
|
A thing that didn't hit me till @MarcoPolo explained it to me is that a message like this: Has a lot more meaning then it seems. Knowledge you just don't know unless you go around asking people and/or happen to find docs that explain it. That message means:
But the message reads like: "There was an error, my local system cannot reserve a slot to accept that remote connection"
Changing "remote" to "remote peer" is marginally making it better but still gives a message that is very confusing to read without the background information. Do note, anyone reading this very github issue likely already has a ton more background information then the average user trying to debug ipfs. Imho, these parts of the message should go:
A reworded message that "makes sense to me" would look something like:
Alternatively I wouldn't even mention anything about limits being exceeded. It's an internal detail the remote knows more about and should not be of any value for someone making a connection to that peer. An error that is more appropriate would look something like this:
In this latter case you could provide more info on the peer itself that drops a connection. So for example if my node drops an incoming connection then it can tell the verbose details (limits, resources, whatnot) as to why it dropped that connection. The remote that is being dropped should not care about those details. I hope this insight in my thinking about that error message helps :) |
A few things here:
|
We lost some time debugging this. Basically Kubo folks saw this log line
Even with the resource manager disabled. And naturally assumed we were still blocked despite using a null resource manager. This error actually came from the peer when it closed the connection here
We should be more explicit locally that this is a remote error from the peer, and not an error we generated locally.
On the flip side, it's cool that the local peer can see the remote peer is blocking connections because of rcmgr.
The text was updated successfully, but these errors were encountered: