Bug#592609: exim4-daemon-light: race condition in init scripts when listening on multiple ports

Jon Dowland jmtd at debian.org
Wed Aug 11 12:52:12 UTC 2010


Package: exim4-daemon-light
Version: 4.69-9
Severity: normal

There seems to be a race condition for start/stop in the init script for exim
when you are listening on multiple ports. Actually race condition might not be
the right phrase; right now, it appears to not stop the daemons at all.

See e.g.:

# invoke-rc.d exim4 stop
Stopping MTA:.
# lsof -ni | grep exim
exim4     15529 Debian-exim    3u  IPv6 1111334       TCP *:submission
(LISTEN)
exim4     15529 Debian-exim    5u  IPv4 1112079       TCP *:submission
(LISTEN)
exim4     15529 Debian-exim    6u  IPv6 1112080       TCP *:ssmtp (LISTEN)
exim4     15529 Debian-exim    7u  IPv4 1112081       TCP *:ssmtp (LISTEN)
exim4     15529 Debian-exim    8u  IPv6 1112082       TCP *:smtp (LISTEN)
exim4     15529 Debian-exim    9u  IPv4 1112083       TCP *:smtp (LISTEN)

If I manually kill all the exim processes and ensure nothing is listening,

# invoke-rc.d exim4 start
Starting MTA: exim4.
# lsof -ni | grep exim
exim4     17168 Debian-exim    3u  IPv6 1123514       TCP *:submission (LISTEN)
exim4     17168 Debian-exim    4u  IPv4 1123515       TCP *:submission (LISTEN)
exim4     17168 Debian-exim    5u  IPv6 1123516       TCP *:ssmtp (LISTEN)
exim4     17168 Debian-exim    6u  IPv4 1123517       TCP *:ssmtp (LISTEN)
exim4     17168 Debian-exim    7u  IPv6 1123518       TCP *:smtp (LISTEN)
exim4     17168 Debian-exim    8u  IPv4 1123519       TCP *:smtp (LISTEN)

And then stop again:

# invoke-rc.d exim4 stop
Stopping MTA:.
# lsof -ni | grep exim
exim4     17168 Debian-exim    3u  IPv6 1123514       TCP *:submission (LISTEN)
exim4     17168 Debian-exim    4u  IPv4 1123515       TCP *:submission (LISTEN)
exim4     17168 Debian-exim    5u  IPv6 1123516       TCP *:ssmtp (LISTEN)
exim4     17168 Debian-exim    6u  IPv4 1123517       TCP *:ssmtp (LISTEN)
exim4     17168 Debian-exim    7u  IPv6 1123518       TCP *:smtp (LISTEN)
exim4     17168 Debian-exim    8u  IPv4 1123519       TCP *:smtp (LISTEN)

I've got it listening on multiple ports via

SMTPLISTENEROPTIONS='-oX 587:465:25'

...in /etc/default/exim4

This also causes issues with 'restart', when the new daemon instances can't
bind to the right ports:

2010-08-11 09:41:48 socket bind() to port 587 for address (any IPv6) failed:
Address already in use: waiting 30s before trying again (4 more tries)

I've noticed also that the pid file is never written to on start, no matter
whether a daemon is hanging around or not (/var/run/exim4 is empty).


-- Package-specific info:
Exim version 4.69 #1 built 30-Sep-2008 18:54:33
Copyright (c) University of Cambridge 2006
Berkeley DB: Berkeley DB 4.6.21: (September 27, 2007)
Support for: crypteq iconv() IPv6 GnuTLS move_frozen_messages
Lookups: lsearch wildlsearch nwildlsearch iplsearch cdb dbm dbmnz dnsdb dsearch nis nis0 passwd
Authenticators: cram_md5 plaintext
Routers: accept dnslookup ipliteral manualroute queryprogram redirect
Transports: appendfile/maildir/mailstore autoreply lmtp pipe smtp
Fixed never_users: 0
Size of off_t: 8
Configuration file is /etc/exim4/exim4.conf
# /etc/exim4/update-exim4.conf.conf
#
# Edit this file and /etc/mailname by hand and execute update-exim4.conf
# yourself or use 'dpkg-reconfigure exim4-config'
#
# Please note that this is _not_ a dpkg-conffile and that automatic changes
# to this file might happen. The code handling this will honor your local
# changes, so this is usually fine, but will break local schemes that mess
# around with multiple versions of the file.
#
# update-exim4.conf uses this file to determine variable values to replace
# the DEBCONFsomethingDEBCONF strings in the configuration template files.
#
# Most settings found in here do have corresponding questions in the
# Debconf configuration, but not all of them.
#
# This is a Debian specific file

dc_eximconfig_configtype='internet'
dc_local_domains='@'
dc_other_hostnames='redmars.org:alcopop.org:jon.dowland.name:dowland.me.uk:npine.co.uk:starbelly.co.uk:jmtd.net:jmtd.me:dowland.me'
dc_local_interfaces=''
dc_readhost=''
dc_relay_domains=''
dc_minimaldns='false'
dc_relay_nets=''
dc_smarthost=''
CFILEMODE='644'
dc_use_split_config='false'
dc_hide_mailname=''
dc_mailname_in_oh='true'
dc_localdelivery='maildir_home'
mailname:forelli.alcopop.org

-- System Information:
Debian Release: 5.0.3
  APT prefers stable
  APT policy: (700, 'stable'), (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.16.29-xen (SMP w/1 CPU core)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages exim4-daemon-light depends on:
ii  debconf [debconf-2.0]     1.5.24         Debian configuration management sy
ii  exim4-base                4.69-9         support files for all Exim MTA (v4
ii  libc6                     2.7-18lenny4   GNU C Library: Shared libraries
ii  libdb4.6                  4.6.21-11      Berkeley v4.6 Database Libraries [
ii  libgnutls26               2.4.2-6+lenny2 the GNU TLS library - runtime libr
ii  libpcre3                  7.6-2.1        Perl 5 Compatible Regular Expressi

exim4-daemon-light recommends no packages.

exim4-daemon-light suggests no packages.

-- debconf information:
  exim4-daemon-light/drec:





More information about the Pkg-exim4-maintainers mailing list