Closed cezarsa closed 5 years ago
Can you rebase and check if this is still needed?
Seems to be merged (and in v0.16.1
)
https://github.com/docker/machine/commit/55bfb59b67e7db9c058d6a973a46c7a2d32f0d17
Yes, it is merged and also it is rebased so I am going to close it.
A similar PR was sent to the official repo in docker/machine#4629 but since it's in maintenance mode I'm also sending it here.
This commit ensures that when a plugin instance is closed the goroutines responsible for streaming stdout and stderr of the called binary will also exit, preventing a goroutines leak.
Before this commit these goroutines could stay blocked forever if Close() was called while the binary still had some pending output.
I found this bug after debugging a real world goroutine leak, the goroutines dump would show thousands of goroutines stuck at: