Bug#263879: asterisk: Can't be restarted after a kill -9 or other sudden termination

Russell Coker Russell Coker <russell@coker.com.au>, 263879@bugs.debian.org
Fri, 06 Aug 2004 14:27:19 +1000


Package: asterisk
Version: 1:0.9.1+1.0RC1-4
Severity: normal

Running "/etc/init.d/asterisk start" after the daemon has crashed or been
killed with kill -9 gives an error message stating "Asterisk already running".
If you then run "/etc/init.d/asterisk stop" then it will hang forever as it
tries to connect to the unix domain socket /var/run/asterisk/asterisk.ctl
which has no process listening to it.

I believe that both the start and stop parts of the init.d script need to be
fixed.  A stop command should not take any time if the daemon is not running.
A start command should not be interrupted by the fact that the previous copy
of the daemon was killed with kill -9.

-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.7-netlink
Locale: LANG=C, LC_CTYPE=C

Versions of packages asterisk depends on:
ii  asterisk-sounds       1:0.9.1+1.0RC1-4   Sound files for asterisk
ii  libasound2            1.0.5-1            Advanced Linux Sound Architecture 
ii  libc6                 2.3.2.ds1-15       GNU C Library: Shared libraries an
ii  libedit2              2.6.cvs.20020109-7 BSD editline and history libraries
ii  libexpat1             1.95.6-8           XML parsing C library - runtime li
ii  libglib1.2            1.2.10-9           The GLib library of C routines
ii  libgsm1               1.0.10-13          Shared libraries for GSM speech co
ii  libgtk1.2             1.2.10-17          The GIMP Toolkit set of widgets fo
ii  libncurses5           5.4-4              Shared libraries for terminal hand
ii  libopenh323-1.13.2    1.13.5-1           H.323 aka VoIP library
ii  libpq3                7.4.3-3            Shared library libpq.so.3 for Post
ii  libpri1               0.6.0+1.0RC1-1     Primary Rate ISDN specification li
ii  libpt-1.6.3           1.6.6-1            Portable Windows Library
ii  libspeex1             1.0.rel.3-1        The Speex Speech Codec
ii  libssl0.9.7           0.9.7d-5           SSL shared libraries
ii  libtonezone1          1:0.8.1-1          tonezone library (runtime)
ii  libx11-6              4.3.0.dfsg.1-6     X Window System protocol client li
ii  libxext6              4.3.0.dfsg.1-6     X Window System miscellaneous exte
ii  libxi6                4.3.0.dfsg.1-6     X Window System Input extension li
ii  unixodbc              2.2.4-9            ODBC tools libraries
ii  xlibs                 4.3.0.dfsg.1-6     X Window System client libraries m
ii  zlib1g                1:1.2.1.1-5        compression library - runtime

-- no debconf information