Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Apr 2007 14:20:27 -0700
From:      Jason Evans <jasone@freebsd.org>
To:        Anton Yuzhaninov <citrin@citrin.ru>
Cc:        freebsd-current@freebsd.org
Subject:   Re: clamd memory corruption (may be jemalloc related)
Message-ID:  <4627DD1B.2080806@freebsd.org>
In-Reply-To: <313993633.20070419232238@citrin.ru>
References:  <313993633.20070419232238@citrin.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
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
> 
> And sometimes clamd segfaults.
> 
> This Warnings issued randomly and it looks like race condition.
> 
> This problem occurred only when running two or more clamdscan
> processes in parallel. With one process no warnings on same test
   ^^^^^^^^^
> messages.

Processes, not threads?  If so, there's really no way malloc can be to 
blame for a race condition.

The only race condition issue for malloc that I know of has to do with 
rtld not replacing the libc spinlock stubs with threaded 
implementations.  However, I am pretty sure that this problem only shows 
up when versioned symbols are enabled.

malloc's locking methodology is pretty straightforward, which makes me 
reasonably confident about its correctness.  If your debugging efforts 
point you at malloc, you should try reverting to phkmalloc to see if 
that makes the problem go away.

Jason



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4627DD1B.2080806>