Searching for system-resolved service following the recent vulnerability disclosure, I came to see a very strange behavior from find command.
root@localhost:/# find . -name "*systemd-resolved*" ./usr/share/man/man8/systemd-resolved.service.8.gz ./usr/share/man/man8/systemd-resolved.8.gz
The command returns 0 or two lines as output for the first run. But if I run the command the second time I get:
root@localhost:/# find . -name "*systemd-resolved*" ./usr/share/man/man8/systemd-resolved.service.8.gz ./usr/share/man/man8/systemd-resolved.8.gz ./lib/systemd/systemd-resolved ./lib/systemd/system/systemd-resolved.service.d ./lib/systemd/system/systemd-resolved.service
This means the first time, "find" does not actually find everything. Also this only happens one time. Running the command next times shows correct output. I checked this on some other systems with Debian 8 (jessie) installed. On those with Kernel 4.9+ this exact problem always occurs but on systems with kernel 3.16 it doesn't happen.
After system reboot all this happen again. But the behavior is the same for each individual system. That means that if testing on a specific system returns (wrongly) two lines of output for first run and correct output for second run, then first run of the command after rebooting the system again prints 2 lines. So the systems show same behavior after each reboot (according to my tests). Files details are as follows:
-rw-r--r-- 1 root root ./usr/share/man/man8/systemd-resolved.service.8.gz lrwxrwxrwx 1 root root ./usr/share/man/man8/systemd-resolved.8.gz -> systemd-resolved.service.8.gz -rwxr-xr-x 1 root root ./lib/systemd/systemd-resolved drwxr-xr-x 2 root root ./lib/systemd/system/systemd-resolved.service.d -rw-r--r-- 1 root root ./lib/systemd/system/systemd-resolved.service
EDIT: To all those who suggest the problem maybe related to this specific case for these specific files: "system-resolved" is just as example. This happens when searching other keywords too. This is another example which gives wrong results for the first run:
root@localhost:/# find . -name "*apache*"
Not anybody here is able to check this problem on a Debian 8 with latest kernel from backport repository?