Subject: fts(3) on mount_smbfs leaking fdescs ?
To: None <firstname.lastname@example.org>
From: Martin S. Weber <Ephaeton@gmx.net>
Date: 11/24/2006 19:28:30
I've found a reliable way to bring my -current machine (21 Nov 2006) to its
knees: mount a fat samba share and have the client grovel a bit beneath it.
The smb server is a nbsd 4.0 BETA (old branch); the smb client a -current
from 2006-11-21. I'm mounting a public smb share. Then, do something like
while :; do find $mountpoint -type f > /dev/null ; done, and after some time
I get "Too many open files" errors. Same for e.g. du (whatever does a fts ?).
Oh, of course, if you let it complain some and keep it running, the machine
will go down to its knees. Un-CTRL+ALT+ESC'apable it sits there and cries...
If you do not let it running and try to shutdown the machine, it won't (it'll
hang in "Unmounting file systems"; un-ctrl-alt-escapable again).
Of course that's just a local DOS, so what :p
I haven't dug through my other filesystem types (none is as big), maybe
fts is broken in general?
Not at the machine atm; going here pre-PR because of course it could as well be
my fault :)
So ..... it's maybe asked a bit much to test that as it includes crashing
your machine (or rather, not being able to shut it down cleanly), it seems
all you need is a some-dozens-gigs samba share (mine is ~120 gigs used) and
some dozen thousand files in there (I've a flat hierarchy from where I searched,
mostly two levels of dirs and files in there, much like pkgsrc) and du -sh $mnt
some ... "Anyone else seeing this" ?