kern/77680: Too many files in a single directory slowing and then crashing the system

David WU dyw at wyk69.org
Fri Feb 18 15:00:20 GMT 2005


>Number:         77680
>Category:       kern
>Synopsis:       Too many files in a single directory slowing and then crashing the system
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Feb 18 15:00:19 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     David WU
>Release:        FreeBSD 5.3-RELEASE #0
>Organization:
>Environment:
/usr/obj/usr/src/sys/GENERIC  i386
>Description:
I have a mail server running mainly sendmail with amavisd-new and clamav and spamassasin.   The size of the quarantine directory /var/virusmails can grow fairly quickly due to the large number of files created.   I suspect when the size get to be larger than 8M (from the output of ls -l /var) the system will start to slow down considerably and if nothing is done will crash eventually, and will not be able to reboot without manually intervention, as fsck will fail no matter how many times the problematic file system is checked.   I had to remove manually all the files under /var/virusmails and perhaps even the directory itself before fsck can be used to make the file system clean enough for a reboot.     
>How-To-Repeat:
I do not really want to repeat the problem as I have no idea how long it takes the system to crash from the time it slows down as it is a production machine handling email.   Sorry about that.      
>Fix:
Since the directory is under usage, the workaround is to use a script to rename the old directory and then created a new one using the same name. of course this has to be done before the system crashes.     
>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list