Skip to content

Fix: Resolve DHT regression caused by race condition in stream muxer initialization#1147

Merged
seetadev merged 14 commits intolibp2p:mainfrom
asmit27rai:1128
Mar 30, 2026
Merged

Fix: Resolve DHT regression caused by race condition in stream muxer initialization#1147
seetadev merged 14 commits intolibp2p:mainfrom
asmit27rai:1128

Conversation

@asmit27rai
Copy link
Copy Markdown
Contributor

Fixes #1128 - DHT regression on v0.5.0 where streams fail to open to bootstrap peers with error "handshake write failed: fail to write to multiselect communicator".

@asmit27rai
Copy link
Copy Markdown
Contributor Author

@seetadev Please review this PR.

@seetadev
Copy link
Copy Markdown
Contributor

@asmit27rai : please resolve CI/CD issues. Happy to review.

CCing @sumanjeet0012 and @acul71 for their thoughts and feedback too.

@asmit27rai
Copy link
Copy Markdown
Contributor Author

@seetadev @acul71
All CI/CD is passing.
Please review this. Thank You.

@sumanjeet0012
Copy link
Copy Markdown
Contributor

@asmit27rai Could you add a newsfragment file for this PR.

@asmit27rai
Copy link
Copy Markdown
Contributor Author

@sumanjeet0012 Newsfragment added.

@seetadev
Copy link
Copy Markdown
Contributor

@asmit27rai : Hi Asmit, great work on this fix 👏 This addresses a pretty critical regression in the DHT flow, and the root cause around the race condition in stream muxer initialization is well handled. Fixing the handshake failure with bootstrap peers is a big reliability win, especially since this impacts core connectivity. The changes are clean and focused, and it’s good to see CI passing and the newsfragment added as well. Overall, this looks like a solid and important fix that improves stability of the networking stack, nice job pushing this through.

CCing @sumanjeet0012 for his review and feedback. We should land it in the coming release.

@seetadev
Copy link
Copy Markdown
Contributor

seetadev commented Mar 29, 2026

@asmit27rai : There is just one CI/CD issue I noticed. Otherwise, ready for final review + merge.

Thank you for the review: @sumanjeet0012

@seetadev seetadev merged commit 4f7aa12 into libp2p:main Mar 30, 2026
38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DHT regression on v0.5.0

4 participants