mirror of https://github.com/tailscale/tailscale/
logtail/filch: fix panic in concurrent file access (#18555)
In the event of multiple Filch intances being backed by the same file, it is possible that concurrent rotateLocked calls occur. One operation might clear the file, resulting in another skipping the call to resetReadBuffer, resulting in a later panic because the read index is invalid. To at least avoid the panic, always call resetReadBuffer. Note that the behavior of Filch is undefined when using the same file. While this avoids the panic, we may still experience data corruption or less. Fixes #18552 Signed-off-by: Joe Tsai <joetsai@digital-static.net>pull/14575/merge
parent
9e7f536a7c
commit
6f55309f34
Loading…
Reference in New Issue