Unfinished shutdown or reboot

Bug #418560 reported by Nils Kassube
82
This bug affects 16 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

With the kernel 2.6.31-7 shutdown or reboot stops before the machine is switched off or rebooted. With the previous version (2.6.31-6) or the mainline kernel (2.6.31-020631rc7) the problem doesn't exist. These are the shutdown messages:

Stopping K Display Manager: kdm.
 * Stopping GDM emulation daemon for KDM
Saved ALSA mixer settings detected; aumix will not touch mixer.
 * Stopping NFS common utilities
 * Stopping Postfix Mail Transport Agent postfix
 * Stopping Network connection manager wicd
 * Saving the system clock
 * Shutting down ALSA...
 * Stopping NFS kernel daemon
 * Unexporting directories for NFS kernel daemon...
Checking for running unattended-upgrades: * Asking all remaining processes to terminate...
acpid: exiting

init: Disconnected from system bus

Revision history for this message
Nils Kassube (kassube) wrote :
Revision history for this message
Nils Kassube (kassube) wrote :
Revision history for this message
Nils Kassube (kassube) wrote :
Revision history for this message
Nils Kassube (kassube) wrote :
Changed in linux (Ubuntu):
status: New → Confirmed
Revision history for this message
Yvan (yvan-tardy) wrote :

Same problem on a Thinkpad T60

Revision history for this message
Ronnie (ronnie.vd.c) wrote :

Same problem here

HP 6530b
64 bit
Ubuntu (Gnome)
Kernel 2.6.31-7

last line: Checking for running unattended-upgrades: * Asking all remaining processes to terminate...

Revision history for this message
starslights (starslights) wrote :

same problem on kubuntu karmic alpha4 x86 64

ame message and never shutdown or reboot, need cuting the power...

Stefano Maioli (smaioli)
tags: added: regression-potential
Noel J. Bergman (noeljb)
tags: added: karmic
Revision history for this message
Jan Kaessens (jck) wrote :

Same here, on 2.6.31-7-generic-pae i686.

Excerpt from daemon.log:
Aug 27 00:35:30 janni avahi-daemon[3801]: Withdrawing address record for 10.23.0.2 on tap0.
Aug 27 00:35:31 janni init: rc main process (11426) stopped by STOP signal
<-- Right here stdout says "Checking for running unattended-upgrades:" during shutdown -->
Aug 27 00:35:31 janni init: rc main process (11426) continued by CONT signal
Aug 27 00:35:31 janni acpid: exiting
Aug 27 00:35:31 janni avahi-daemon[3801]: Disconnected from D-Bus, exiting.
Aug 27 00:35:31 janni avahi-daemon[3801]: Got SIGTERM, quitting.
Aug 27 00:35:31 janni avahi-daemon[3801]: write() failed: Broken pipe
Aug 27 00:35:31 janni avahi-daemon[3801]: Leaving mDNS multicast group on interface eth0.IPv4 with address 10.0.0.2.
Aug 27 00:35:31 janni init: Disconnected from system bus
Aug 27 00:35:31 janni avahi-daemon[3801]: write() failed: Broken pipe
... and that's the last message.

According to /usr/share/unattended-upgrades/unattended-upgrades-shutdown it should say
"Giving up lockfile after xx delay" so perhaps it's about that "while True"-loop in there.

Revision history for this message
Jan Kaessens (jck) wrote :

Okay, I changed the init script /etc/init.d/unattended-updates so that
/usr/share/unattended-upgrades/unattended-upgrade-shutdown is called with --debug:

Aug 27 12:11:20 janni GetLock returned 4
Aug 27 12:11:20 janni Lock not taken
Aug 27 12:12:59 janni GetLock returned 4
Aug 27 12:12:59 janni Lock not taken
Aug 27 12:14:03 janni GetLock returned 4
Aug 27 12:14:03 janni Lock not taken

in the above script it says (line 78 ff.):

        res = apt_pkg.GetLock(options.lock_file)
        logging.debug("GetLock returned %i" % res)
        if res > 0:
            logging.debug("Lock not taken")
            sys.exit(0)
        # "wait for 5s, try again or bail out with timeout error" stuff

apt_pkg.GetLock documentation says, that the lock is not taken when result == -1, otherwise the Fd of the lock is returned. I believe it should be "if res < 0" but I don't usually do python, apt-debugging and people say, this works
in 2.6.31-6.

HTH

Revision history for this message
Jan Kaessens (jck) wrote :

Mmmh.. I think I understood. Please dismiss my last comment ;-)
"Lock not taken" means "The lock is free to be taken -> there's no process locking it" instead of "I couldn't get the lock"...

Revision history for this message
Peter W Bowey (support-pbcomp.com.au) wrote :

Confirmed: Latest kernel 2.6.31-7 (not rc7) hangs on reboot or shutdown! No time-out occurs.
Any effort to force the shutdown (keys or commands) - other than physical 'System Power Off' fails.
This occurs even with DBUS disabled. No System logs exist to clarify further on this kernel event 'hang'.

Revision history for this message
Peter W Bowey (support-pbcomp.com.au) wrote :

If one tries Control-Alt-Del on this Kernel 26.31.-7 shutdown / restart hang, the initial message is:

"Init: rc main process (6281) stopped by STOP signal"
"Init: rc main process (6281) continued by CONT signal"

Further attempts at 'Control-Alt-Del' show this message:

"The system is going down for a reboot NOW!"
"Control-Alt-Del pressed"

This repeats for further attempts at 'Control-Alt-Del'

Hard Poweroff is the only resort!

Revision history for this message
Jan Kaessens (jck) wrote :

Confirming that shutdown works nicely on 2.6.31-6-generic-pae.
Don't know what these things mean but here's the changelog between 2.6.31-6 and 2.6.31-7

linux (2.6.31-7.27) karmic; urgency=low
  [ Tim Gardner ]
  * [Config] updateconfigs updateportsconfigs after 2.6.31-rc7 rebase
  * SAUCE: (drop after 2.6.31) Added KSM from mmotm-2009-08-20-19-18
    Replaces previous ksm patches from 2.6.31-6.25
  * [Config] KSM=y

 -- Tim Gardner <email address hidden> Sat, 22 Aug 2009 20:32:11 -0600

HTH,
jan

Revision history for this message
kajhaul (kaj-haulrich) wrote : Re: [Bug 418560] Re: Unfinished shutdown or reboot

On Thursday 27 August 2009 13:50:59 Peter W Bowey wrote:
> Confirmed: Latest kernel 2.6.31-7 (not rc7) hangs on reboot or
> shutdown! No time-out occurs. Any effort to force the shutdown
> (keys or commands) - other than physical 'System Power Off'
> fails. This occurs even with DBUS disabled. No System logs exist
> to clarify further on this kernel event 'hang'.

Actually, you can reboot the system with the keyboard in a safe way.
Use the 'Elephant' sequence:
In a sequential order, press <Alt>+<SysRq>+<r> - this will put the
keyboard in 'raw' mode. Then, continue the sequence by replacing the
<r> above with <s>, <e>, <i>, <u>, <b> - (wait a few seconds between
each three-finger combination).
(Memo: Raising Skinny Elephants Is Utterly Boring)
--
*** Sent from a 100% Microsoft-free computer ***
********* Running Linux Kubuntu 9.10 *********

Revision history for this message
Peter W Bowey (support-pbcomp.com.au) wrote :

Diving into the kernel changes that occurred from linux-26.31-6.26x - dated 2009-08-21 (working) --to-- the new update on 2009-08-24 (not working) linux-2.6.31-7.27, I can only find internal kernel these changes:

1) = [ Taken from the linux_2.6.31-6.26_2.6.31-7.27.diff.gz#patchfs/linux-2.6.31/debian.master/config/config.common.ports.diff: ]

------------------------------------------------------------------------------------------------------------------------------------------------------------

diff -Nru /tmp/FNdEZPHKHo/linux-2.6.31/debian.master/config/config.common.ports /tmp/Td2i4nRkP9/linux-2.6.31/debian.master/config/config.common.ports
--- linux-2.6.31/debian.master/config/config.common.ports 2009-08-21 18:39:57.000000000 +0100
+++ linux-2.6.31/debian.master/config/config.common.ports 2009-08-24 18:08:33.000000000 +0100
@@ -1622,6 +1622,7 @@
 # CONFIG_LPARCFG is not set
 # CONFIG_LP_CONSOLE is not set
 CONFIG_LSI_ET1011C_PHY=m
+CONFIG_LSM_MMAP_MIN_ADDR=65536
 CONFIG_LXT_PHY=m
 CONFIG_M25PXX_USE_FAST_READ=y
 CONFIG_MA600_DONGLE=m
------------------------------------------------------------------------------------------------------------------------------------------------------------

2) = [ and from the linux_2.6.31-6.26_2.6.31-7.27.diff.gz#patchfs/linux-2.6.31/debian.master/config/config.common.ubuntu.diff: ]

------------------------------------------------------------------------------------------------------------------------------------------------------------

diff -Nru /tmp/FNdEZPHKHo/linux-2.6.31/debian.master/config/config.common.ubuntu /tmp/Td2i4nRkP9/linux-2.6.31/debian.master/config/config.common.ubuntu
--- linux-2.6.31/debian.master/config/config.common.ubuntu 2009-08-21 18:39:57.000000000 +0100
+++ linux-2.6.31/debian.master/config/config.common.ubuntu 2009-08-24 18:08:33.000000000 +0100
@@ -1930,6 +1930,7 @@
 CONFIG_LP486E=m
 # CONFIG_LP_CONSOLE is not set
 CONFIG_LSI_ET1011C_PHY=m
+CONFIG_LSM_MMAP_MIN_ADDR=65536
 CONFIG_LTPC=m
 CONFIG_LXT_PHY=m
 CONFIG_LZO_COMPRESS=m

------------------------------------------------------------------------------------------------------------------------------------------------------------

These are the only clues I can offer to the current kernel change!

Revision history for this message
Peter W Bowey (support-pbcomp.com.au) wrote :
Download full text (11.5 KiB)

Found some further changes in the kernel update:

diff -Nru /tmp/FNdEZPHKHo/linux-2.6.31/Documentation/filesystems/afs.txt /tmp/Td2i4nRkP9/linux-2.6.31/Documentation/filesystems/afs.txt
--- linux-2.6.31/Documentation/filesystems/afs.txt 2009-08-21 18:39:55.000000000 +0100
+++ linux-2.6.31/Documentation/filesystems/afs.txt 2009-08-24 18:08:31.000000000 +0100
@@ -23,15 +23,13 @@

  (*) Security (currently only AFS kaserver and KerberosIV tickets).

- (*) File reading.
+ (*) File reading and writing.

  (*) Automounting.

-It does not yet support the following AFS features:
-
- (*) Write support.
+ (*) Local caching (via fscache).

- (*) Local caching.
+It does not yet support the following AFS features:

  (*) pioctl() system call.

@@ -56,7 +54,7 @@
 the masks in the following files:

        /sys/module/af_rxrpc/parameters/debug
- /sys/module/afs/parameters/debug
+ /sys/module/kafs/parameters/debug

 =====
@@ -66,9 +64,9 @@
 When inserting the driver modules the root cell must be specified along with a
 list of volume location server IP addresses:

- insmod af_rxrpc.o
- insmod rxkad.o
- insmod kafs.o rootcell=cambridge.redhat.com:172.16.18.73:172.16.18.91
+ modprobe af_rxrpc
+ modprobe rxkad
+ modprobe kafs rootcell=cambridge.redhat.com:172.16.18.73:172.16.18.91

 The first module is the AF_RXRPC network protocol driver. This provides the
 RxRPC remote operation protocol and may also be accessed from userspace. See:
@@ -81,7 +79,7 @@
 Once the module has been loaded, more modules can be added by the following
 procedure:

- echo add grand.central.org 18.7.14.88:128.2.191.224 >/proc/fs/afs/cells
+ echo add grand.central.org 18.9.48.14:128.2.203.61:130.237.48.87 >/proc/fs/afs/cells

 Where the parameters to the "add" command are the name of a cell and a list of
 volume location servers within that cell, with the latter separated by colons.
@@ -101,7 +99,7 @@
 specify connection to only volumes of those types.

 The name of the cell is optional, and if not given during a mount, then the
-named volume will be looked up in the cell specified during insmod.
+named volume will be looked up in the cell specified during modprobe.

 Additional cells can be added through /proc (see later section).

@@ -163,14 +161,14 @@

 The filesystem maintains an internal database of all the cells it knows and the
 IP addresses of the volume location servers for those cells. The cell to which
-the system belongs is added to the database when insmod is performed by the
+the system belongs is added to the database when modprobe is performed by the
 "rootcell=" argument or, if compiled in, using a "kafs.rootcell=" argument on
 the kernel command line.

 Further cells can be added by commands similar to the following:

        echo add CELLNAME VLADDR[:VLADDR][:VLADDR]... >/proc/fs/afs/cells
- echo add grand.central.org 18.7.14.88:128.2.191.224 >/proc/fs/afs/cells
+ echo add grand.central.org 18.9.48.14:128.2.203.61:130.237.48.87 >/proc/fs/afs/cells

 No other cell database operations are available at this time.

@@ -233,7 +231,7 @@
 mount -t afs \%root.afs. /afs
 mount -t afs \%cambrid...

Revision history for this message
GriFF3n (griff3ng) wrote :

Was having the same problem with kernel 2.6.31-7-generic. Updated to 2.6.31-8-generic and problem fixed.

Revision history for this message
tx (372046933-qq) wrote :

2.6.32-27-generic has the same PROBLEM

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.