fatrace crashes with 'too many open files'
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
fatrace |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
I'm on Arch Linux with fatrace 0.15.1
Running it as `fatrace -f W` works, but after some time fatrace exits with the error "too many open files". For me this occurs after about a minute and 30 seconds. This is on a headless server that isn't doing much - looks like the samba daemon is writing a file every 20 seconds, and there are some logged failed ssh logins and fail2ban logging about banning them.
$ time sudo fatrace -f W
nmbd(861): CW /var/lib/
nmbd(862): CW /var/lib/
sshd(863): CWO /var/log/btmp
fail2ban-
sshd(863): CW /var/log/btmp
fail2ban-
nmbd(865): CW /var/lib/
nmbd(866): CW /var/lib/
sshd(867): W /var/log/tallylog
sshd(867): CW /var/log/tallylog
sshd(867): CWO /var/log/btmp
fail2ban-
sshd(867): RW /var/log/tallylog
sshd(867): CW /var/log/tallylog
sshd(867): CW /var/log/btmp
fail2ban-
nmbd(869): CW /var/lib/
sshd(867): W /var/log/tallylog
sshd(867): CW /var/log/tallylog
sshd(867): CW /var/log/btmp
fail2ban-
fatrace: read: Too many open files
I had the same problem on a 4.19 kernel.
The attached patch seems to fix the issue.