0

Why is `ioerr_cnt` rising, without showing any messages in the log?

I'm struggling a bit to work out what process does this. sudo lsof +D /dev/ doesn't seem to show any processes with a SCSI device currently open, but I don't see any relevant open() calls at the time of the errors either (cd /dev && sudo fatrace -c)...

[Answer:] udisks polls drives every ten minutes e.g. for SMART data.

$ ps -ax|grep udisksd
  810 ?        Ssl    0:13 /usr/libexec/udisks2/udisksd
$ sudo strace -t -f -p 810
[pid   810] 14:11:09 clone(strace: Process 26543 attached
child_stack=0x7f8fc551ddf0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7f8fc551e9d0, tls=0x7f8fc551e700, child_tidptr=0x7f8fc551e9d0) = 26543
[pid 26543] 14:11:09 set_robust_list(0x7f8fc551e9e0, 24 <unfinished ...>
[pid   810] 14:11:09 poll([{fd=4, events=POLLIN}, {fd=8, events=0}, {fd=9, events=0}, {fd=11, events=POLLIN}, {fd=13, events=POLLIN}], 5, 599968 <unfinished ...>
[pid 26543] 14:11:09 <... set_robust_list resumed> ) = 0
[pid 26543] 14:11:09 prctl(PR_SET_NAME, "pool") = 0
[pid 26543] 14:11:09 openat(AT_FDCWD, "/dev/sda", O_RDONLY|O_NONBLOCK) = 14
[pid 26543] 14:11:09 ioctl(14, SG_IO, {guard='Q', protocol=BSG_PROTOCOL_SCSI, subprotocol=BSG_SUB_PROTOCOL_SCSI_CMD, ...

I don't know why fatrace did not seem to show this device being opened by udisks. It managed to show other device opens (like when I ran lsof, or when I started firefox and it opened /dev/dri/card0).

^ Does anybody know?

  • does the fanotify(7) example code compiled an run against the /dev directory show any activity? – thrig Apr 5 '18 at 14:32
  • That one seems completely silent, it doesn't show firefox opening /dev/dri even though fatrace -c at the same time does. However, I worded my original complaint wrong. fatrace only seems to show firefox opening /dev/dri, and not the actual device node /dev/dri/card0. Similarly, fatrace doesn't show anything for cat /dev/null. – sourcejedi Apr 5 '18 at 15:01
0

It seems that fatrace does not show any device opens. You can use it to see processes opening directories under /dev, like /dev/dri, but not device nodes like /dev/dri/card0.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.