-------- Original-Nachricht -------- > Datum: Tue, 01 Jan 2008 11:44:43 -0800 > Von: Jason Axley <[EMAIL PROTECTED]> > An: Steve <[EMAIL PROTECTED]> > CC: [email protected] > Betreff: Re: [dspam-users] CVS version getting invalid result messages in logs
> Steve wrote: > > -------- Original-Nachricht -------- > > > >> Datum: Mon, 31 Dec 2007 13:56:10 -0800 > >> Von: Jason Axley <[EMAIL PROTECTED]> > >> An: [email protected] > >> Betreff: Re: [dspam-users] CVS version getting invalid result messages > in logs > >> > > > > > >> Digging around in my dspam debug logs, I found these messages that > >> probably correspond: > >> > >> 12984: [12/31/2007 10:15:52] sedation level set to: 0 > >> 12984: [12/31/2007 10:15:52] _mysql_drv_getspamtotals: unable to > >> _mysql_drv_getpwnam((null)) > >> 12984: [12/31/2007 10:15:52] unable to load totals. using zero values. > >> 12984: [12/31/2007 10:15:52] _ds_getall_spamrecords: unable to > >> _mysql_drv_getpwnam((null)) > >> 12984: [12/31/2007 10:15:52] _ds_getall_spamrecords() failed > >> > >> > > This error means that the CTX (DSPAM Classification Context) has no > username or group associated with the context. Actually it is a NULL value > associated with the context. I see that in the error: > > _mysql_drv_getpwnam((null)) > > > > The error is initiated in _ds_getall_spamrecords wich is an abstraction > level for and above all the storage drivers. > > > > So probably you have a issue with the storage backend and in your case > this is MySQL. Tonny from the DSPAM ML has the same error with CVS on his > FC6 system. I could not replicate or reproduce the error on my CentOS 5.1 or > Gentoo system. I however only used CVS on the CentOS 5.1 system. On the > Gentoo system I am running 3.8.0 with the Gentoo patches and a bunch of my own > patches. There I have rewritten a big part of the MySQL storage driver for > DSPAM. Since I am fiddling around with the MySQL driver in DSPAM for so > long I know that that part of the original code is not without problems. But > that is another story. > > > > > > > >> Dspam is working, but just occassionally the mysql driver is getting > >> some errors. Some threading issue perhaps? > >> > >> > > DSPAM adds mutex locks around each MySQL connection. The chance that you > have a threading issue is pretty small. > > > > > > > >> Oh, and it occurs on even mundane text emails so that isn't a factor. > >> Looks like a bug in the mysql driver unrelated to the message contents. > >> > >> > > I think that as well. Allow me to ask: > > - What MySQL version? > > > mysql Ver 14.12 Distrib 5.0.38, for pc-linux-gnu (i486) using readline > 5.2 > MySQL 5.0.38. On my end: mail ~ # mysql --user=root --password=$(cat /root/mysql.pwd) -e "show variables like '%version%'" +-------------------------+---------------------------+ | Variable_name | Value | +-------------------------+---------------------------+ | protocol_version | 10 | | version | 5.0.52 | | version_comment | Gentoo Linux mysql-5.0.52 | | version_compile_machine | i686 | | version_compile_os | pc-linux-gnu | +-------------------------+---------------------------+ mail ~ # mysql --version mysql Ver 14.12 Distrib 5.0.52, for pc-linux-gnu (i686) using readline 5.2 mail ~ # > > - What architecture? > > > > ## --------- ## > ## Platform. ## > ## --------- ## > uname -r = 2.6.20-16-server > uname -m = i686 > uname -v = #2 SMP Sun Sep 23 19:57:25 UTC 2007 > On my end: mail ~ # uname -a Linux mail 2.6.23-hardened-r5 #1 Sat Nov 24 00:32:09 CET 2007 i686 AMD Athlon (TM) AuthenticAMD GNU/Linux mail ~ # > > - What bit depth? 32Bit? 64Bit? > > > 32 bit > Me too. > > - What compiler? > > > gcc > Me too. > > - What compiler version? > > > configure:2936: checking for C compiler version > configure:2943: i486-linux-gnu-gcc --version >&5 > i486-linux-gnu-gcc (GCC) 4.1.2 (Ubuntu 4.1.2-0ubuntu4) > mail ~ # gcc -v Reading specs from /usr/lib/gcc/i686-pc-linux-gnu/3.4.6/specs Configured with: /var/tmp/portage/sys-devel/gcc-3.4.6-r2/work/gcc-3.4.6/configure --prefix=/usr --bindir=/usr/i686-pc-linux-gnu/gcc-bin/3.4.6 --includedir=/usr/lib/gcc/i686-pc-linux-gnu/3.4.6/include --datadir=/usr/share/gcc-data/i686-pc-linux-gnu/3.4.6 --mandir=/usr/share/gcc-data/i686-pc-linux-gnu/3.4.6/man --infodir=/usr/share/gcc-data/i686-pc-linux-gnu/3.4.6/info --with-gxx-include-dir=/usr/lib/gcc/i686-pc-linux-gnu/3.4.6/include/g++-v3 --host=i686-pc-linux-gnu --build=i686-pc-linux-gnu --disable-altivec --enable-nls --without-included-gettext --with-system-zlib --disable-checking --disable-werror --enable-secureplt --disable-libunwind-exceptions --disable-multilib --disable-libgcj --enable-languages=c,c++ --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu Thread model: posix gcc version 3.4.6 (Gentoo Hardened 3.4.6-r2, ssp-3.4.6-1.0, pie-8.7.10) mail ~ # > > - What compiler flags did you use? > > - What configure options did you use? > > > $ ../configure --host=i486-linux-gnu --build=i486-linux-gnu > --prefix=/usr --includedir=/usr/include --mandir=/usr/share/man > --infodir=/usr/share/info --with-logdir=/var/log/dspam/ > --localstatedir=/var --libexecdir=/usr/lib/dspam --srcdir=.. > --with-dspam-home=/var/spool/dspam --sysconfdir=/etc/dspam > --enable-domain-scale --enable-signature-headers > --with-delivery-agent=/usr/bin/procmail --enable- > daemon --with-mysql-includes=/usr/include/mysql > --with-pgsql-includes=/usr/include/postgresql > --with-storage-driver=libdb4_drv,mysql_drv,pgsql_drv,sqlite3_drv,hash_drv > --enable-ldap --enable-debug --enable-virtual-users > --enable-preferences-extension --enable-clamav > mail ~ # dspam --version DSPAM Anti-Spam Suite 3.8.0 (agent/library) Copyright (c) 2002-2006 Jonathan A. Zdziarski http://dspam.nuclearelephant.com 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' '--host=i686-pc-linux-gnu' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--datadir=/usr/share' '--sysconfdir=/etc' '--localstatedir=/var/lib' '--with-storage-driver=hash_drv,sqlite3_drv,mysql_drv' '--with-dspam-home=/var/spool/dspam' '--sysconfdir=/etc/mail/dspam' '--enable-daemon' '--disable-ldap' '--disable-clamav' '--enable-large-scale' '--disable-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' '--enable-virtual-users' '--enable-preferences-extension' '--disable-homedir' '--with-mysql-includes=/usr/include/mysql' '--with-mysql-libraries=/usr/lib/mysql' '--enable-mysql4-initialization' '--build=i686-pc-linux-gnu' 'build_alias=i686-pc-linux-gnu' 'host_alias=i686-pc-linux-gnu' 'CFLAGS=-march=athlon-tbird -O2 -pipe -mmmx -m3dnow -fforce-addr -fomit-frame-pointer -falign-functions=4 -Wl,-z,now' 'CXXFLAGS=-march=athlon-tbird -O2 -pipe -mmmx -m3dnow -fforce-addr -fomit-frame-pointer -falign-functions=4 -Wl,-z,now' mail ~ # > And here are the dependent library versions on this system (Ubuntu 7.04): > > [EMAIL PROTECTED]:~/dspam_cvs/dspam/build--tmp$ ldd /usr/bin/dspam > linux-gate.so.1 => (0xffffe000) > libdspam.so.7 => /usr/lib/libdspam.so.7 (0xb7f7d000) > libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb7f56000) > libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0xb7f52000) > libldap_r.so.2 => /usr/lib/libldap_r.so.2 (0xb7f1c000) > liblber.so.2 => /usr/lib/liblber.so.2 (0xb7f0f000) > libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0xb7ef8000) > libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7db6000) > /lib/ld-linux.so.2 (0x80000000) > libresolv.so.2 => /lib/tls/i686/cmov/libresolv.so.2 (0xb7da3000) > libcrypt.so.1 => /lib/tls/i686/cmov/libcrypt.so.1 (0xb7d75000) > libsasl2.so.2 => /usr/lib/libsasl2.so.2 (0xb7d5e000) > libgnutls.so.13 => /usr/lib/libgnutls.so.13 (0xb7cee000) > libtasn1.so.3 => /usr/lib/libtasn1.so.3 (0xb7cd8000) > libz.so.1 => /usr/lib/libz.so.1 (0xb7cc4000) > libgcrypt.so.11 => /usr/lib/libgcrypt.so.11 (0xb7c73000) > libgpg-error.so.0 => /usr/lib/libgpg-error.so.0 (0xb7c6f000) > libnsl.so.1 => /lib/tls/i686/cmov/libnsl.so.1 (0xb7c58000) > mail ~ # ldd /usr/bin/dspam /usr/lib/libdspam.so.7 /usr/bin/dspam: linux-gate.so.1 => (0xffffe000) libdspam.so.7 => /usr/lib/libdspam.so.7 (0xb7ee4000) libm.so.6 => /lib/libm.so.6 (0xb7ebe000) libdl.so.2 => /lib/libdl.so.2 (0xb7eba000) libpthread.so.0 => /lib/libpthread.so.0 (0xb7ea2000) libc.so.6 => /lib/libc.so.6 (0xb7d6f000) /lib/ld-linux.so.2 (0x80000000) /usr/lib/libdspam.so.7: linux-gate.so.1 => (0xffffe000) libm.so.6 => /lib/libm.so.6 (0xb7f25000) libdl.so.2 => /lib/libdl.so.2 (0xb7f21000) libpthread.so.0 => /lib/libpthread.so.0 (0xb7f09000) libc.so.6 => /lib/libc.so.6 (0xb7dd6000) /lib/ld-linux.so.2 (0x80000000) mail ~ # The same thing but with CVS under CentOS 5.1: [EMAIL PROTECTED] ~]# ldd /usr/bin/dspam /usr/lib/libdspam.so.7 /usr/bin/dspam: linux-gate.so.1 => (0x00980000) libdspam.so.7 => /usr/lib/libdspam.so.7 (0x00994000) libm.so.6 => /lib/libm.so.6 (0x00110000) libdl.so.2 => /lib/libdl.so.2 (0x0029d000) libpthread.so.0 => /lib/libpthread.so.0 (0x00653000) libc.so.6 => /lib/libc.so.6 (0x00137000) /lib/ld-linux.so.2 (0x00d27000) /usr/lib/libdspam.so.7: linux-gate.so.1 => (0x0041a000) libm.so.6 => /lib/libm.so.6 (0x0033b000) libdl.so.2 => /lib/libdl.so.2 (0x00c50000) libpthread.so.0 => /lib/libpthread.so.0 (0x001c4000) libc.so.6 => /lib/libc.so.6 (0x001db000) /lib/ld-linux.so.2 (0x00833000) [EMAIL PROTECTED] ~]# gcc -v Using built-in specs. Target: i386-redhat-linux Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --enable-plugin --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic --host=i386-redhat-linux Thread model: posix gcc version 4.1.2 20070626 (Red Hat 4.1.2-14) [EMAIL PROTECTED] ~]# uname -srvmpio Linux 2.6.18-53.1.4.el5 #1 SMP Fri Nov 30 00:45:16 EST 2007 i686 athlon i386 GNU/Linux [EMAIL PROTECTED] ~]# dspam --version DSPAM Anti-Spam Suite CVS (agent/library) Copyright (c) 2002-2006 Jonathan A. Zdziarski http://dspam.nuclearelephant.com 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: '--build=i686-redhat-linux-gnu' '--host=i686-redhat-linux-gnu' '--target=i686-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--enable-long-usernames' '--enable-syslog' '--enable-domain-scale' '--disable-large-scale' '--disable-homedir' '--enable-virtual-users' '--enable-preferences-extension' '--with-mysql-includes=/usr/include/mysql' '--with-mysql-libraries=/usr/lib/mysql' '--enable-daemon' '--disable-ldap' '--disable-clamav' '--enable-debug' '--disable-verbose-debug' '--disable-bnr-debug' '--with-storage-driver=hash_drv,mysql_drv' '--with-dspam-home=/var/lib/dspam' '--sysconfdir=/etc' '--with-dspam-owner=nobody' '--with-dspam-group=mail' '--with-dspam-home-group=mail' '--with-dspam-mode=2511' '--with-logdir=/var/log/dspam' 'CFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i686 -mtune=generic -fasynchronous-unwind-tables' 'CXXFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i686 -mtune=generic -fasynchronous-unwind-tables' 'FFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i686 -mtune=generic -fasynchronous-unwind-tables' 'build_alias=i686-redhat-linux-gnu' 'host_alias=i686-redhat-linux-gnu' 'target_alias=i686-redhat-linux-gnu' [EMAIL PROTECTED] ~]# mysql --version mysql Ver 14.12 Distrib 5.0.22, for redhat-linux-gnu (i686) using readline 5.0 [EMAIL PROTECTED] ~]# mysql --user=root --password=$(cat /root/mysql.pwd) -e "show variables like '%version%'" +-------------------------+--------------------------------------------------------+ | Variable_name | Value | +-------------------------+--------------------------------------------------------+ | protocol_version | 10 | | version | 5.0.22 | | version_bdb | Sleepycat Software: Berkeley DB 4.1.24: (May 25, 2006) | | version_comment | Source distribution | | version_compile_machine | i686 | | version_compile_os | redhat-linux-gnu | +-------------------------+--------------------------------------------------------+ [EMAIL PROTECTED] ~]# For me the significant/important information is that you have Ubuntu and that you run 32Bit and that you have a similar issue as Tony has. But you both have different architectures and differend bit depth and different distributions. But the problem you have is similar (to a certain extend). I think the fastest and most economic way to solve this issue would be to have some one having Ubuntu and/or FC6 to compile DSPAM with all the debug flags turned on and with debug compile flags and install it and debug the issue. One thing you could try to do is enable the new MySQLReconnect option in dspam.conf. We in Gentoo added that feature since MySQL >= 5.0.13 does not any more reconnect (the older 4.x series did that by default). Just add in your dspam.conf this and try if this solves your problem: MySQLReconnect true One other thing I remember is that we have one user on Gentoo claiming in Bugzilla that his old dspam.conf was responsible for DSPAM crashing: http://bugs.gentoo.org/show_bug.cgi?id=200481#c28 After changing the dspam.conf his error got away. But I don't know how valid his claims are since we in Gentoo can not reproduce this issue and he has not any more his old dspam.conf. // Steve > > > > > >> -Jason > >> > >> > > Steve > > > > > > > >> Jason Axley wrote: > >> > >>> I've got the latest CVS version built on ubuntu and it seems to be > >>> better than the 3.8.0 version at telling me there is an error > >>> encountered instead of failing to completely tag messages it chokes > on. > >>> Several messages slipped through and I see this in the mail.log: > >>> > >>> Dec 31 10:15:53 void dspam[12984]: bailing on error -2 > >>> Dec 31 10:15:53 void dspam[12984]: received invalid result (! > DSR_ISSPAM > >>> || DSR_INNOCENT) : -2 > >>> Dec 31 10:15:53 void dspam[12984]: process_message returned error -2. > >>> delivering. > >>> > >>> Anyone seen this or have an idea offhand why dspam might error on > this? > >>> I'm using the mysql driver along with this group config: > >>> > >>> [EMAIL PROTECTED]:merged:* > >>> global-classification:classification:[EMAIL PROTECTED] > >>> > >>> The messages it failed on were really simple, short > >>> multipart/alternative messages with just a plaintext and html version. > >>> > >>> -Jason > >>> > >>> > >>> > >>> > >>> > > > > > -- GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS. Alle Infos und kostenlose Anmeldung: http://www.gmx.net/de/go/freemail
