http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5626

           Summary: "spamassassin" script needs a SIGPIPE handler
           Product: Spamassassin
           Version: SVN Trunk (Latest Devel Version)
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: minor
          Priority: P5
         Component: spamassassin
        AssignedTo: [email protected]
        ReportedBy: [EMAIL PROTECTED]


by email regarding bug 5557, Per Kristian Hove noted:

'Hi again. I've attached a backtrace (backtrace.txt) of spamassassin
when this bug [the failure to remove tmp files] occurs.

The backtrace is produced from (and the line numbers relative to)
spamassassin 3.2.3 patched with the attached patch (debug.diff).
Spamassassin was run with TMPDIR set to "./debug".

Installing a signal handler in bin/spamassassin that ignores SIGPIPE
hides/cures the bug.'


backtrace:

[3746] warn: spamassassin: caught SIGPIPE - dumping backtrace.
[3746] warn:  main::backtrace_handler('PIPE') called at
/local/spamassassin-3.2.3/bin/spamassassin line 495
[3746] warn:  eval {...} called at /local/spamassassin-3.2.3/bin/spamassassin
line 495
[3746] warn: 
main::wanted('h','debug/.spamassassin3746r4of60tmp',0,'ARRAY(0x8e5b88)','f')
called at
/local/spamassassin-3.2.3/lib/site_perl/5.8.0/Mail/SpamAssassin/ArchiveIterator.pm
line 346
[3746] warn: 
Mail::SpamAssassin::ArchiveIterator::_run_file('Mail::SpamAssassin::ArchiveIterator=HASH(0x9e8a24)','h','f','debug/.spamassassin3746r4of60tmp',0)
called at
/local/spamassassin-3.2.3/lib/site_perl/5.8.0/Mail/SpamAssassin/ArchiveIterator.pm
line 308
[3746] warn: 
Mail::SpamAssassin::ArchiveIterator::_run_message('Mail::SpamAssassin::ArchiveIterator=HASH(0x9e8a24)','\x{0}\x{0}\x{0}\x{0}hfdebug/.spamassassin3746r4of60tmp')
called at
/local/spamassassin-3.2.3/lib/site_perl/5.8.0/Mail/SpamAssassin/ArchiveIterator.pm
line 292
[3746] warn: 
Mail::SpamAssassin::ArchiveIterator::_run('Mail::SpamAssassin::ArchiveIterator=HASH(0x9e8a24)','ARRAY(0x9e8a3c)')
called at
/local/spamassassin-3.2.3/lib/site_perl/5.8.0/Mail/SpamAssassin/ArchiveIterator.pm
line 285
[3746] warn: 
Mail::SpamAssassin::ArchiveIterator::run('Mail::SpamAssassin::ArchiveIterator=HASH(0x9e8a24)',':detect:debug/.spamassassin3746r4of60tmp')
called at /local/spamassassin-3.2.3/bin/spamassassin line 374
[3746] warn:  eval {...} called at /local/spamassassin-3.2.3/bin/spamassassin
line 374

patch (debug.diff):

+++ bin/spamassassin    Thu Aug 23 15:59:56 2007
@@ -230,6 +230,13 @@
   exit($resphash{'EX_OK'});
 }
 
+sub backtrace_handler {
+  Carp::cluck("spamassassin: caught SIGPIPE - dumping backtrace.\n");
+}
+#$SIG{PIPE} = 'IGNORE';
+$SIG{PIPE} = \&backtrace_handler;
+
+
 # set debug areas, if any specified (only useful for command-line tools)
 if (defined $opt{'debug'}) {
   $opt{'debug'} ||= 'all';



my comments:

it appears that Per is therefore running the "spamassassin" command-line script,
and that script is failing to call ->finish() on a SIGPIPE.  it should catch
SIGPIPEs and clear up appropriately.



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

Reply via email to