From owner-freebsd-ports-bugs@FreeBSD.ORG Mon Nov 6 15:22:19 2006 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A3E3A16A4ED for ; Mon, 6 Nov 2006 15:22:19 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id C1AE343E67 for ; Mon, 6 Nov 2006 15:20:30 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id kA6FKSQj041552 for ; Mon, 6 Nov 2006 15:20:28 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id kA6FKScU041551; Mon, 6 Nov 2006 15:20:28 GMT (envelope-from gnats) Resent-Date: Mon, 6 Nov 2006 15:20:28 GMT Resent-Message-Id: <200611061520.kA6FKScU041551@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Larry Rosenman Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6E93516A4E9 for ; Mon, 6 Nov 2006 15:18:31 +0000 (UTC) (envelope-from ler@lerctr.org) Received: from thebighonker.lerctr.org (thebighonker.lerctr.org [192.147.25.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id CC17043DED for ; Mon, 6 Nov 2006 15:15:41 +0000 (GMT) (envelope-from ler@lerctr.org) Received: from ler by thebighonker.lerctr.org with local (Exim 4.63 (FreeBSD)) (envelope-from ) id 1Gh6CK-0005HX-Ua for FreeBSD-gnats-submit@freebsd.org; Mon, 06 Nov 2006 09:15:40 -0600 Message-Id: Date: Mon, 06 Nov 2006 09:15:40 -0600 From: Larry Rosenman To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/105213: mail/p5-Mail-SpamAssassin: Dies occasionally: prefork: ordered... X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Larry Rosenman List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Nov 2006 15:22:19 -0000 >Number: 105213 >Category: ports >Synopsis: mail/p5-Mail-SpamAssassin: Dies occasionally: prefork: ordered... >Confidential: no >Severity: non-critical >Priority: high >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Mon Nov 06 15:20:27 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Larry Rosenman >Release: FreeBSD 6.2-PRERELEASE amd64 >Organization: LERCTR Consulting >Environment: System: FreeBSD thebighonker.lerctr.org 6.2-PRERELEASE FreeBSD 6.2-PRERELEASE #80: Sat Nov 4 20:57:14 CST 2006 root@thebighonker.lerctr.org:/usr/obj/usr/src/sys/THEBIGHONKER amd64 >Description: spamd will occasionally die with "prefork: ordered child to accept, but child reported state '1'. The SA guys have a bug opened (4594), and it's been going on for a while. They have a patch, which seems to fix it at: http://issues.apache.org/SpamAssassin/attachment.cgi?id=3713&action=view (I've added the patch below, but the link is better if the MTA's mangle it). Can we get this patch into the port? >How-To-Repeat: It's very spotty. I can go weeks without seeing it, then see tons of it in a short time. >Fix: Index: lib/Mail/SpamAssassin/SpamdForkScaling.pm =================================================================== --- lib/Mail/SpamAssassin/SpamdForkScaling.pm (revision 462907) +++ lib/Mail/SpamAssassin/SpamdForkScaling.pm (working copy) @@ -426,7 +426,13 @@ dbg("prefork: ordered $kid to accept"); # now wait for it to say it's done that - return $self->wait_for_child_to_accept($sock); + my $ret = $self->wait_for_child_to_accept($kid, $sock); + if ($ret) { + return $ret; + } else { + # retry with another child + return $self->order_idle_child_to_accept(); + } } else { @@ -436,10 +442,11 @@ } sub wait_for_child_to_accept { - my ($self, $sock) = @_; + my ($self, $kid, $sock) = @_; while (1) { my $state = $self->read_one_message_from_child_socket($sock); + if ($state == PFSTATE_BUSY) { return 1; # 1 == success } @@ -447,7 +454,12 @@ return undef; } else { - die "prefork: ordered child to accept, but child reported state '$state'"; + warn "prefork: ordered child $kid to accept, but they reported state '$state', killing rogue"; + $self->child_error_kill($kid, $sock); + $self->adapt_num_children(); + sleep 1; + + return undef; } } } @@ -479,6 +491,8 @@ sub update_child_status_busy { my ($self) = @_; + +# if (rand 4 < 1) { $self->report_backchannel_socket("I".pack("N",$self->{pid})."\n");return; warn "TEST for bug 4594"; die; } # "B b1 b2 b3 b4 \n " $self->report_backchannel_socket("B".pack("N",$self->{pid})."\n"); } >Release-Note: >Audit-Trail: >Unformatted: