6.2-Release and Clamd 0.90 with libpthread.so

Martin Blapp mb at imp.ch
Tue Feb 20 16:01:37 UTC 2007


Hi,

After upgrading to clamd 0.90 I found that clamd
doesn't work well with libpthread.so.2.

Using libmap.conf entries for libthr.so.2 or libc_r.so.6
worked fine. With both thread libraries clamd works as it
should.

The effect with libpthread is that clamd works very very slow.
It's only able to scan 1-2 files in 5 seconds instead of
400-500 in the same time with libthr/libc_r.

A ktrace shows the following behaviour:

clamd 0.90 and libpthread.so.2

   1735 clamd    RET   fork 0
   1735 clamd    CALL  kse_release(0xbe7eac20)
   1735 clamd    CALL  kse_wakeup(0x9e4678c)
   1735 clamd    RET   kse_wakeup 0
   1735 clamd    CALL  kse_release(0x9ea3f10)
   1735 clamd    RET   kse_release 0
   1735 clamd    RET   kse_release 0
   1735 clamd    CALL  kse_release(0x805df4c)
   1735 clamd    RET   kse_release 0
   1735 clamd    CALL  kse_release(0x9eabedc)
   1735 clamd    RET   kse_release 0
   1735 clamd    CALL  kse_release(0x805dedc)
   1735 clamd    CALL  kse_wakeup(0x9e4670c)
   1735 clamd    CALL  kse_release(0x9eabedc)
   1735 clamd    RET   kse_release 0
   1735 clamd    RET   kse_wakeup 0
   1735 clamd    CALL  kse_wakeup(0x9e4680c)
   1735 clamd    RET   fork 0
   1735 clamd    CALL  kse_wakeup(0x805740c)
   1735 clamd    RET   kse_wakeup 0
   1735 clamd    RET   kse_release 0
   1735 clamd    CALL  kse_release(0x9ea7f10)
   1735 clamd    RET   kse_release 0
   1735 clamd    CALL  kse_release(0xbef61c10)
   1735 clamd    CALL  kse_release(0x805dedc)
   1735 clamd    CALL  kse_wakeup(0x805740c)
   1735 clamd    RET   kse_wakeup 0
   1735 clamd    RET   kse_release 0
   1735 clamd    CALL  kse_release(0xbec30f50)
   1735 clamd    CALL  kse_wakeup(0x9e4678c)
   1735 clamd    RET   kse_wakeup 0
   1735 clamd    RET   kse_release 0
   1735 clamd    CALL  kse_release(0xbe8fbb90)
   1735 clamd    CALL  kse_wakeup(0x9e4670c)
   1735 clamd    RET   kse_wakeup 0
   1735 clamd    RET   kse_release 0
   1735 clamd    CALL  kse_release(0x9ea7f40)
   1735 clamd    CALL  kse_wakeup(0x9e4680c)
   1735 clamd    RET   kse_release 0
   1735 clamd    RET   kse_release 0
   1735 clamd    RET   kse_wakeup 0
   1735 clamd    CALL  kse_release(0x9ea7ed0)
   1735 clamd    CALL  kse_wakeup(0x805740c)
   1735 clamd    CALL  kse_release(0xbef61bd0)
   1735 clamd    RET   kse_wakeup 0
   1735 clamd    RET   kse_release 0
   1735 clamd    CALL  kse_release(0xbee50bd0)
   1735 clamd    CALL  kse_wakeup(0x9e4678c)
   1735 clamd    RET   kse_wakeup 0
   1735 clamd    RET   kse_release 0

After ~10000 lines which show all like this, clamd actually
opens and scans something, then another ~10000 lines follow ...

I guess it's a bug in libpthread, but it really doesn't
work fine with this lib. Or is it bad programming in clamav ?

Any comments ?

Martin

Martin Blapp, <mb at imp.ch> <mbr at 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 at freebsd.org>
PGP Fingerprint: B434 53FC C87C FE7B 0A18 B84C 8686 EF22 D300 551E
------------------------------------------------------------------


More information about the freebsd-threads mailing list