Date: Mon, 5 Mar 2007 15:25:13 +0100 (CET) From: Martin Blapp <mb@imp.ch> To: ClamAV Development <clamav-devel@lists.clamav.net> Cc: freebsd-stable@freebsd.org Subject: Re: Clamav-90_2 Lockup with freebsd 6.2 (fwd) Message-ID: <20070305152453.H18301@godot.imp.ch>
next in thread | raw e-mail | index | archive | help
After further analyzing I think that pthread_cond_timedwait() in libpthread.so.2 has some issues. While the default clamd worker timeout of 30 seconds is reached with libc_r.so.6 and libthr.so.2 and pthread_cond_timedwait() returns ETIMEDOUT there, libpthread.so doesn't get any ETIMEDOUT errors back at all, and the code can never reach the part where the worker thread gets detached and the thread count gets decreased. With libpthread.so.2 pthread_cond_timedwait() returns always 0. The manpage tells me: > The pthread_cond_timedwait() function atomically blocks the current > thread waiting on the condition variable specified by cond, and unblocks > the mutex specified by mutex. The waiting thread unblocks only after > another thread calls pthread_cond_signal(3), or pthread_cond_broadcast(3) > with the same condition variable, or if the system time reaches the time > specified in abstime, and the current thread reacquires the lock on > mutex. That doesn't seem to work with libpthread.so.2. Any hints ? -- Martin Martin Blapp, <mb@imp.ch> <mbr@FreeBSD.org> ------------------------------------------------------------------ ImproWare AG, UNIXSP & ISP, Zurlindenstrasse 29, 4133 Pratteln, CH Phone: +41 61 826 93 00 Fax: +41 61 826 93 01 PGP: <finger -l mbr@freebsd.org> PGP Fingerprint: B434 53FC C87C FE7B 0A18 B84C 8686 EF22 D300 551E ------------------------------------------------------------------
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070305152453.H18301>