Bug#663009: happens on all upgrades

2013-01-23 Thread Roger Leigh
On Wed, Jan 16, 2013 at 08:12:13PM +0100, Bastian Blank wrote:
 Control: found -1 2.88dsf-34
 Control: severity -1 serious
 
 I upgraded several machines in the last days and _every_ one failed to
 reboot after that:

Does the following patch help with this?
Also, it would help greatly to have some information about the
systems you upgraded.  Were these running native, or using some
form of container/virtualisation?  This patch should help for
environment where pidof fails to detect init, but unless I
understand the problem better, I'm not going to be able to
just guess.  Does pidof /sbin/init work on these systems?
Does it have a nonzero exit status?


--- a/debian/postinst
+++ b/debian/postinst
@@ -19,7 +19,7 @@ do_restart() {
 
# PID of init; may not always be 1.  Use for sending signals
# and checking if init is running.
-   PID=$(pidof /sbin/init || true)
+   PID=$(pidof /sbin/init || echo 1)
 
# Create /run/initctl if not present, and also create compatibility
# symlinks
--- a/debian/src/initscripts/etc/init.d/mountall.sh
+++ b/debian/src/initscripts/etc/init.d/mountall.sh
@@ -55,7 +55,7 @@ do_start() {
mknod -m 600 $INITCTL p
 
# Reopen control channel.
-   PID=$(pidof /sbin/init || true)
+   PID=$(pidof /sbin/init || echo 1)
[ -n $PID ]  kill -s USR1 $PID
fi
 

Thanks,
Roger

-- 
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linuxhttp://people.debian.org/~rleigh/
 `. `'   schroot and sbuild  http://alioth.debian.org/projects/buildd-tools
   `-GPG Public Key  F33D 281D 470A B443 6756 147C 07B3 C8BC 4083 E800


-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#663009: happens on all upgrades

2013-01-16 Thread Roger Leigh
On Wed, Jan 16, 2013 at 08:12:13PM +0100, Bastian Blank wrote:
 Control: found -1 2.88dsf-34
 Control: severity -1 serious
 
 I upgraded several machines in the last days and _every_ one failed to
 reboot after that:
 
 | # reboot
 |   
 | Broadcast message from root@s1 (pts/23) (Wed Jan 16 20:07:09 2013):
 | 
 | The system is going down for reboot NOW!
 | shutdown: timeout opening/writing control channel /run/initctl
 | init: timeout opening/writing control channel /run/initctl
 
 Adding a symlink from /dev/initctl to /run/initctl makes reboot work
 again.

Do you have a transcript of any of the upgrades?  It would be useful
to know what when wrong here, since we do take care to make
init reopen the control channel.
See /var/lib/dpkg/info/sysvinit.postinst lines 9-44 in do_restart().

One question would be if all these systems were running in some
type of container, since we determine the PID of init using
PID=$(pidof /sbin/init || true)
Is this failing on your systems?  If so, it would be very helpful
to know why, and what we could do to make this more robust.
Should probably be changed to || echo 1 as a fallback on failure.


Regards,
Roger

-- 
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linuxhttp://people.debian.org/~rleigh/
 `. `'   schroot and sbuild  http://alioth.debian.org/projects/buildd-tools
   `-GPG Public Key  F33D 281D 470A B443 6756 147C 07B3 C8BC 4083 E800


-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org