Date: Tue, 9 Jul 2002 07:07:33 -0700 (PDT) From: Pete Carah <pete@ns.altadena.net> To: Dan Nelson <dnelson@allantgroup.com> Cc: questions@freebsd.org Subject: Re: Hang problem with spamass-milter... Message-ID: <200207091407.g69E7XlE022374@ns.altadena.net> In-Reply-To: <20020708200747.GA82041@dan.emsphone.com> from Dan Nelson at "Jul 8, 2002 03:07:47 pm"
next in thread | previous in thread | raw e-mail | index | archive | help
> In the last episode (Jul 08), Pete Carah said: > > I have spamass-milter compiled and running in a fresh 4.6-stable box > > (built last week). If two mail messages arrive "close enough" in > > time, spamc hangs hard (needs kill -9 to stop it) in pipe-read state > > with spamass-milter in pipe-read also. I have a suspicion about read > > acting non-blocking in the pipe case; looking through the > > pthread_read.c source, as long as EWOULDBLOCK or EAGAIN work right > > things shouldn't act like this. > > You sure this is the trigger, and not an email over 250k? An unpatched > spamass-milter will definitely hang on any email that spamc decides is > too big to process (250k default). There are patches at > http://savannah.gnu.org/projects/spamass-milt/ that fix this problem > and add some more functionality ( see patches 349, 351, 354, 381, 385 ). > Most of the patches require a CVS checkout, though, which is probably > why the port doesn't include them. I fixed the spamc invocation to "spamc -s5000000"... also it normally hangs on periodic/daily+periodic/security; these are not 250k in general. The hang is clearly from simultaneous submissions with both ends in piperd. However, I'll look at those patches. Note that I can make it hang with a 25k file and elm -s test1 pete <file >& /dev/null & ; elm -s test2 pete file >& /dev/null &. Given that it works in debian and not in freebsd points the finger at the pthread implementation, though (since the compiler and base c++ libs are the same). I've been looking through pthread_read.c and the attendant kernel pieces for pipes... Probably need to look at pthread_write too. > > > spamass-milter's configure does not make the right choices for freebsd; > > I presume the port fixes this (I did so myself, adding _THREAD_SAFE and > > -pthread). The C++ library may or may not be thread-safe? > > patch 349 fixes this OK. It isn't hard to fix anyhow... Other factors in the c++ library could be, though given what c++ is mostly used for, it had better be thread-safe. -- Pete > -- > Dan Nelson > dnelson@allantgroup.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200207091407.g69E7XlE022374>