Bug Tracker item #3039020, was opened at 2010-08-03 23:25 Message generated for change (Comment added) made by sbajic You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1126467&aid=3039020&group_id=250683
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: daemon Group: v3.9.1 Status: Open Resolution: None Priority: 9 Private: No Submitted By: Tom Hendrikx (whyscream) Assigned to: Stevan Bajic (sbajic) Summary: *** glibc detected *** dspam_clean: corrupted double-linked Initial Comment: After upgrading from 3.9.0 to 3.9.1-rc1, dspam_clean does no longer work. When running, it gives folowwing error output: dspam_clean *** glibc detected *** dspam_clean: corrupted double-linked list: 0xa7853f98 *** ======= Backtrace: ========= /lib/libc.so.6(+0x6c754)[0xa7643754] /lib/libc.so.6(+0x6e22b)[0xa764522b] /lib/libc.so.6(cfree+0x6d)[0xa7647fad] /usr/lib/postgresql-8.4/lib/libpq.so.5(PQclear+0x112)[0xa75508a2] /usr/lib/dspam/libpgsql_drv.so(_pgsql_drv_set_spamtotals+0xa46)[0xa756fb86] /usr/lib/dspam/libpgsql_drv.so(_ds_shutdown_storage+0xe8)[0xa756fe08] /usr/lib/libdspam.so.7(_ds_shutdown_storage+0x38)[0xa774e438] /usr/lib/libdspam.so.7(dspam_detach+0x51)[0xa7743261] /usr/lib/libdspam.so.7(dspam_destroy+0x28)[0xa7743308] dspam_clean(main+0x914)[0xa7779774] /lib/libc.so.6(__libc_start_main+0xe5)[0xa75edbe5] dspam_clean(+0x17d1)[0xa77787d1] ======= Memory map: ======== a7200000-a7221000 rw-p a7200000 00:00 0 a7221000-a7300000 ---p a7221000 00:00 0 a7342000-a734e000 r-xp 00000000 fe:09 174435 /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/libgcc_s.so.1 a734e000-a734f000 r--p 0000b000 fe:09 174435 /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/libgcc_s.so.1 a734f000-a7350000 rw-p 0000c000 fe:09 174435 /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/libgcc_s.so.1 a7350000-a7361000 r-xp 00000000 fe:09 135721 /lib/libresolv-2.11.2.so a7361000-a7362000 r--p 00010000 fe:09 135721 /lib/libresolv-2.11.2.so a7362000-a7363000 rw-p 00011000 fe:09 135721 /lib/libresolv-2.11.2.so a7363000-a7365000 rw-p a7363000 00:00 0 a7365000-a736a000 r-xp 00000000 fe:09 135723 /lib/libnss_dns-2.11.2.so a736a000-a736b000 r--p 00004000 fe:09 135723 /lib/libnss_dns-2.11.2.so a736b000-a736c000 rw-p 00005000 fe:09 135723 /lib/libnss_dns-2.11.2.so a736c000-a737e000 r-xp 00000000 fe:09 110785 /lib/libz.so.1.2.3 a737e000-a737f000 r--p 00011000 fe:09 110785 /lib/libz.so.1.2.3 a737f000-a7380000 rw-p 00012000 fe:09 110785 /lib/libz.so.1.2.3 a7380000-a7389000 r-xp 00000000 fe:09 135727 /lib/libcrypt-2.11.2.so a7389000-a738a000 r--p 00008000 fe:09 135727 /lib/libcrypt-2.11.2.so a738a000-a738b000 rw-p 00009000 fe:09 135727 /lib/libcrypt-2.11.2.so a738b000-a73b2000 rw-p a738b000 00:00 0 a73b2000-a74e4000 r-xp 00000000 fe:09 204816 /usr/lib/libcrypto.so.0.9.8 a74e4000-a74ec000 r--p 00132000 fe:09 204816 /usr/lib/libcrypto.so.0.9.8 a74ec000-a74fb000 rw-p 0013a000 fe:09 204816 /usr/lib/libcrypto.so.0.9.8 a74fb000-a74fe000 rw-p a74fb000 00:00 0 a74fe000-a7543000 r-xp 00000000 fe:09 204812 /usr/lib/libssl.so.0.9.8 a7543000-a7544000 r--p 00045000 fe:09 204812 /usr/lib/libssl.so.0.9.8 a7544000-a7547000 rw-p 00046000 fe:09 204812 /usr/lib/libssl.so.0.9.8 a7547000-a7564000 r-xp 00000000 fe:09 436274 /usr/lib/postgresql-8.4/lib/libpq.so.5.2 a7564000-a7565000 ---p 0001d000 fe:09 436274 /usr/lib/postgresql-8.4/lib/libpq.so.5.2 a7565000-a7566000 r--p 0001d000 fe:09 436274 /usr/lib/postgresql-8.4/lib/libpq.so.5.2 a7566000-a7567000 rw-p 0001e000 fe:09 436274 /usr/lib/postgresql-8.4/lib/libpq.so.5.2 a7567000-a7572000 r-xp 00000000 fe:09 219734 /usr/lib/dspam/libpgsql_drv.so.7.0.0 a7572000-a7573000 r--p 0000a000 fe:09 219734 /usr/lib/dspam/libpgsql_drv.so.7.0.0 a7573000-a7574000 rw-p 0000b000 fe:09 219734 /usr/lib/dspam/libpgsql_drv.so.7.0.0 a7574000-a757e000 r-xp 00000000 fe:09 135669 /lib/libnss_files-2.11.2.so a757e000-a757f000 r--p 00009000 fe:09 135669 /lib/libnss_files-2.11.2.so a757f000-a7580000 rw-p 0000a000 fe:09 135669 /lib/libnss_files-2.11.2.so a7580000-a7589000 r-xp 00000000 fe:09 135677 /lib/libnss_nis-2.11.2.so a7589000-a758a000 r--p 00008000 fe:09 135677 /lib/libnss_nis-2.11.2.so a758a000-a758b000 rw-p 00009000 fe:09 135677 /lib/libnss_nis-2.11.2.so a758b000-a759e000 r-xp 00000000 fe:09 135733 /lib/libnsl-2.11.2.so a759e000-a759f000 r--p 00012000 fe:09 135733 /lib/libnsl-2.11.2.so a759f000-a75a0000 rw-p 00013000 fe:09 135733 /lib/libnsl-2.11.2.so a75a0000-a75a2000 rw-p a75a0000 00:00 0 a75a2000-a75a9000 r-xp 00000000 fe:09 135710 /lib/libnss_compat-2.11.2.so a75a9000-a75aa000 r--p 00006000 fe:09 135710 /lib/libnss_compat-2.11.2.so a75aa000-a75ab000 rw-p 00007000 fe:09 135710 /lib/libnss_compat-2.11.2.so a75ab000-a75ad000 rw-p a75ab000 00:00 0 a75ad000-a75af000 r-xp 00000000 fe:09 135729 /lib/libdl-2.11.2.so a75af000-a75b0000 r--p 00001000 fe:09 135729 /lib/libdl-2.11.2.so a75b0000-a75b1000 rw-p 00002000 fe:09 135729 /lib/libdl-2.11.2.so a75b1000-a75d5000 r-xp 00000000 fe:09 135650 /lib/libm-2.11.2.so a75d5000-a75d6000 r--p 00023000 fe:09 135650 /lib/libm-2.11.2.so a75d6000-a75d7000 rw-p 00024000 fe:09 135650 /lib/libm-2.11.2.so a75d7000-a771c000 r-xp 00000000 fe:09 135663 /lib/libc-2.11.2.so a771c000-a771d000 ---p 00145000 fe:09 135663 /lib/libc-2.11.2.so a771d000-a771f000 r--p 00145000 fe:09 135663 /lib/libc-2.11.2.so a771f000-a7720000 rw-p 00147000 fe:09 135663 /lib/libc-2.11.2.so a7720000-a7723000 rw-p a7720000 00:00 0 a7723000-a7738000 r-xp 00000000 fe:09 135704 /lib/libpthread-2.11.2.so a7738000-a7739000 r--p 00014000 fe:09 135704 /lib/libpthread-2.11.2.so a7739000-a773a000 rw-p 00015000 fe:09 135704 /lib/libpthread-2.11.2.so a773a000-a773c000 rw-p a773a000 00:00 0 a773c000-a7751000 r-xp 00000000 fe:09 219692 /usr/lib/libdspam.so.7.0.0 a7751000-a7752000 r--p 00014000 fe:09 219692 /usr/lib/libdspam.so.7.0.0 a7752000-a7753000 rw-p 00015000 fe:09 219692 /usr/lib/libdspam.so.7.0.0 a7753000-a7754000 rw-p a7753000 00:00 0 a7758000-a7775000 r-xp 00000000 fe:09 135642 /lib/ld-2.11.2.so a7775000-a7776000 r--p 0001c000 fe:09 135642 /lib/ld-2.11.2.so a7776000-a7777000 rw-p 0001d000 fe:09 135642 /lib/ld-2.11.2.so a7777000-a777b000 r-xp 00000000 fe:09 219725 /usr/bin/dspam_clean a777b000-a777c000 r--p 00003000 fe:09 219725 /usr/bin/dspam_clean a777c000-a777d000 rw-Aborted Dspam version: DSPAM Anti-Spam Suite 3.9.1 (agent/library) Copyright (c) 2002-2010 DSPAM Project http://dspam.sourceforge.net. DSPAM may be copied only under the terms of the GNU General Public License, a copy of which can be found with the DSPAM distribution kit. Configuration parameters: '--prefix=/usr' '--build=i686-pc-linux-gnu' '--host=i686-pc-linux-gnu' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--datadir=/usr/share' '--sysconfdir=/etc/mail/dspam' '--enable-daemon' '--disable-external-lookup' '--enable-clamav' '--disable-large-scale' '--enable-domain-scale' '--enable-syslog' '--disable-debug' '--disable-bnr-debug' '--disable-verbose-debug' '--enable-long-usernames' '--with-dspam-group=dspam' '--with-dspam-home-group=dspam' '--with-dspam-mode=2511' '--with-logdir=/var/log/dspam' '--with-pgsql-includes=/usr/include/postgresql' '--with-pgsql-libraries=/usr/lib' '--enable-virtual-users' '--enable-preferences-extension' '--disable-homedir' 'build_alias=i686-pc-linux-gnu' 'host_alias=i686-pc-linux-gnu' 'CC=i686-pc-linux-gnu-gcc' 'CFLAGS=-O2 -march=i686 -pipe' 'LDFLAGS=-Wl,-O1 -Wl,--as-needed' After some testing, it seems that this happens whenever I run the dspam_clean command for one special user (or for all users, including this one). This is the user 'global-user' that I created as a global classification user, but has no data yet (because did not yet start merging data from other 'tarined' users into it). ---------------------------------------------------------------------- >Comment By: Stevan Bajic (sbajic) Date: 2010-08-04 11:22 Message: Can both of you try to apply this patch here and look if this solves the issue? diff --git a/src/pgsql_drv.c b/src/pgsql_drv.c index b0891d9..cd98780 100644 --- a/src/pgsql_drv.c +++ b/src/pgsql_drv.c @@ -471,6 +471,7 @@ _pgsql_drv_set_spamtotals (DSPAM_CTX * CTX) if ( s->control_totals.innocent_learned != 0 || result == NULL || (PQresultStatus(result) != PGRES_COMMAND_OK && PQresultStatus(result) != PGRES_NONFATAL_ERROR) ) { if (result) PQclear(result); + result = NULL; /* Do not update stats if all values are zero (aka: no update needed) */ if (!(abs(CTX->totals.spam_learned - s->control_totals.spam_learned) == 0 && ---------------------------------------------------------------------- Comment By: Stevan Bajic (sbajic) Date: 2010-08-04 11:16 Message: In both cases it looks like PQclear was/is called twice. Can not one of you guys compile DSPAM with debug options and run the command in GDB and post a backtrace? ---------------------------------------------------------------------- Comment By: The Duck (duck207) Date: 2010-08-04 10:00 Message: I've got the same kind of error, but when running dspam for retraining. I thought it was related to #2990455 at first, but according to the backtrace, it is more likely to be linked to this issue. Here is the backtrace in my logs: Aug 4 09:24:48 Orfeo postfix/pipe[16195]: 117A54B058: to=<dc-spamfilter-spam-retr...@duckcorp.dl>, orig_to=<hid...@duckcorp.org>, relay=dspam-retrain, delay=0.35, delays=0.19/0.03/0/0.13, dsn=5.3.0, status=bounced (Command died with status 134: "/usr/local/sbin/srv_dspam_retrain". Command output: *** glibc detected *** /usr/bin/dspam: double free or corruption (!prev): 0x0000000001f181d0 *** ======= Backtrace: ========= /lib/libc.so.6(+0x71b16)[0x7fb9afb1bb16] /lib/libc.so.6(cfree+0x6c)[0x7fb9afb2088c] /usr/lib/libpq.so.5(PQclear+0xf9)[0x7fb9ae70f1b9] /usr/lib/dspam/libpgsql_drv.so(_pgsql_drv_set_spamtotals+0x592)[0x7fb9ae930572] /usr/lib/dspam/libpgsql_drv.so(_ds_shutdown_storage+0x3d)[0x7fb9ae930aed] /usr/lib/dspam/libpgsql_drv.so(_ds_get_signature+0x2ae)[0x7fb9ae930e9e] /usr/bin/dspam(process_message+0x18e)[0x40abfe] /usr/bin/dspam(process_users+0x6fa)[0x40c4da] /usr/bin/dspam(main+0x3f8)[0x40d308] /lib/libc.so.6(__libc_start_main+0xfd)[0x7fb9afac8c4d] /usr/bin/dspam[0x404859] ======= Memory map: == I'm using git version 9dae44b taken yesterday (which is currently still the HEAD). ---------------------------------------------------------------------- Comment By: Stevan Bajic (sbajic) Date: 2010-08-04 00:32 Message: Can you compile with debug turned on and with debug symbols and then process the clean job in GDB and post the output? How can I reproduce this on my end? Do you get that if you just create a new user and this user has no stats nor any tokens? Or does the uid have an empty stats but now tokens? ---------------------------------------------------------------------- Comment By: Tom Hendrikx (whyscream) Date: 2010-08-04 00:19 Message: Just tried that (commit 9dae44b44f921024f0813c337de4cf15e659ebb1), but it has no effect. Output and memory map is similar for all ways of calling dspam_clean ---------------------------------------------------------------------- Comment By: Stevan Bajic (sbajic) Date: 2010-08-03 23:50 Message: Hmm... again the PostgreSQL driver. I have changed some things inside the current GIT version of DSPAM. Could you try and see if you can reproduce that crash with DSPAM Git? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1126467&aid=3039020&group_id=250683 ------------------------------------------------------------------------------ The Palm PDK Hot Apps Program offers developers who use the Plug-In Development Kit to bring their C/C++ apps to Palm for a share of $1 Million in cash or HP Products. Visit us here for more details: http://p.sf.net/sfu/dev2dev-palm _______________________________________________ Dspam-devel mailing list Dspam-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspam-devel