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, <[EMAIL PROTECTED]> <[EMAIL PROTECTED]>
------------------------------------------------------------------
ImproWare AG, UNIXSP & ISP, Zurlindenstrasse 29, 4133 Pratteln, CH
Phone: +41 61 826 93 00 Fax: +41 61 826 93 01
PGP: <finger -l [EMAIL PROTECTED]>
PGP Fingerprint: B434 53FC C87C FE7B 0A18 B84C 8686 EF22 D300 551E
------------------------------------------------------------------

_______________________________________________
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to