mtail
mtail copied to clipboard
Unknown reader errors should close reader/tailer to avoid mtail looping on broken fds.
If mtail is tailing a file under a mount, and this mount is gone, mtail reader might block on
read error: bad file descriptor ....
This will DoS mtail which won't respond to standard signals and significantly increase its CPU consumption.
Better strategy is to simply close reader/tailer on the broken fd and let the tailer do its job.
Another retryable cases like syscall.ESTALE can be added in future, but for now fail fast seems like a logical approach.