clamd memory corruption (may be jemalloc related)
citrin at citrin.ru
Wed Apr 25 13:07:01 UTC 2007
You wrote on Friday, April 20, 2007, 1:20:27 AM:
JE> Anton Yuzhaninov wrote:
>> I try to test clamav 0.90.2 on current and got strange errors:
>> LibClamAV Warning: Multipart/alternative MIME message contains no boundary header
>> LibClamAV Warning: Multipart/ZZZZZZZZZZZZггггюЕ MIME message contains no boundary header
>> LibClamAV Warning: Multipart/related MIME message contains no boundary header
JE> The only race condition issue for malloc that I know of has to do with
JE> rtld not replacing the libc spinlock stubs with threaded
JE> implementations. However, I am pretty sure that this problem only shows
JE> up when versioned symbols are enabled.
JE> malloc's locking methodology is pretty straightforward, which makes me
JE> reasonably confident about its correctness. If your debugging efforts
JE> point you at malloc, you should try reverting to phkmalloc to see if
JE> that makes the problem go away.
As I wrote bug was in clamav...
Big thanks for new malloc - it work very fast and scales well with SMP.
For test was used system with 2 CPU x 4 cores.
clamd scan time with jemalloc (under current) - 5.6 seconds.
Same hardware, but with 6.2 stable - 274.8 seconds
(and with 8 cores it several times slower than with only one core).
More information about the freebsd-current