After a reboot I've tried to find all files which name starts with 'libc'.
I was in a root shell:
# find / -name 'libc*'
The command found nothing. Executed again, then I got a long list with all of these files.
Why?
After every reboot I experienced the same: first find in the root shell didn't work.
I can reproduce it on the host after reboot, and in lxc containers on the same host, but I can't with kernel 3.x.x or in non-root shell or in virtual machines (tried both in kvm and virtualbox guests).
As far as I see, after umount /sys/kernel/debug, find works correctly but when I remount it, and try to run find, the first attempt in root shell fails again.
Code: Select all
root@minipc:~# find / -name 'libc*' | wc -l
20
root@minipc:~# umount /sys/kernel/debug
root@minipc:~# find / -name 'libc*' | wc -l
671
root@minipc:~# mount -t debugfs debugfs /sys/kernel/debug
root@minipc:~# find / -name 'libc*' | wc -l
20
root@minipc:~# find / -name 'libc*' | wc -l
671
root@minipc:~# umount /sys/kernel/debug
root@minipc:~# find / -name 'libc*' | wc -l
671
root@minipc:~# mount -t debugfs debugfs /sys/kernel/debug
root@minipc:~# find / -name 'libc*' | wc -l
20
root@minipc:~# find / -name 'libc*' | wc -l
671
Have you got any idea what is it and why? And why can't I reproduce it in a virtual machine?
I must to use kernel 4.3 or newer because of my hardware.
Update: it's more interesting... I've removed then reinstalled Debian on that machine, and now the find works.