Find Warning - [Fedora] FC4 'find' command is finding wrong hard link count

mylists at pinesalad.net mylists at pinesalad.net
Tue Jul 5 06:21:02 UTC 2005


Tom Broadhurst wrote:
>>-----Original Message-----
>>From: fedora-list-bounces redhat com 
>>[mailto:fedora-list-bounces redhat com] On Behalf Of Nifty Hat Mitch
>>Sent: Saturday, June 18, 2005 6:03 PM
>>To: akonstam trinity edu; For users of Fedora Core releases
>>Subject: Re: Find Warning..
>>
>>
>>On Wed, Jun 15, 2005 at 04:41:06PM -0500, akonstam trinity edu wrote:
>>
>>>On Wed, Jun 15, 2005 at 04:39:30PM +0200, Jos? Javier 
>>
>>Cuadrado wrote:
>>
>>>>Hello i just did a fresh install of FC4 and when i do a 
>>
>>find i get the following warning. Any tips to fix it? 
>>
>>>>Thanks in advance
>>>>
>>>>find / -name <whatever> 
>>>>find: WARNING: Hard link count is wrong for /proc: this 
>>
>>may be a bug in your filesystem driver. Automatically turning 
>>on find's -noleaf option. Earlier results may have failed to 
>>include directories that should have been searched.
>>
>>>>-- 
>>>
>>>Running find on /proc is bound to cause problems. /proc is 
>>
>>not a real
>>
>>>filesystem it is simulated filesystem created by the kernel to hold
>>>various characteristics of your system.
>>
>>This does seem to be a harmless bug in the /proc filesystem.
>>
>>When I first saw this I dismissed it as the fast moving nature of 
>>the /proc filesystem.  Find can often toss out errors because 
>>what it found and
>>what it 'sees'  (stat etc.) might not match or even still be 
>>a moment later.
>>
>>
>>
>>find: WARNING: Hard link count is wrong for /proc: this may 
>>be a bug in your filesystem driver.  Automatically turning on 
>>find's -noleaf option.  Earlier results may have failed to 
>>include directories that should have been searched.
>>/proc
>>/proc/bluetooth
>>
>>But Looking a little bit closer...
>># ls -lid /proc
>>1 dr-xr-xr-x  140 root root 0 Jun 17 22:07 /proc
>># ls -ali /proc | wc
>>    164    1636   11843
>>
>>So this is why find is tellig us that something is wrong.
>>There are 24 some 'things' that do not have an inode linked to
>>/proc itself.
>>
>>It is a pseudo filesystem intended to communicate to the user
>>various kernel and process info.   It should have all the
>>correctness of any filesystem so I suspect a real bug.
>>
>>As best I can tell this is harmless.
>>
>>
>>-- 
>>	T o m  M i t c h e l l 
>>	Found me a new place to hang my hat :-)
>>	Found me a cable too.
>>
>>-- 
>>fedora-list mailing list
>>fedora-list redhat com
>>To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list
>>
>>
> 
> Tom
> 
> Excellent detective work.
> This may be harmless, but, as you mention, it's still probably a bug.
> At the least your explanation will allow me to sleep better.
> Thanks again for confirming the problem.

It looks like the "bug" has been noticed across several distro's.

The reports seem to go back to late December 2004 in 2.6.8 kernels.
I didn't come across this in FC3 at all though.

If you want to test this under FC3 you can boot up the FC3 rescue CD
(still an iso on the mirrors).
Try a find against /proc and you will see it works and the hardlink
counts are correct.  
This is even though the PID dirs are dynamically changing.

The only error you should expect from using find against /proc is a file
or directory not found error.
That's what's to be expected in any dynamically changing filesystem.

Unfortunatly I've come across threads that simply say in essence "you
shouldn't be searching /proc" or "the hardlink error is normal as /proc
is dynamic".  This line of reasoning is just plain silly.  

Time to enter this into RedHat Bugzilla??

Thanks.

Some References:

Some info, but apparently not the right patch for gentoo
http://lkml.org/lkml/2005/4/1/111        

More info, right patch for gentoo
http://lkml.org/lkml/2005/4/2/72   

Official gentoo bugzilla entry
http://bugs.gentoo.org/show_bug.cgi?id=86031

Some discussion on the hardlink count
http://kerneltrap.org/mailarchive/1/message/4043/thread

Other related reports:
https://www.redhat.com/archives/fedora-list/2005-June/msg02741.html

http://www.linuxforums.org/forum/ntopic46778.html




More information about the fedora-list mailing list