You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by "Moss, Jeff" <jm...@huffmancorp.com> on 2004/04/07 19:54:42 UTC

Perl bug in close() statement

I, and a few other people, have a problem with SA crashing on calls to
DCC and/or Pyzor.  I've finally narrowed the problem down to the close(DCC)
and close(PYZOR) statements in Dns.pm.

The DCC problem can be worked around by switching to dccifd, which
is faster anyway.

There are two bugs in Perl5 that seem to be causing this.  They are Perl
bug #21724 and #22228.  Both of these cause Perl to crash on close()
statements.

The following lines of perl copied out of Dns.pm yields
died closing the pipe 256

----------------------------------------------------------------------------
-----------
#! /usr/bin/perl -w 
use strict;

my $path = "/usr/bin/pyzor";
my $opts = "";
my $tmpf = "/tmp/sa.4336.sO1fmw";

print "open the pipe\n";
my $pid = open(PYZOR, join(' ', $path, $opts, "check", "< '$tmpf'", "2>&1",
'|')) || die "$!\n";

print "get the pipe response\n";
my $response = <PYZOR>;
print "$response\n";

print "close the pipe\n";
close(PYZOR) or die "died closing the pipe $?\n";
print "after closing the pipe";
----------------------------------------------------------------------------
-----------

There is no fix, but I feel your pain.
 Regards
 Jeff Moss