moby / libnetwork

networking for containers
Apache License 2.0
2.16k stars 881 forks source link

[Bug]:A potential goleak #2681

Closed xuxiaofan1203 closed 1 month ago

xuxiaofan1203 commented 7 months ago

blocking position: https://github.com/moby/libnetwork/blob/3797618f9a38372e8107d8c06f6ae199e1133ae8/networkdb/cluster.go#L257 The nDB.cancelCtx() is in the func clusterLeave(), when return err ,the cancelFunc can't get executed and the goroutine leak. https://github.com/moby/libnetwork/blob/3797618f9a38372e8107d8c06f6ae199e1133ae8/networkdb/cluster.go#L224-L243 You can reproduce the bug by making program execute the path and test it by goleak 1712388819260 1712388847783

akerouanton commented 1 month ago

Thanks for reporting! It seems to be a duplicate of https://github.com/moby/moby/issues/47859. Since this repo is defunct, and not actively watched by maintainers, let me close this ticket.