Oct 3 22:16:40 www postfix/smtpd[31552]: connect from mu-out-0910.google.com[209.85.134.190] Oct 3 22:16:40 www sqlgrey: 2008/10/03-22:16:40 CONNECT TCP Peer: "127.0.0.1:55499" Local: "127.0.0.1:2501" Oct 3 22:16:40 www sqlgrey: optin: greylisting active for pckiller@wmaps.hu Oct 3 22:16:41 www postfix/smtpd[31552]: warning: connect to 127.0.0.1:2501: Connection refused Oct 3 22:16:41 www postfix/smtpd[31552]: warning: problem talking to server 127.0.0.1:2501: Connection refused Reproducible: Always Steps to Reproduce: 1. emerge sqlgrey with mysql useflag 2. conf postfix sqlgrey 3. test the mail receiving Actual Results: The sqlgrey crashing every time.
www ~ # emerge --info WARNING: repository at /usr/local/portage is missing a repo_name entry Portage 2.2_rc11 (default/linux/amd64/2008.0, gcc-4.3.1, glibc-2.8_p20080602-r0, 2.6.26-gentoo-r1 x86_64) ================================================================= System uname: Linux-2.6.26-gentoo-r1-x86_64-AMD_Athlon-tm-_64_Processor_3000+-with-glibc2.2.5 Timestamp of tree: Fri, 03 Oct 2008 10:35:01 +0000 app-shells/bash: 3.2_p39 dev-lang/python: 2.4.4-r13, 2.5.2-r8 dev-python/pycrypto: 2.0.1-r6 sys-apps/baselayout: 2.0.0 sys-apps/openrc: 0.2.5 sys-apps/sandbox: 1.2.18.1-r3 sys-devel/autoconf: 2.63 sys-devel/automake: 1.9.6-r2, 1.10.1-r1 sys-devel/binutils: 2.18-r3 sys-devel/gcc-config: 1.4.0-r4 sys-devel/libtool: 2.2.6a virtual/os-headers: 2.6.26 ACCEPT_KEYWORDS="amd64 ~amd64" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -march=k8 -pipe --omit-frame-pointer --rename-registers -m64" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d" CXXFLAGS="-O2 -march=k8 -pipe --omit-frame-pointer --rename-registers -m64" DISTDIR="/usr/portage/distfiles" FEATURES="distlocks parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-orphans userfetch" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo" LDFLAGS="-Wl,--hash-style=both -Wl,-O1" LINGUAS="hu" MAKEOPTS="-j2 -l3" PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_EXTRA_OPTS="--exclude-from=/etc/portage/rsync_excludes" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="acl amd64 berkdb bzip2 cli cracklib crypt cups dri fastcgi fortran gdbm glibc-omitfp gpm iconv isdnlog midi minimal mmap mmx mudflap multilib ncurses nptl nptlonly pam pcre perl pppd python readline reflection session spl sse sse2 ssl sysfs unicode xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="hu" USERLAND="GNU" VIDEO_CARDS="fbdev glint i810 mach64 mga neomagic nv r128 radeon savage sis tdfx trident vesa vga via vmware voodoo" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS www ~ # emerge -pv sqlgrey WARNING: repository at /usr/local/portage is missing a repo_name entry These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild R ] mail-filter/sqlgrey-1.7.6 USE="mysql -postgres -sqlite" 0 kB www ~ # emerge -pv dev-db/mysql WARNING: repository at /usr/local/portage is missing a repo_name entry These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild R ] dev-db/mysql-5.0.60-r1 USE="perl static -berkdb -big-tables -cluster -debug -embedded -extraengine -latin1 -max-idx-128 -minimal (-selinux) -ssl" 0 kB
www ~ # emerge -pv perl WARNING: repository at /usr/local/portage is missing a repo_name entry These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild R ] dev-lang/perl-5.8.8-r5 USE="berkdb gdbm ithreads -build -debug -doc -perlsuid" 0 kB
I don't see any sign of a crash. It seems sqlgrey is refusing the connection. If it does crash (stop) then please add more info to support that.
Is there any useful information in your logfiles?
(In reply to comment #4) > Is there any useful information in your logfiles? > Hi! This is the full log that I gave before the sqlgrey stop, however I set up the logging to debug level in the sqlgrey conf. Have you got any idea where can I find more log to help you? If you want, I would post the sqlgrey.conf.
I found something in my syslog: Oct 19 22:45:53 www sqlgrey[2862]: segfault at 8 ip 00007f68c5d5084e sp 00007fffd0b96d50 error 4 in mysql.so[7f68c5cfc000+139000 ] I hope this will help you....
Hi! Finally I found my problem: http://sourceforge.net/tracker2/?func=detail&aid=2105194&group_id=113566&atid=665523 And the conclusion you can find in the posted link: As stated in the other bug report Perl code doesn't segfault by itself. This is a problem in the MySQL driver (or the hardware but most likely the driver here). Your report even says so (the segfault origin is in libmysqlclient.so.15.0.0). More details : MySQL is known to close inactive connections in its default configuration and there's a workaround in the SQLgrey method used to connect to the database : if ($self->MySQL()) { $self->{sqlgrey}{dbh}->{mysql_auto_reconnect} = 1; } This is specific to the MySQL DBD driver and was the recommended workaround (which worked: it solved the initial problems people had with SQLgrey detecting a problem with the database when an access was attempted after the timeout expired, reconnecting and sending a warning by email). Apparently this doesn't work anymore, please make a bug report to the MySQL driver people, there's nothing SQLgrey can do without major code redesign to work around this bug. Alternatively you can just switch to PostgreSQL it's not designed with the same expectations (like bad code leaving zombies connected to the database) and gives a much cleaner environment to work with... Gergely Nemeth
Re-assigning to mysql@ then.
(In reply to comment #8) > Re-assigning to mysql@ then. > More information: After a perl-DBD update and some motherboard memory setting sqlgrey starting to work normally. Now still working the sqlgrey. I don't know which one or both thing needed to sqlgey, howewer finally everything is ok now. Actually perl-DBD is up to date on my system.
sqlgrey needs to check the connection BEFORE it tries to reuse it. Idle connections are subject to closure. Even better, don't keep a persistent connection, and instead reconnect on demand. Not really a mysql problem that sqlgrey is reusing the (expired) connection.
(In reply to comment #9) > (In reply to comment #8) > > Re-assigning to mysql@ then. > > > > More information: > After a perl-DBD update and some motherboard memory setting sqlgrey starting to > work normally. Now still working the sqlgrey. I don't know which one or both > thing needed to sqlgey, howewer finally everything is ok now. Actually perl-DBD > is up to date on my system. > so this one can be closed, right? (doing so, please re-open if there's still an issue)