when using mysql-storage for bayes and using a mysql dbd driver > 3, spamassassin segfaults after accessing the bayes db. when running "spamassassin -D < message" i got this: [27341] dbg: bayes: database connection established [27341] dbg: bayes: found bayes db version 3 [27341] dbg: bayes: Using userid: 1 [27341] dbg: bayes: not available for scanning, only 0 spam(s) in bayes DB < 200 [27341] dbg: bayes: not scoring message, returning undef [27341] dbg: bayes: DB expiry: tokens in DB: 150, Expiry max size: 150000, Oldest atime: 1131804084, Newest atime: 1131804084, Last expire: 0, Current time: 1131809984 Segmentation fault tried spamassassin 3.0 and 3.1 everytime the same result, when using mysql storage for bayes. using built in storage methode all works. so finally downgraded DBD-mysql to 2.9007, and the segfault disappear and everything runs smooth. perhaps someone can help me, so that a downgrade isn't necessary. versions are: mysql 5.0.15 spamassassin 3.1 (also tried 3.04) DBD-mysql 3.002_p3 Reproducible: Always Steps to Reproduce: 1. 2. 3. Actual Results: spamassassin segfaults when using mysql storage for bayes Expected Results: shouldn' segfault like with DBD-mysql-2.9007 Portage 2.0.53_rc7 (default-linux/x86/2005.1, gcc-3.4.4, glibc-2.3.5-r3, 2.6.14-gentoo-r2-2005.1 i686) ================================================================= System uname: 2.6.14-gentoo-r2-2005.1 i686 Pentium III (Coppermine) Gentoo Base System version 1.12.0_pre10 dev-lang/python: 2.4.2 sys-apps/sandbox: 1.2.13 sys-devel/autoconf: 2.13, 2.59-r7 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1 sys-devel/binutils: 2.16.1 sys-devel/libtool: 1.5.20-r1 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-march=pentium3 -O3 -pipe -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/texmf/web2c /etc/env.d" CXXFLAGS="-march=pentium3 -O3 -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig distlocks sandbox sfperms strict" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo" LANG="de_DE.utf8" LC_ALL="de_DE.utf8" LINGUAS="de" MAKEOPTS="-j3" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 X Xaw3d a52 aac aalib accessibility acl alsa apache2 apm ares arts artswrappersuid async audiofile authfile automount avi bash-completion bcmath berkdb big-tables bitmap-fonts bzip2 cairo calender caps cdb cjk clamav cli crypt ctype cups curl curlwrappers dba dga directfb djbfft dlloader dmx doc dts dynagraph eds elf emacs emboss encode esd examples exif expat extraengine fam fbcon ffmpeg flac flatfile font-server fontconfig foomaticdb fortran fpx freetds ftp gcj gd gdbm ggi gif glep glitz glut gmp gnome gnutls gpm graphviz gs gstreamer gtk gtk2 guile hal hesiod howl iconv idled idn ieee1394 imagemagick imap imlib immqt inifile insecure-drivers ipv6 ithreads jack jack-tmpfs java java-external javascript jbig jce jpeg justify kde kdeenablefinal kerberos lcms ldap ldapsam leim libcaca libclamav libg++ libwww lm_sensors mad memlimit mhash mikmod ming mmx mng mono motif mp3 mpeg mpm-prefork mssql mysql mysqli nas ncurses neXt netpbm network nis nls nntp nptl nptlonly nsplugin numeric oav objc odbc ogg oggvorbis opengl oss pam pam_chroot pam_console pam_timestamp pcntl pcre pdflib pdo-external pear perl perlsuid pg-hier pg-intdatetime php png portaudio posix postgres pwdb python qt quicktime quotas readline rewrite rle rpm ruby samba sample sasl sdk sdl sendfile sensord session shaper sharedmem simplexml sitemisc skey slp smartcard smux snmp soap sockets socks5 softquota spell spf spl sqlite srp sse ssl svg svga swat symlink sysfs syslog sysvipc tcltk tcpd tetex theora threads tidy tiff tokenizer toolbar tools truetype truetype-fonts type1-fonts ucs2 udev unicode urandom usb utf8 v4l vda vorbis wddx winbind wmf xinerama xinetd xml2 xmlrpc xpm xprint xsl xv xvid yaz zip zlib video_cards_ati128 linguas_de userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CTARGET, LDFLAGS
Please take a look at http://issues.apache.org/SpamAssassin/show_bug.cgi?id=4635 and let me know if we should mark this as an upstream problem. Thanks :)
this bug i can also confirm, but this one happens only if the user isn't in the db, so connection to db fails. for me spamassassin can connect and also get the right bayes-db-version which is stored in a table in mysql-db. so it has access to the db, but then it crashes when it do the bayes check.
Just wanted to make sure: does it still occur with DBD-mysql-3.0002_p4? Could you: DBI_TRACE=4=dbitrace.log spamassassin -D < message And attach dbitrace.log? Thanks.
i upgraded to DBD-mysql-3.0002_p4 and the problem seems to be disappeared. i tested this with some spam massages from my spam folder and i can't see any segfaults
Marking as fixed for the time being. 3.0002 has also been added to the tree since all of the _p* versions of this module seem to cause problems in another bug.