ports/105213: mail/p5-Mail-SpamAssassin: Dies occasionally: prefork: ordered...
Larry Rosenman
ler at lerctr.org
Mon Nov 6 15:22:19 UTC 2006
>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 at 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:
More information about the freebsd-ports-bugs
mailing list