Skip to content
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

mDNS's new implementation doesn't perform as well #1333

Open
MichaelMure opened this issue Feb 17, 2022 · 7 comments
Open

mDNS's new implementation doesn't perform as well #1333

MichaelMure opened this issue Feb 17, 2022 · 7 comments
Assignees
Labels
effort/days Estimated to take multiple days, but less than a week exp/expert Having worked on the specific codebase is important help wanted Seeking public contribution on this issue kind/bug A bug in existing code (including security flaws) P2 Medium: Good to have, but can wait until someone steps up

Comments

@MichaelMure
Copy link

Sorry, no hard number to provide other than "upgrading to the new implementation makes my test fails all over the place, randomly.

I have a series of go test for my project that simulate locally the interactions of a series of services. Those test rely on mDNS for local discovery.

Until now I had a simple time.Sleep() to give this discovery some time to connect, everything was fine. While updating to a more recent go-libp2p, I changed my code to use the new mDNS implementation, resulting in broken tests. I changed my time.Sleep() by something smarter that wait until the discovery worked, up to a minute, but that doesn't seems to be enough.

It seems to me that often the discovery is slower, and sometimes never succeed in a 1 minute period.

Is that something to expect? Is this a bug?

@marten-seemann
Copy link
Contributor

That's not expected, and might very well be a bug.

Are you still using the old mDNS in parallel? We might have another issue with one of the two implementations that might or might not be related: ipfs/kubo#8695.

In general, mDNS discovery should be fast. Nodes that join the network will query their peers, so they should receive a response very quickly. Have you tried running WireShark to see what's going on on the wire?

@MichaelMure
Copy link
Author

Are you still using the old mDNS in parallel?

Not in parallel but when I replaced it with mdns_legacy everything worked again.

Have you tried running WireShark to see what's going on on the wire?

No. I can give it a try but I'm familiar at all with what mDNS should looks like.

@MichaelMure
Copy link
Author

I tried to wireshard a bit. While with the legacy implementation it does show up in wireshark on localhost, the new implementation traffic either doesn't show up or is not recognized properly.

@aschmahmann aschmahmann added kind/bug A bug in existing code (including security flaws) P1 High: Likely tackled by core team if no one steps up exp/expert Having worked on the specific codebase is important labels Feb 25, 2022
@BigLep BigLep added P2 Medium: Good to have, but can wait until someone steps up and removed P1 High: Likely tackled by core team if no one steps up labels Apr 27, 2022
@BigLep
Copy link
Contributor

BigLep commented Apr 27, 2022

2022-04-27 conversation: wireshark-level view is needed here. We're not sure why the new mdns is not showing up for @MichaelMure . This is likely ~.5 day of work to debug. We've downgraded to P2 as there are other peer discovery mechanisms we rely on.

@BigLep BigLep added help wanted Seeking public contribution on this issue effort/days Estimated to take multiple days, but less than a week labels Apr 27, 2022
@schomatis
Copy link

Assigning myself.

@schomatis
Copy link

@MichaelMure Could you share your tests or any small reproduction of your issue, please?

@schomatis
Copy link

@marten-seemann I'm blocking this on "need more input from author" as there's little to do without the failing test or something to reproduce the issue with. I have nothing to work on and the other issue is being diagnosed independently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort/days Estimated to take multiple days, but less than a week exp/expert Having worked on the specific codebase is important help wanted Seeking public contribution on this issue kind/bug A bug in existing code (including security flaws) P2 Medium: Good to have, but can wait until someone steps up
Projects
None yet
Development

No branches or pull requests

5 participants