SA Bugzilla – Bug 5019
Spamd crashes
Last modified: 2018-08-28 04:49:21 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.
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.
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?
"-D" will produce lots of debugging output -- it may help.
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?
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.
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?
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.
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...
Likely fixed over many years of spamd releases