Bug 5019 - Spamd crashes
Summary: Spamd crashes
Status: RESOLVED WORKSFORME
Alias: None
Product: Spamassassin
Classification: Unclassified
Component: spamc/spamd (show other bugs)
Version: 3.1.4
Hardware: Other FreeBSD
: P5 major
Target Milestone: Undefined
Assignee: SpamAssassin Developer Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-01 14:40 UTC by Luca Bertoncello
Modified: 2018-08-28 04:49 UTC (History)
1 user (show)



Attachment Type Modified Status Actions Submitter/CLA Status

Note You need to log in before you can comment on or make changes to this bug.
Description Luca Bertoncello 2006-08-01 14:40:54 UTC
Offen spamd crashes without write anything in log.
These crashes seem to be random, and I can't understand WHY it crashes.

OS is FreeBSD 6.1 with PERL 5.8.8.

I had the problem with spamd 3.1.3, too.
Comment 1 Justin Mason 2006-08-01 14:58:08 UTC
I think your best bet will be to use "truss", "strace" or "ktrace" to monitor
the process as it crashes -- normally, spamd will not exit without logging something
to syslog, so this is a serious error condition.
Comment 2 Luca Bertoncello 2006-08-02 12:03:40 UTC
Unfortunately it is not possibile!
SpamAssassin runs some days before crashing.
And it scans several thounsend E-Mail.

Is it possible to run spamd with some debug options that help to find the bug?
Comment 3 Justin Mason 2006-08-02 12:16:50 UTC
"-D" will produce lots of debugging output -- it may help.
Comment 4 Luca Bertoncello 2006-08-04 12:40:58 UTC
I tryed with -D...
Today crashed spamd again, and I can see in /var/log/messages:

Aug  4 12:47:01 scanner01 kernel: pid 56539 (perl), uid 0: exited on signal 11 
(core dumped)

At the same time, for this process, in /var/log/maillog I see:

Aug  4 12:47:01 scanner01 spamd[56539]: spamd: handled cleanup of child pid 
4034 due to SIGCHLD

And now I have a perl.core (27MB!!). What can I do now to search the bug?
Comment 5 Justin Mason 2006-08-04 12:47:41 UTC
there should be lots of debugging output.  post the previous 200 lines until the
'Aug  4 12:47:01 scanner01 spamd[56539]: spamd: handled cleanup of child pid 
4034 due to SIGCHLD' line.
Comment 6 Luca Bertoncello 2006-08-04 12:51:52 UTC
Unfortunately there is just these lines in /var/log/maillog:

Aug  4 12:46:55 scanner01 spamd[56539]: prefork: child states: IBBIBB
Aug  4 12:46:55 scanner01 spamd[56539]: prefork: child states: IBBIBB
Aug  4 12:46:56 scanner01 spamd[56539]: prefork: child states: BBIBBB
Aug  4 12:46:56 scanner01 spamd[56539]: prefork: child states: IBBBBB
Aug  4 12:46:56 scanner01 spamd[56539]: prefork: child states: IBIBBB
Aug  4 12:46:57 scanner01 spamd[56539]: prefork: child states: IBBBBB
Aug  4 12:46:57 scanner01 spamd[56539]: prefork: child states: IBIBBB
Aug  4 12:46:58 scanner01 spamd[56539]: prefork: child states: IBIBBB
Aug  4 12:46:58 scanner01 spamd[56539]: prefork: child states: IBIBBB
Aug  4 12:46:59 scanner01 spamd[56539]: prefork: child states: BBBBBB
Aug  4 12:46:59 scanner01 spamd[56539]: spamd: server successfully spawned 
child process, pid 4251
Aug  4 12:46:59 scanner01 spamd[56539]: prefork: child states: BBBBBBB
Aug  4 12:46:59 scanner01 spamd[56539]: spamd: server successfully spawned 
child process, pid 4255
Aug  4 12:46:59 scanner01 spamd[56539]: prefork: child states: BBBBBIBB
Aug  4 12:47:00 scanner01 spamd[56539]: prefork: child states: BBBBBBBB
Aug  4 12:47:00 scanner01 spamd[56539]: prefork: server reached --max-children 
setting, consider raising it
Aug  4 12:47:00 scanner01 spamd[56539]: prefork: child states: BBBBBBBB
Aug  4 12:47:00 scanner01 spamd[56539]: prefork: server reached --max-children 
setting, consider raising it
Aug  4 12:47:00 scanner01 spamd[56539]: spamd: handled cleanup of child pid 
3774 due to SIGCHLD
Aug  4 12:47:00 scanner01 spamd[56539]: prefork: child states: BBBBBBB
Aug  4 12:47:00 scanner01 spamd[56539]: spamd: server successfully spawned 
child process, pid 4267
Aug  4 12:47:00 scanner01 spamd[56539]: prefork: child states: IBBBBIBB
Aug  4 12:47:01 scanner01 spamd[56539]: spamd: handled cleanup of child pid 
4034 due to SIGCHLD
Aug  4 12:47:01 scanner01 spamd[56539]: prefork: child states: BBBBBBB

I think nothing useful...
I bzipped the core file, now is just 6.3MB. Have I to upload it here?
Comment 7 Justin Mason 2006-08-04 12:59:23 UTC
if those are the lines, then the -D did not work for some reason; there should
be a lot more debugging info.

unfortunately, a core will not be much use to upload.  However, you can try this:

  gdb /usr/bin/perl core
  bt


that will produce a backtrace of the perl interpreter -- it may be helpful.
Comment 8 Luca Bertoncello 2006-08-04 13:02:31 UTC
OK! This is what I can see:

scanner01:/ # gdb /usr/bin/perl perl.core
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-marcel-freebsd"...(no debugging symbols 
found)...
Core was generated by `perl'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/local/lib/perl5/5.8.8/mach/CORE/libperl.so...(no 
debugging symbols found)...done.
Loaded symbols for /usr/local/lib/perl5/5.8.8/mach/CORE/libperl.so
Reading symbols from /lib/libm.so.4...(no debugging symbols found)...done.
Loaded symbols for /lib/libm.so.4
Reading symbols from /lib/libcrypt.so.3...(no debugging symbols found)...done.
Loaded symbols for /lib/libcrypt.so.3
Reading symbols from /lib/libutil.so.5...(no debugging symbols found)...done.
Loaded symbols for /lib/libutil.so.5
Reading symbols from /lib/libc.so.6...(no debugging symbols found)...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /usr/local/lib/perl5/5.8.8/mach/auto/IO/IO.so...(no 
debugging symbols found)...done.
Loaded symbols for /usr/local/lib/perl5/5.8.8/mach/auto/IO/IO.so
Reading symbols from /usr/local/lib/perl5/5.8.8/mach/auto/Socket/
Socket.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/perl5/5.8.8/mach/auto/Socket/Socket.so
Reading symbols from /usr/local/lib/perl5/5.8.8/mach/auto/Sys/Hostname/
Hostname.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/perl5/5.8.8/mach/auto/Sys/Hostname/Hostname.so
Reading symbols from /usr/local/lib/perl5/5.8.8/mach/auto/Fcntl/Fcntl.so...(no 
debugging symbols found)...done.
Loaded symbols for /usr/local/lib/perl5/5.8.8/mach/auto/Fcntl/Fcntl.so
Reading symbols from /usr/local/lib/perl5/5.8.8/mach/auto/POSIX/POSIX.so...(no 
debugging symbols found)...done.
Loaded symbols for /usr/local/lib/perl5/5.8.8/mach/auto/POSIX/POSIX.so
Reading symbols from /usr/local/lib/perl5/site_perl/5.8.8/mach/auto/MIME/Base64/
Base64.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/perl5/site_perl/5.8.8/mach/auto/MIME/Base64/
Base64.so
Reading symbols from /usr/local/lib/perl5/site_perl/5.8.8/mach/auto/Net/DNS/
DNS.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/perl5/site_perl/5.8.8/mach/auto/Net/DNS/DNS.so
Reading symbols from /usr/local/lib/perl5/site_perl/5.8.8/mach/auto/Digest/SHA1/
SHA1.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/perl5/site_perl/5.8.8/mach/auto/Digest/SHA1/
SHA1.so
Reading symbols from /usr/local/lib/perl5/5.8.8/mach/auto/DB_File/
DB_File.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/perl5/5.8.8/mach/auto/DB_File/DB_File.so
Reading symbols from /usr/local/lib/perl5/site_perl/5.8.8/mach/auto/HTML/Parser/
Parser.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/perl5/site_perl/5.8.8/mach/auto/HTML/Parser/
Parser.so
Reading symbols from /usr/local/lib/perl5/site_perl/5.8.8/mach/auto/Cwd/
Cwd.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/perl5/site_perl/5.8.8/mach/auto/Cwd/Cwd.so
Reading symbols from /usr/local/lib/perl5/5.8.8/mach/auto/Time/HiRes/
HiRes.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/perl5/5.8.8/mach/auto/Time/HiRes/HiRes.so
Reading symbols from /usr/local/lib/perl5/5.8.8/mach/auto/Sys/Syslog/
Syslog.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/perl5/5.8.8/mach/auto/Sys/Syslog/Syslog.so
Reading symbols from /usr/local/lib/perl5/site_perl/5.8.8/mach/auto/List/Util/
Util.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/perl5/site_perl/5.8.8/mach/auto/List/Util/
Util.so
Reading symbols from /usr/local/lib/perl5/site_perl/5.8.8/mach/auto/DBI/
DBI.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/perl5/site_perl/5.8.8/mach/auto/DBI/DBI.so
Reading symbols from /libexec/ld-elf.so.1...(no debugging symbols found)...done.
Loaded symbols for /libexec/ld-elf.so.1
#0  0x280f2024 in S_del_xiv () from /usr/local/lib/perl5/5.8.8/mach/CORE/
libperl.so
(gdb) bt
#0  0x280f2024 in S_del_xiv () from /usr/local/lib/perl5/5.8.8/mach/CORE/
libperl.so
#1  0x280f2f37 in Perl_sv_clear () from /usr/local/lib/perl5/5.8.8/mach/CORE/
libperl.so
#2  0x280f3211 in Perl_sv_free () from /usr/local/lib/perl5/5.8.8/mach/CORE/
libperl.so
#3  0x280e47a5 in Perl_hv_free_ent () from /usr/local/lib/perl5/5.8.8/mach/CORE/
libperl.so
#4  0x280e4ce8 in S_hfreeentries () from /usr/local/lib/perl5/5.8.8/mach/CORE/
libperl.so
#5  0x280e6342 in Perl_hv_undef () from /usr/local/lib/perl5/5.8.8/mach/CORE/
libperl.so
#6  0x280f2eb5 in Perl_sv_clear () from /usr/local/lib/perl5/5.8.8/mach/CORE/
libperl.so
#7  0x280f3211 in Perl_sv_free () from /usr/local/lib/perl5/5.8.8/mach/CORE/
libperl.so
#8  0x2809eccd in Perl_gp_free () from /usr/local/lib/perl5/5.8.8/mach/CORE/
libperl.so
#9  0x280f2e86 in Perl_sv_clear () from /usr/local/lib/perl5/5.8.8/mach/CORE/
libperl.so
#10 0x280f3211 in Perl_sv_free () from /usr/local/lib/perl5/5.8.8/mach/CORE/
libperl.so
#11 0x281102d4 in Perl_free_tmps () from /usr/local/lib/perl5/5.8.8/mach/CORE/
libperl.so
#12 0x280e92bd in Perl_pp_nextstate () from /usr/local/lib/perl5/5.8.8/mach/
CORE/libperl.so
#13 0x280e919d in Perl_runops_standard () from /usr/local/lib/perl5/5.8.8/mach/
CORE/libperl.so
#14 0x28098b82 in perl_run () from /usr/local/lib/perl5/5.8.8/mach/CORE/
libperl.so
#15 0x08048fe2 in main ()

Hope to help...
Comment 9 Kevin A. McGrail 2018-08-28 04:49:21 UTC
Likely fixed over many years of spamd releases