-
Notifications
You must be signed in to change notification settings - Fork 882
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
[Bug]:A potential goroutine leak in libnetwork/drivers/overlay/peerdb.go #2680
Comments
@xuxiaofan1203 please note what is wrote to readme:
So double check if same issue still exists latest code int there and report it there if it does. |
Thank you for your reply and help, I will check again there. And I'm sorry to bother you. |
As already noted by @olljanat, this repo is now defunct and not actively watched by maintainers. Also, it seems this goroutine leak only exists in an isolated test due to how it's written. So let me close this issue. |
Hello @olljanat, the libnetwork is useful, but I found a bug when I used it, I think we can fix it.
In the test file
libnetwork/drivers/overlay/overlay_test.go
Lines 134 to 144 in 3797618
After the Init has executed and the ctx and cancel are created at
libnetwork/drivers/overlay/overlay.go
Lines 75 to 77 in 3797618
There is no cancelFunc to awaken the ctx.Done() at
libnetwork/drivers/overlay/peerdb.go
Line 280 in 3797618
So the goroutine will block, and you can use the goleak to reproduce the bug like this
And I think we can fix the bug by calling the cleanupDriver() after the init() gets executed.
The text was updated successfully, but these errors were encountered: