Skip to content

Conversation

@vaLski
Copy link

@vaLski vaLski commented Nov 3, 2025

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.

…ng 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant