[Pkg-sysvinit-devel] Bug#780641: startpar hang on reboot
Declercq Laurent
l.declercq at nuxwin.com
Tue Mar 17 09:50:45 UTC 2015
Package: sysvinit-utils
Version: 2.88dsf-41+deb7u1
Severity: important
Dear maintainer ;
For our project, I've created an upstart job which is responsible to
start our service once the MySQL server is running.
This script must work whatever the MySQL server is started by an upstart
job or sysinit init script.
To be more clear, in case the MySQL server is started by an upstart job
our service must start once the mysql upstart job has been started, else
it must start once the rc upstart job has been stopped.
That is to ensure that the MySQL server will be available when our
sevice will start because it need to pull data from an SQL database.
The upstart job is defined as follow:
=================================================================================================
description "i-MSCP network manager"
author "Laurent Declercq <l.declercq at nuxwin.com>
start on (started mysql or stopped rc)
stop on (stopping mysql or starting rc)
pre-start script
# Start MySQL server if available ( Mimic the Should-Start LSB
header behavior )
# start mysql || true
/var/www/imscp/engine/tools/imscp-net-interfaces-mngr start
/var/www/imscp/engine/tools/imscp-net-traffic-logger start
end script
post-stop script
/var/www/imscp/engine/tools/imscp-net-interfaces-mngr stop
/var/www/imscp/engine/tools/imscp-net-traffic-logger stop
end script
==================================================================================================
I've tested that upstart job which runs well under Ubuntu but the
problem come with Debian Wheezy when using upstart. First, I've
installed upstart by forcing deinstallation of sysinit and then, I've
rebooted the system.
All seem to work as expected except the fact that the rc job hangs.
To be more clear, this is not the rc job that hangs but one of it
children ( startpar ).
The relevant info in the process table:
==================================================================================================
root 462 0.0 0.0 4136 748 ? Ss 10:02 0:00 /bin/sh
/etc/init.d/rc 2
root 480 0.0 0.1 12728 2516 ? SL 10:02 0:00
startpar -p 4 -t 20 -T 3 -M start -P N -R 2
==================================================================================================
pstree result:
==================================================================================================
rc(462)───startpar(480)
==================================================================================================
I don't know why the startpar process hangs but once I kill it manually
( kill -09 480 ), the rc service terminates correctly and my service
start as expected.
I've see another bug which seems to describe the same problem here
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=682654
Could you please give me some advise?
Relevant informations:
==================================================================================================
root at wheezy:/etc/init# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 7.8 (wheezy)
Release: 7.8
Codename: wheezy
==================================================================================================
==================================================================================================
root at wheezy:/etc/init# apt-file search /sbin/startpar
sysvinit-utils: /sbin/startpar
sysvinit-utils: /sbin/startpar-upstart-inject
==================================================================================================
==================================================================================================
root at wheezy:/etc/init# LANG=C aptitude show sysvinit-utils
Package: sysvinit-utils
Essential: yes
State: installed
Automatically installed: no
Version: 2.88dsf-41+deb7u1
Priority: required
Section: admin
Maintainer: Debian sysvinit maintainers
<pkg-sysvinit-devel at lists.alioth.debian.org>
Architecture: amd64
Uncompressed Size: 279 k
Depends: libc6 (>= 2.10), libselinux1 (>= 1.32)
Suggests: bootlogd, sash
Conflicts: chkconfig (< 11.0-79.1-2), last, sysvconfig
Breaks: upstart (< 1.5-1)
Replaces: last, sysvinit (<= 2.86.ds1-65)
Description: System-V-like utilities
This package contains the important System-V-like utilities.
Specifically, this package includes: killall5, last, lastb, mesg,
pidof, service, sulogin
Homepage: http://savannah.nongnu.org/projects/sysvinit
==================================================================================================
root at wheezy:/etc/init# LANG=C aptitude show upstart
Package: upstart
State: installed
Automatically installed: no
Multi-Arch: foreign
Version: 1.6.1-1
Priority: extra
Section: admin
Maintainer: Steve Langasek <vorlon at debian.org>
Architecture: amd64
Uncompressed Size: 1134 k
Depends: libc6 (>= 2.9), libdbus-1-3 (>= 1.2.16), libjson0 (>= 0.10),
libnih-dbus1 (>= 1.0.0), libnih1 (>= 1.0.0), libselinux1 (>= 1.32),
libudev0 (>= 152), sysvinit-utils (>= 2.86.ds1-23), sysv-rc,
initscripts, mountall, ifupdown (>= 0.7.3), udev (>= 175-7.1)
Suggests: python, graphviz, bash-completion
Conflicts: lxcguest, startup-tasks, system-services, sysvinit,
upstart-compat-sysv, upstart-job
Breaks: cryptsetup (< 2:1.4.3-4.1), friendly-recovery (< 0.2.13), libc6
(< 2.12.1-0ubuntu12)
Replaces: startup-tasks, system-services, sysvinit, upstart-compat-sysv,
upstart-job
Provides: upstart-job
Description: event-based init daemon
upstart is a replacement for the /sbin/init daemon which handles
starting of tasks and services during boot, stopping them during
shutdown and supervising them while the system is running.
Homepage: http://upstart.ubuntu.com/
==================================================================================================
--
Laurent Declercq
iHMS/i-MSCP Project Lead
More information about the Pkg-sysvinit-devel
mailing list