-
Notifications
You must be signed in to change notification settings - Fork 233
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
Fixing leaking go routines #850
Conversation
Some tests are failing randomly, and it is a hell to debug |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A test would be nice but this code looks good.
I would base and merge on top of v0.24.0
directly into a v0.24.1
and then merge the release branch back into master.
Note the tests timeout. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see you havn't updated d373974#r117933266
I'm not saying it's broken just every-time someone connects to you and do a query you very quickly start 2 ping attempts, one from the subscribee one from the handler.
This is wastefull
Some tests seem to enter randomly an infinite loop, and some seem to always enter an infinite loop, resulting in the tests timing out. This isn't the case without the new go routine in Lines 669 to 713 in 43e8891
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider testing for that behaviour else that fine LGTM.
I'm not up on the specifics here, but want to understand the testing situation. Do we have regression tests in place for the fix? Is this change causing other tests to fail? I know we want to get this out, but I'd like to understand what it takes to do it right. |
@Jorropo and I debugged the tests, but were not able to get them to work yet. It seems unrelated to the new code, but it wouldn't be wise to push this change. We also uncovered new bugs. More debugging is required to fix the broken tests. If Kubo has to be released shortly, I would recommend reverting this change and using go-libp2p-kad-dht v0.23.0, and the fix will (hopefully) make it to the next release. |
Thanks for the update and work @guillaumemichel and @Jorropo . Per 2023-06-14 verbal with @Jorropo , we agreed that we won't block the Kubo release on this. It can come in a followup Kubo release. |
@Jorropo : to be 100% clear for anyone watching, I assume we'll revert the change and do a patch release (rather than recommend consumers use the previous version)? (The functionality would be restored and include a fix as a followup patch release.) |
yes |
addresses #849
depends on libp2p/go-libp2p-kbucket#120
linked: ipfs/kubo#9814