Search Engine: Elastic

Article ID: 6476, created on Jun 24, 2009, last review on Apr 30, 2014

  • Applies to:
  • H-Sphere


Parallels H-Sphere mail qmail-smtpd service crashes because of "memory double free or corruption" There are messages in /var/log/maillog like:

Jun 23 00:00:00 mail smtpd: 1234567890.123456 *** glibc detected *** qmail-smtpd: double free or corruption (out): 0x0977b048 ***


Set the environment variable MALLOC_CHECK_ to guard against bugs in the use of malloc, realloc and free. If MALLOC_CHECK_ is set to 0, any detected heap corruption is silently ignored.

In term of H-Sphere mail system it is required to modify qmaild startup script:

- Linux
- FreeBSD

Add the following line "export MALLOC_CHECK_=0" into the corresponded script:
  case "$1" in
+                export MALLOC_CHECK_=0
                  if [ -s ${CONTROLDIR}/destip ]; then

Then restart mail service:
- Linux
/etc/init.d/qmaild restart
- FreeBSD
/usr/local/etc/rc.d/ restart

In case you would like these changes take place after the next update you should add them into qmail startup custom template file (.tmpl.custom):
- Linux
- FreeBSD

f213b9fa8759d57bee5d547445806fe7 6311ae17c1ee52b36e68aaf4ad066387

Email subscription for changes to this article
Save as PDF