spamass-milt-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: spass-milter core dump, Dan Nelson


From: Dan Nelson
Subject: Re: spass-milter core dump, Dan Nelson
Date: Wed, 28 Mar 2007 10:09:53 -0500
User-agent: Mutt/1.5.14 (2007-02-12)

In the last episode (Mar 28), James Lees Vodanovich said:
> Thank you for the pointers.
> I got the following error.
> Error detected by libpthread: Invalid mutex.
> Detected by file 
> "/home/builds/ab/netbsd-3-1-RELEASE/src/lib/libpthread/pthread_mutex.c", 
> line 334, function "pthread_mutex_unlock".
> See pthread(3) for information.
> 
> After Some digging around, I found this occurs when performing an
> invalid function, such as unlocking a previously unlocked lock.
> 
> I cant see any reference to these functions in the code, I even took
> the step of deleting the FreeBSD lines from the code prior to
> compilation But still I find them in the Binary.

Yeah, that's because sendmail's milter API uses threads internally. I
think each incoming message gets its own thread, which then calls the
mlfi_* functions as data arrives from the other end.
 
> nm work/spamass-milter-0.3.1/spamass-milter | grep thread
> 08050a40 t _Z18__gthread_active_pv
> 080509c4 t _Z20__gthread_mutex_lockP18__pthread_mutex_st
> 080509e8 t _Z22__gthread_mutex_unlockP18__pthread_mutex_st
> 08056b0c r _ZZ18__gthread_active_pvE20__gthread_active_ptr
>         U pthread_create
>         U pthread_detach
> 
> built with the following
> c++ -DHAVE_CONFIG_H -I. -I. -I. -I/usr/include  -O2 -I/usr/include -Wall 
> -fno-default-inline -fno-inline  -pthread -c -o spamass-milter.o 
> spamass-milter.cpp

Try replacing the -O2 with -O0; you might get a better stack trace out
of the coredump that way.

> For the meantime I have set PTHREAD_DIAGASSERT=A
> which ignores the error, but this doesn't make me feel too comfortable.

It's got to either be a bug in libmilter, or a bug in spamass-milter
that happens to trash one of libmilter's mutexes and nothing else. 
Neither one sounds very likely.  sendmail 8.13.5 is a little old but I
can't see any significant libmilter changes between it and 8.13.8.

-- 
        Dan Nelson
        address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]