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
logs.go: fixed logger creation #4254
Conversation
Previously, the done channel was not closed properly in case of an error returned by logPipe.Close(), potentially leading to a goroutine leak. This commit ensures that the done channel is closed even if there's an error during the closing of logPipe. Signed-off-by: Anton <ant.v.moryakov@gmail.com>
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.
LGTM
Wonder how have you found this @AntonMoryakov ?
I think we have catched the error returned by runc/libcontainer/logs/logs.go Lines 30 to 32 in 71524dc
Yes, but I think it will be better to move it to defer func. Thanks. |
Hmm you are right (not sure how I overlooked it). So, while |
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.
As pointed out above, there's nothing to fix here.
Or, at the very least, the description needs to be changed.
@AntonMoryakov can you comment on #4254 (comment)? |
Closing for now; will reopen depending on the PR author response. |
Previously, the done channel was not closed properly in case of an error returned by logPipe.Close(), potentially leading to a goroutine leak. This commit ensures that the done channel is closed even if there's an error during the closing of logPipe.