On Mar 18, 2004, at 08:52, Robert Blayzor wrote:
On 3/16/04 7:29 PM, "Doug Hardie" <[EMAIL PROTECTED]> wrote:-- Doug
The problem I encountered has now been identified and I have a working clamd that does not hang. I compiled it two different ways and both worked. The problem was /dev/urandom returning either a -1 or a 0. Either of those will cause others.c to hang as it does not test for that condition. One approach was to put in a trivial test for it and exit from the loop. The other was to remove the define for C_URANDOM in the .h file. Both of those approaches worked in my testing. Since I couldn't easily determine if the first would have some side effects if it didn't return enough random bits, I have gone with the second approach. My production server has been running for slightly over 6 hours now and no problems have been seen.
In case it might help someone else, the approach I used to find the
problem was to use a test system and pass a large number of directories
(The FreeBSD source code) to clamdscan and let it beat clamd up for
about 5 minutes. Then I let it finish what it could and return to its
"idle" state. At that point it was using all the available CPU time.
I entered it via gdb and let it single step around awhile to find out
where it really was and what was going on. Ktrace was not helpful as
it kept showing a poll with a time period of 0. Apparently the poll is
in the read code. A messy way to test, but it worked.
I'm having the problem you've been having on a FreeBSD 4.7 box. I'm willing
to test your work around if you're willing to share it. I have some fairly
high volume production clusters I'd like to put this on to beat it up.
The problem I see usually is that clamd answers and processes clamdscan
requests normally but what happens on random scans is that it gobbles up all
the CPU resources, then eventually continues after several minutes.
I usually notice the problem more whenever clamd seems to reload the database, but it also happens on a lot of text/mail file scanning.
-- Robert Blayzor, BOFH INOC, LLC [EMAIL PROTECTED] PGP: http://www.inoc.net/~dev/ Key fingerprint = 1E02 DABE F989 BC03 3DF5 0E93 8D02 9D0B CB1A A7B0
Portable: Survives system reboot.
------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ Clamav-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/clamav-users
------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ Clamav-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/clamav-users