You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by bu...@bugzilla.spamassassin.org on 2007/08/10 21:34:50 UTC
[Bug 5591] New: make test fails at spamd_hup test
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5591
Summary: make test fails at spamd_hup test
Product: Spamassassin
Version: 3.2.3
Platform: Sun
OS/Version: Solaris
Status: NEW
Severity: normal
Priority: P5
Component: Building & Packaging
AssignedTo: dev@spamassassin.apache.org
ReportedBy: rosenbaumlm@ornl.gov
Solaris 9, SA 3.2.3, Perl 5.8.8
"make test" gives the following error:
# t/spamd_hup.t line 40 is: ok (-e $pid_file) or warn "$pid_file does not
exist post restart";
log/spamd.pid does not exist post restart at t/spamd_hup.t line 40.
Could not open pid file log/spamd.pid: No such file or directory
Exiting subroutine via next at t/SATest.pm line 844.
Could not open pid file log/spamd.pid: No such file or directory
Exiting subroutine via next at t/SATest.pm line 844.
...
However, if I test manually with
prove -v t/spamd_hup.t
then the test passes. If I check the spamd.err.1 file, the successful test
looks like this:
...
[5346] warn: spamd: restarting using '/usr/local/bin/perl -T -
w ../spamd/spamd.raw -D -x -s stderr -C log
/test_rules_copy --siteconfigpath log/localrules.tmp -p 38110 -A 127.0.0.1 -L -
r log/spamd.pid -s log/d.spamd_hup/spamd.err.1.timestamped'
syswrite() on closed filehandle STDLOG
at ../blib/lib/Mail/SpamAssassin/Logger/File.pm line 81.
[5346] dbg: logger: adding facilities: all
...
where the case that failed looks like this:
...
[23141] warn: spamd: restarting using '../spamd/spamd.raw -D -x -s stderr -C
log/test_rules_copy --siteconfigpath log/localrules.tmp -p 55905 -A 127.0.0.1 -
L -r log/spamd.pid -s log/d.spamd_hup/spamd.err.1.timestamped'
syswrite() on closed filehandle STDLOG
at ../blib/lib/Mail/SpamAssassin/Logger/File.pm line 81.
"-T" is on the #! line, it must also be used on the command line
at ../spamd/spamd.raw line 1.
So what happened to the "/usr/local/bin/perl -T -w" ??
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 5591] make test fails at spamd_hup test
Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5591
------- Additional Comments From rosenbaumlm@ornl.gov 2008-01-15 12:21 -------
This bug still exists in v3.2.4. I have been able to get more information on
why it occurs on some of our systems but not on others.
The Perl executable is installed in /usr/local/bin with a symlink
from /usr/bin:
lrwxrwxrwx 1 root 19 Jul 18 2005 /usr/bin/perl -
> /usr/local/bin/perl
-rwxr-xr-x 2 root 1141560 May 10 2007 /usr/local/bin/perl
If the PATH has /usr/local/bin before /usr/bin, then the spamd_hup test runs
without error.
If the PATH has /usr/bin before /usr/local/bin, then the spamd_hup test fails
as shown above.
I think that the problem is in this section of spamd:
my $perl = Mail::SpamAssassin::Util::untaint_var($^X);
my @execs = ( $perl, "-T", "-w", $ORIG_ARG0, @ORIG_ARGV );
if ($perl eq $perl_from_hashbang_line) {
# we're using the same perl as the script uses on the #! line;
# we can safely just exec the script
@execs = ( $ORIG_ARG0, @ORIG_ARGV );
}
warn "spamd: restarting using '" . join (' ', @execs) . "'\n";
exec @execs;
When /usr/bin comes first in the PATH, the block controlled by the "if" is
executed. Since the "-T" switch is NOT saved in @ORIG_ARGV, the exec goes
boom. I don't know the best way to fix the problem, but it seems like leaving
out the "if" block will fix it.
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.