moby/daemon/logger
Cory Snider 90c54320c8 daemon/logger: fix data race in LogFile
The log message's timestamp was being read after it was returned to the
pool. By coincidence the timestamp field happened to not be zeroed on
reset so much of the time things would work as expected. But if the
message value was to be taken back out of the pool before WriteLogEntry
returned, the timestamp recorded in the gzip header of compressed
rotated log files would be incorrect.

Make future use-after-put bugs fail fast by zeroing all fields of the
Message value, including the timestamp, when it is put into the pool.

Signed-off-by: Cory Snider <csnider@mirantis.com>
2022-03-03 14:56:25 -05:00
..
awslogs daemon/logger/awslogs: suppress false positive on hardcoded creds (gosec) 2022-02-08 09:43:22 +01:00
etwlogs Add canonical import comment 2018-02-05 16:51:57 -05:00
fluentd The flag ForceStopAsyncSend was added to fluent logger lib in v1.9.0 2021-12-24 22:04:08 +01:00
gcplogs Update to Go 1.17.0, and gofmt with Go 1.17 2021-08-24 23:33:27 +02:00
gelf Update to Go 1.17.0, and gofmt with Go 1.17 2021-08-24 23:33:27 +02:00
journald Update to Go 1.17.0, and gofmt with Go 1.17 2021-08-24 23:33:27 +02:00
jsonfilelog refactor: move from io/ioutil to io and os package 2021-08-27 14:56:57 +08:00
local test: use os.CreateTemp instead of ioutil.TempFile 2021-12-23 09:09:47 -08:00
logentries Use a regex to match labels 2019-01-16 22:17:16 +00:00
loggerutils daemon/logger: fix data race in LogFile 2022-03-03 14:56:25 -05:00
splunk refactor: move from io/ioutil to io and os package 2021-08-27 14:56:57 +08:00
syslog Fixes #41010 skip empty lines 2020-06-06 12:36:50 +08:00
templates bump gotest.tools v3.0.1 for compatibility with Go 1.14 2020-02-11 00:06:42 +01:00
adapter.go Adds PartialLogMetadata to encode protobuf for logger plugins 2019-04-09 16:14:33 +05:00
adapter_test.go bump gotest.tools v3.0.1 for compatibility with Go 1.14 2020-02-11 00:06:42 +01:00
copier.go Limit the rate at which logger errors are logged into daemon logs 2021-05-24 16:41:38 -07:00
copier_test.go Handle long log messages correctly on SizedLogger 2021-01-20 16:44:06 -08:00
factory.go Improve error feedback when plugin does not implement desired interface 2020-04-21 18:06:24 -03:00
log_cache_opts.go Support configuration of log cacher. 2020-02-19 17:02:34 -05:00
logger.go daemon/logger: fix data race in LogFile 2022-03-03 14:56:25 -05:00
logger_error.go Limit the rate at which logger errors are logged into daemon logs 2021-05-24 16:41:38 -07:00
logger_test.go Improve partial message support in logger 2018-04-11 13:26:28 -07:00
loginfo.go Check the length of the correct variable #42039 2021-02-18 10:27:35 -06:00
metrics.go goimports: fix imports 2019-09-18 12:56:54 +02:00
plugin.go Entropy cannot be saved 2019-06-07 11:54:45 +01:00
plugin_unix.go Update to Go 1.17.0, and gofmt with Go 1.17 2021-08-24 23:33:27 +02:00
plugin_unsupported.go Update to Go 1.17.0, and gofmt with Go 1.17 2021-08-24 23:33:27 +02:00
proxy.go Add canonical import comment 2018-02-05 16:51:57 -05:00
ring.go Merge pull request #42291 from angelcar/awslogs-dont-log-messge-discarded-errors 2021-05-27 19:33:44 -07:00
ring_test.go Update documentation for RingLogger's ring buffer 2018-05-16 18:52:50 -06:00