1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/daemon/logger/journald
Nalin Dahyabhai 52c0f36f7b Fix a race in cleaning up after journald followers
When following a journal-based log, it was possible for the worker
goroutine, which reads the journal using the journal context and sends
entry data down the message channel, to be scheduled after the function
which started it had returned.  This could create problems, since the
invoking function was closing the journal context object and message
channel before it returned, which could trigger use-after-free segfaults
and write-to-closed-channel panics in the worker goroutine.

Make the cleanup in the invoking function conditional so that it's only
done when we're not following the logs, and if we are, that it's left to
the worker goroutine to close them.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com> (github: nalind)
2016-03-17 18:36:21 -04:00
..
journald.go Add tag support to journald logging driver, closes #19556 2016-01-27 10:52:19 +00:00
journald_unsupported.go Revert "prevent journald from being built on ARM" 2015-12-02 10:30:13 -05:00
read.go Fix a race in cleaning up after journald followers 2016-03-17 18:36:21 -04:00
read_native.go Try to handle changing names for journal packages 2016-02-23 12:24:27 -05:00
read_native_compat.go Try to handle changing names for journal packages 2016-02-23 12:24:27 -05:00
read_unsupported.go Revert "prevent journald from being built on ARM" 2015-12-02 10:30:13 -05:00