From owner-freebsd-questions Tue Jul 9 7: 7:48 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3E19B37B406 for ; Tue, 9 Jul 2002 07:07:43 -0700 (PDT) Received: from ns.altadena.net (ns.altadena.net [206.126.144.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1121043E52 for ; Tue, 9 Jul 2002 07:07:42 -0700 (PDT) (envelope-from pete@ns.altadena.net) Received: from ns.altadena.net (localhost [127.0.0.1]) by ns.altadena.net (8.12.3/8.12.3) with ESMTP id g69E7Y48022381; Tue, 9 Jul 2002 07:07:34 -0700 (PDT) (envelope-from pete@ns.altadena.net) Received: (from pete@localhost) by ns.altadena.net (8.12.3/8.12.3/Submit) id g69E7XlE022374; Tue, 9 Jul 2002 07:07:33 -0700 (PDT) (envelope-from pete) From: Pete Carah Message-Id: <200207091407.g69E7XlE022374@ns.altadena.net> Subject: Re: Hang problem with spamass-milter... In-Reply-To: <20020708200747.GA82041@dan.emsphone.com> from Dan Nelson at "Jul 8, 2002 03:07:47 pm" To: Dan Nelson Date: Tue, 9 Jul 2002 07:07:33 -0700 (PDT) Cc: questions@freebsd.org X-Mailer: ELM [version 2.4ME+ PL68 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=iso8859-1 Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > 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 & /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