Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: dspam problem



I have now a core file so what to do next?

I added some printfs and this crashes the daemon on the Nth call of _hash_drv_seek (N is random, small number) because hash_rec_max becomes zero and at the same time "header" changes to something else than it was previously.


  fpos = sizeof(struct _hash_drv_header) +
    ((hashcode % header->hash_rec_max) * sizeof(struct _hash_drv_spam_record));

Here're some additional trace:

10088: [04/30/2009 14:48:36] hash_drv.c 1090
10088: [04/30/2009 14:48:36] XXX header=0xbae27000
10088: [04/30/2009 14:48:36] XXX header->hash_rec_max=98317
10088: [04/30/2009 14:48:36] hash_drv.c 1097
10088: [04/30/2009 14:48:36] hash_drv.c 1099
10088: [04/30/2009 14:48:36] hash_drv.c 1090
10088: [04/30/2009 14:48:36] XXX header=0xbae27000
10088: [04/30/2009 14:48:36] XXX header->hash_rec_max=98317
10088: [04/30/2009 14:48:36] hash_drv.c 1097
10088: [04/30/2009 14:48:36] hash_drv.c 1099
10088: [04/30/2009 14:48:36] hash_drv.c 1090
10088: [04/30/2009 14:48:36] XXX header=0xbae27000
10088: [04/30/2009 14:48:36] XXX header->hash_rec_max=98317
10088: [04/30/2009 14:48:36] hash_drv.c 1097
10088: [04/30/2009 14:48:36] hash_drv.c 1099
10088: [04/30/2009 14:48:36] hash_drv.c 1090
10088: [04/30/2009 14:48:36] XXX header=0xbae27000
10088: [04/30/2009 14:48:36] XXX header->hash_rec_max=98317
10088: [04/30/2009 14:48:36] hash_drv.c 1097
10088: [04/30/2009 14:48:36] hash_drv.c 1099
10088: [04/30/2009 14:48:36] hash_drv.c 1090
10088: [04/30/2009 14:48:36] XXX header=0xbae27000
10088: [04/30/2009 14:48:36] XXX header->hash_rec_max=98317
10088: [04/30/2009 14:48:36] hash_drv.c 1097
10088: [04/30/2009 14:48:36] hash_drv.c 1099
10088: [04/30/2009 14:48:36] hash_drv.c 1090
10088: [04/30/2009 14:48:36] XXX header=0xbafa70f8
10088: [04/30/2009 14:48:36] XXX header->hash_rec_max=0



Maybe I need to try some other storage backend since I have no idea what this hash code does...




ROOT p141:/usr/pkgsrc/mail/dspam/work/dspam-3.8.0/src> uname -srm
NetBSD 5.0 i386

ROOT p141:/usr/pkgsrc/mail/dspam/work/dspam-3.8.0/src> ./dspam --daemon
515: [04/30/2009 14:33:02] Daemon process starting
Floating point exception (core dumped)
ROOT p141:/usr/pkgsrc/mail/dspam/work/dspam-3.8.0/src> gdb dspam dspam.core
GNU gdb 6.5
Copyright (C) 2006 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--netbsdelf"...
Reading symbols from /usr/lib/libm.so.0...done.
Loaded symbols for /usr/lib/libm.so.0
Reading symbols from /usr/lib/libpthread.so.0...done.
Loaded symbols for /usr/lib/libpthread.so.0
Reading symbols from /usr/lib/libc.so.12...done.
Loaded symbols for /usr/lib/libc.so.12
Reading symbols from /usr/libexec/ld.elf_so...done.
Loaded symbols for /usr/libexec/ld.elf_so
Core was generated by `dspam'.
Program terminated with signal 8, Arithmetic exception.
#0  0x08062c23 in __umoddi3 ()
(gdb) bt
#0  0x08062c23 in __umoddi3 ()
#1  0x0806093e in _hash_drv_seek (map=0xbb511000, offset=1573112,
    hashcode=15509873681730724522, flags=0) at hash_drv.c:1090
#2  0x08060a3d in _hash_drv_get_spamrecord (map=0xbb511000, wrec=0xbb3fdd88)
    at hash_drv.c:1182
#3  0x08060abc in _ds_get_spamrecord (CTX=0xbb51e200,
    token=15509873680409690113, stat=0xbb3fddc4) at hash_drv.c:691
#4  0x08061481 in _ds_getall_spamrecords (CTX=0xbb51e200, diction=0xbb52c5e0)
    at hash_drv.c:612
#5  0x08059759 in _ds_operate (CTX=0xbb51e200,
headers=0xbb557000 "Received: from xxxxx.org (xxxxx.org [xxx.xxx.xxx.xxx])", body=0xbb508000 "On") at libdspam.c:879
#6  0x0805a326 in dspam_process (CTX=0xbb51e200,
message=0xbb529000 "Received: from xxxxx.org (xxxxx.org [xxx.xxx.xxx.xxx])\n\tby xxx.xxxxx.org (Postfix) with ESMTP id 8E5918226A\n\tfor <yyy%xxx.xxxxx.org@localhost>; Thu, 30 Apr 2009 14:21:32 +0300 (EEST)\nReceived: by k"...)
    at libdspam.c:578
#7  0x0804fbb1 in process_message (ATX=0xbb527000, message=0xbb522af0,
    username=0xbb52c2c0 "yyy%xxx.xxxxx.org@localhost", result_string=0xbb3ff5b4)
    at dspam.c:514
#8  0x08050b00 in process_users (ATX=0xbb527000, message=0xbb522ad0)
    at dspam.c:1793
#9  0x0805378b in process_connection (ptr=0xbb50f0a0) at daemon.c:721
#10 0xbb7cc9df in pthread_create () from /usr/lib/libpthread.so.0
#11 0xbb718420 in swapcontext () from /usr/lib/libc.so.12



Home | Main Index | Thread Index | Old Index