mtail icon indicating copy to clipboard operation
mtail copied to clipboard

Unknown reader errors should close reader/tailer to avoid mtail looping on broken fds.

Open vaLski opened this issue 2 months ago • 0 comments

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.

vaLski avatar Nov 03 '25 11:11 vaLski