> I am experiencing a problem with clamd crashing shortly after > a scan using the STREAM protocol. This affects recent > versions of clamd including 0.86.1 and clamav-devel in CVS > running on Interix.
I have spent a little time looking into this. The segv happens when the thread pool spins down the worker threads after the idle timeout for the thread has elapsed. However it only segvs if all of the following are true: scanstream() was queued to the worker thread cfgopt(copt, "TCPSocket"))->enabled) == TRUE cfgopt(copt, "TCPAddr"))->enabled) == TRUE That pretty much says to me that the code that causes the instability is the call to gethostbyname(3) to get the sin_addr for binding the STREAM socket because the alternate execution path of binding to INADDR_ANY is trouble-free. I'm trying to decide if I should replace gethostbyname(3) and the pthread locks with gethostbyname_r/lwres_gethostbyname_r(3) (reentrant) or if there is something in BIND9 on Interix that is broken. It would help if I knew if this is a problem that can be reproduced on other platforms than Interix. Cheers. Brian A. Reiter WolfeReiter, LLC : Thoughtful Computing [http://www.wolfereiter.com] _______________________________________________ http://lurker.clamav.net/list/clamav-devel.html