On Mar 16, 2004, at 11:48, Everton da Silva Marques wrote:


On Tue, Mar 16, 2004 at 03:36:40PM +0200, turgut kalfaoglu wrote:
I am running clamav under SunOS 5.8. Ever since version 0.67 (or so, I
am not checking them regularly) , I have been unable to leave ClamAV
running. It does run, but after some minutes, it stops processing
emails. It is still running, in fact, it uses up to 85% of the CPU(!),
but no email goes thru. Did anyone else experience this problem?

Yes.


I have posted a similiar issue here:
http://www.mail-archive.com/[EMAIL PROTECTED]/ msg06462.html


Doug Hardie is tracking a similar issue:
http://www.mail-archive.com/[EMAIL PROTECTED]/ msg06907.html

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.



-------------------------------------------------------
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

Reply via email to