-
Notifications
You must be signed in to change notification settings - Fork 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
protocols/mdns
infinite loop?
#3390
Comments
This sounds like we need to patch From an interface perspective, a stream ends when it returns The implementation however never returns @mxinden Do you know why that was implemented this way? It looks like there are a few subtle things going on there that aren't immediately clear. |
Thanks @michalkucharczyk for reporting.
I don't unfortunately. I am not sure what the best next step is.
|
Could this be in any way related to an issue I'm seeing on Android where interfaces seem to be dropped/readded automatically on a loop? Basically a SwarmEvent::ExpiredListenAddr followed by a SwarmEvent::NewListenAddr for the same addresses, on a loop, every couple of seconds - but only for local addresses. |
Would you be up to patching |
I haven't done any deep dive into the if-watch code to understand the issue fully and patch easily but I can certainly try. A couple pointers would be appreciated, but not essential. |
I think compiling for android will result in the The only error can be emitted from here: https://github.com/mxinden/if-watch/blob/31c4780d803431914aab95ec9139aa8e5795f80c/src/fallback.rs#L51 which is defined in https://github.com/messense/if-addrs/blob/947c6342681b047b48b5f53eb75049881d2dfa20/src/lib.rs#L143-L212. We'd have to audit this function to see whether the errors are permanent or not. If they are, we should be returning |
@thomaseizinger turns out the issue I'm seeing on android is unrelated (libp2p/if-watch#30), but I would have taken a way longer time finding it if you hadn't pointed me in the right direction - many thanks for that, and sorry for inadvertedly hijacking this issue. |
No worries at all, glad we could identify another bug! :) |
Is there any update on this? |
I am not aware of any updates. I am fine with any of the two solutions suggested in #3390 (comment). @bkchr are you still seeing this in the wild? |
Yes, very easy to reproduce. I needed to kill my process today twice with
@michalkucharczyk maybe something you could do? |
I'll put it on my todo-list. |
Summary
It seems there is a busy loop, which never terminates when the process is being shutdown. I observe the problem in polkadot node.
Expected behaviour
The loop should end in case of erroneous conditions.
Actual behaviour
With
RUST_LOG=trace
, I see logs flooding the terminal. Parts of log are here. (However the problem is not strictly related to this PR, it can be reproduced by Ctrl-C during startup.)The single log iteration is as follows:
I believe the problematic busy-loop is here.
In case of
Tokio
being shutdown thernetlink
is providing stream of errors, and the loop never terminates.Version
0.50.0
Would you like to work on fixing this bug?
Maybe.
The text was updated successfully, but these errors were encountered: