Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 148389 - mail-mta/qmail - qmail-rspawn memory leak
Summary: mail-mta/qmail - qmail-rspawn memory leak
Status: VERIFIED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Qmail Team (OBSOLETE)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-20 08:59 UTC by Trevor Harrison
Modified: 2009-03-04 15:33 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Trevor Harrison 2006-09-20 08:59:59 UTC
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
qmailr   10285  0.0 30.8 155668 154568 ?       S    Aug27   7:16 qmail-rspawn

normally it only takes a few K of memory:
qmailr   17884  0.0  0.0   1496   384 ?        S    09:56   0:00 qmail-rspawn

This has been going on for several releases, I've just been to lazy to do anything about it other than restart qmail every month or so.  I'm not running any crazy USE flags, but am running under Xen 3.0.2 (in the dom0).  I never had this problem when I ran a hand-installed qmail before deciding to use the ebuild package.  I can't say for certain if this occurred before compiling with Xen friendly flags (ie. the -mno-tls-direct-seg-refs).

# more /etc/portage/package.use      
mail-mta/qmail notlsbeforeauth

# grep qmail /etc/portage/package.*
/etc/portage/package.use:mail-mta/qmail notlsbeforeauth

# emerge --info
Portage 2.1-r2 (default-linux/x86/2006.0, gcc-3.4.6, glibc-2.3.6-r4, 2.6.16.26-xen-dom0 i686)
=================================================================
System uname: 2.6.16.26-xen-dom0 i686 Pentium II (Deschutes)
Gentoo Base System version 1.12.4
app-admin/eselect-compiler: [Not Present]
dev-lang/python:     2.3.5, 2.4.3-r1
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
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-r2
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.13-r3
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium2 -pipe -mno-tls-direct-seg-refs"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /var/qmail/alias /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/terminfo"
CXXFLAGS="-O2 -march=pentium2 -pipe -mno-tls-direct-seg-refs"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="ftp:///ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ http://gentoo.mirrors.pair.com/ http://mirror.datapipe.net/gentoo http://gentoo.osuosl.org/"
MAKEOPTS=""
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 apache2 arts avi berkdb bitmap-fonts bzip2 cli crypt dlloader dri eds emboss encode esd foomaticdb gdbm gif gstreamer imlib isdnlog jpeg libg++ libwww mad mikmod motif mp3 mpeg ncurses nls nptl ogg opengl oss pam pcre pdflib perl png pppd python qt3 qt4 quicktime readline reflection session spell spl ssl tcpd truetype truetype-fonts type1-fonts udev vorbis xml xmms xorg xv zlib elibc_glibc input_devices_keyboard input_devices_mouse input_devices_evdev kernel_linux userland_GNU"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 1 Trevor Harrison 2006-09-20 11:00:42 UTC
Doh.  Didn't mention my qmail info:

mail-mta/qmail-1.03-r16

According to the qmail-rspawn man page, it doesn't seem like there are any /var/qmail/control files that it uses.

Comment 2 Michael Hanselmann (hansmi) (RETIRED) gentoo-dev 2006-09-20 14:00:27 UTC
We're in the process of phasing out mail-mta/qmail. Can you try mail-mta/netqmail, please?
Comment 3 Michael Hanselmann (hansmi) (RETIRED) gentoo-dev 2006-10-29 01:58:02 UTC
ping?
Comment 4 Trevor Harrison 2006-10-30 06:32:03 UTC
>We're in the process of phasing out mail-mta/qmail. Can you try
>mail-mta/netqmail, please?

I've used qmail (at various levels of patchitude) since 1998'ish.  (hand built, not via any packaging)  Never had a memory leak before.  

However, if I do take the time to update the MTA on this box, it will be to something else, like postfix.  This is more of a bone to pick with djb than the gentoo packaging.
Comment 5 Brian Moon 2009-03-03 16:22:24 UTC
We are seeing this same behavior.

I found a page describing the problem and possible solutions: http://www.thesmbexchange.com/eng/qmail-rspawn-spawn_memleak.html

We are updating to GCC 4 and updating glibc to 2.6.1 to see if it solves the problem.

# equery which netqmail
/usr/portage/mail-mta/netqmail/netqmail-1.05-r8.ebuild

# emerge --info
Portage 2.1.2.11 (default/linux/x86/2008.0, gcc-3.4.6, glibc-2.5-r4, 2.6.14-gentoo-r5 i686)
=================================================================
System uname: 2.6.14-gentoo-r5 i686 Intel(R) Pentium(R) 4 CPU 2.80GHz
Gentoo Base System release 1.12.9
Timestamp of tree: Mon, 02 Mar 2009 06:00:01 +0000
app-shells/bash:     3.2_p17
dev-lang/python:     2.3.5-r3, 2.4.4-r4
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 1.12.9-r2
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.17
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.21
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium4"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /var/qmail/alias /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-O2 -march=pentium4"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="acl berkdb bzip2 cli cracklib crypt dri fortran gdbm gpm iconv isdnlog ldap midi mudflap ncurses nls nptl nptlonly openmp pam pcre perl pppd python readline reflection session snmp spl ssl sysfs tcpd unicode x86 xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 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" USERLAND="GNU" VIDEO_CARDS="fbdev glint i810 intel 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, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 6 Brian Moon 2009-03-04 15:33:31 UTC
FYI, the upgrade to glibc 2.6.1 and/or gcc 4 solved this.  It has not grown in 24 hours.  It was growing in less than an hour before.