Closed xse closed 3 years ago
I tried to reproduce this with a naïve symlink loop:
--- tests/fatrace-currentmount
+++ tests/fatrace-currentmount
@@ -25,6 +25,12 @@ mv "${TEST_FILE}.2" dest/"${TEST_FILE}.2"
rm dest/"${TEST_FILE}.2"
rmdir dest
+echo "robustness against ELOOP"
+ln -s link1 link2
+ln -s link2 link1
+ls -lR link1 || true
+rm link1 link2
+
but that works fine. I suppose for system it's not really a symlink loop, but opening with O_NOFOLLOW
, and these files ought to be links. Unfortunately I think O_NOFOLLOW
can't be done in shell.
... but Python to the rescue! I added a test which should model this situation, and it works.
So that's not a reproducer yet, and something more intricate is going on. That said, I think fatrace does not need to be that strict, and it'd be safe to ignore such errors.
Nevertheless, I made this non-fatal now. Do you have a chance to test current master and letting me know if it's still broken? (I'll also do a new upstream release soon).
Do you have a chance to test current master and letting me know if it's still broken? (I'll also do a new upstream release soon).
Yup, it now just warns about it!
Thanks a lot!
Hi, i can reliably trigger this error just by launching
systemctl list-unit-files
on the following system:I don't really know how to figure out what's going on. Here is an example error output:
What seem to happens is that systemd opens random files with openat and get the ELOOP from
strace -e openat -f -p 1 -o openat.log
:Fanotify then gives those file handles to fatrace that tries to open em with open_by_handle_at and can't do so. I assume that's what happens tbh i don't know how to link the handles i get from an strace of fatrace to files. Another strange thing is that
systemctl list-unit-files
fails with "Connection timed out" while being traced, tho i assume that's unrelated and due to smth on systemd's side. I wonder if anyone can replicate on x86 i haven't been able to try, however I've had confirmation it fails on other arm machines.I'll try to play with audit/bpf and will update this post if i figure out a way to see which file causes that issue. Have a good day o/