Repair (*Broadcaster).run goroutine leak #1958
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1958 +/- ##
=========================================
Coverage ? 37.94%
=========================================
Files ? 137
Lines ? 27309
Branches ? 0
=========================================
Hits ? 10363
Misses ? 15673
Partials ? 1273
Continue to review full report at Codecov.
|
|
LGTM, can you actually squash all your commits into 1? |
|
ok, I will squash them |
db55212 to
ec3ff26
Compare
When execute 'docker swarm init' and 'docker swarm leave -f' on a node repeatedly, the (*Broadcaster).run goroutine leak. Signed-off-by: yangchenliang <yangchenliang@huawei.com>
ec3ff26 to
71747b9
Compare
abhi
left a comment
There was a problem hiding this comment.
Does broadcaster.Remove() takes care of this ? Or Should this be added in here ?
https://github.com/docker/libnetwork/blob/0bce3e17ca9572955e6b83d5b7431767492133c1/networkdb/watch.go#L86
|
@abhi no the broadcaster is only one per networkdb and the Add/Remove allows you to add and remove listeners. |
|
@fcrisciani got it makes sense. LGTM |
Repair (*Broadcaster).run goroutine leak
When execute 'docker swarm init' and 'docker swarm leave -f' on a node
repeatedly, the (*Broadcaster).run goroutine leak.
•What I did
Execute 'docker swarm init' and 'docker swarm leave -f' on a node
repeatedly
•How I did it
while true; do docker swarm init ; sleep 3 ; docker swarm leave -f ; done &
•How to verify it
'free -m', watch the 'available' item . constant loss explans the goroutine leak.