Oneiric does not shutdown

Bug #859075 reported by Ader
226
This bug affects 52 people
Affects Status Importance Assigned to Milestone
upstart
Invalid
Undecided
Unassigned
linux (Ubuntu)
Invalid
Undecided
Unassigned
sysvinit (Ubuntu)
Confirmed
High
Unassigned

Bug Description

I choose shutdown, and status text appears on screen displaying what it is doing before shutting down. The computer then stops, and does not turn itself off automatically.

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: linux-image-3.0.0-11-generic 3.0.0-11.18
ProcVersionSignature: Ubuntu 3.0.0-11.18-generic 3.0.4
Uname: Linux 3.0.0-11-generic i686
AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.24.
ApportVersion: 1.23-0ubuntu1
Architecture: i386
ArecordDevices:
 **** List of CAPTURE Hardware Devices ****
 card 0: Intel [HDA Intel], device 0: ALC268 Analog [ALC268 Analog]
   Subdevices: 1/1
   Subdevice #0: subdevice #0
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: rasmus 1751 F.... pulseaudio
CRDA: Error: [Errno 2] No such file or directory
Card0.Amixer.info:
 Card hw:0 'Intel'/'HDA Intel at 0xf2a00000 irq 49'
   Mixer name : 'Intel Cantiga HDMI'
   Components : 'HDA:10ec0268,14c00030,00100003 HDA:11c11040,11c10001,00100200 HDA:80862802,80860101,00100000'
   Controls : 18
   Simple ctrls : 10
Date: Sun Sep 25 20:10:35 2011
HibernationDevice: RESUME=UUID=2b6e2720-fea5-4027-a480-95291940fff3
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Release i386 (20110427.1)
ProcEnviron:
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.0.0-11-generic root=UUID=9f019a2f-33bf-4cc8-8f7a-c80ce35f9d50 ro quiet splash vt.handoff=7
RelatedPackageVersions:
 linux-restricted-modules-3.0.0-11-generic N/A
 linux-backports-modules-3.0.0-11-generic N/A
 linux-firmware 1.60
RfKill:
 0: phy0: Wireless LAN
  Soft blocked: no
  Hard blocked: no
SourcePackage: linux
UpgradeStatus: Upgraded to oneiric on 2011-09-24 (1 days ago)
dmi.bios.date: 12/03/2009
dmi.bios.version: 1.17
dmi.board.name: JHL91
dmi.board.version: REFERENCE
dmi.chassis.type: 1
dmi.chassis.version: N/A
dmi.modalias: dmi:bvn:bvr1.17:bd12/03/2009:svn:pn:pvr:rvn:rnJHL91:rvrREFERENCE:cvn:ct1:cvrN/A:

Revision history for this message
Ader (rasmusrim) wrote :
Brad Figg (brad-figg)
Changed in linux (Ubuntu):
status: New → Confirmed
Revision history for this message
Ader (rasmusrim) wrote :

Hibernation works just fine. The computer turns itself off without any fuss, and wakes up again as it should.

Revision history for this message
Ader (rasmusrim) wrote :

Here's the funny thing. It only hangs on shutdown when I do "sudo shutdown now". If I choose shutdown from the menu in the upper right corner, it shuts down and turns itself off just fine.

Revision history for this message
Brad Figg (brad-figg) wrote : Test with newer development kernel (3.0.0-12.19)

Thank you for taking the time to file a bug report on this issue.

However, given the number of bugs that the Kernel Team receives during any development cycle it is impossible for us to review them all. Therefore, we occasionally resort to using automated bots to request further testing. This is such a request.

We have noted that there is a newer version of the development kernel than the one you last tested when this issue was found. Please test again with the newer kernel and indicate in the bug if this issue still exists or not.

If the bug still exists, change the bug status from Incomplete to Confirmed. If the bug no longer exists, change the bug status from Incomplete to Fix Released.

Thank you for your help, we really do appreciate it.

Changed in linux (Ubuntu):
status: Confirmed → Incomplete
tags: added: kernel-request-3.0.0-12.19
Revision history for this message
Andy Whitcroft (apw) wrote :

Could you also test whether "sudo shutdown -P now" works as expected. There is a change in oneiric to honour the poweroff flag which means that any shutdown which indicates halt will halt the kernel but not power off the system, poweroff will halt the kernel and poweroff the system. This is to fix a long broken upstream behaviour.

Revision history for this message
Ader (rasmusrim) wrote :

Brad Figg: I did a apt-get update apt-get upgrade and it still did not work. I don't know how to install newer kernels than that.
Andy Whitcroft: Shutting down with the -P flag works as expected. So that means that this is not a bug after all?

Revision history for this message
Andy Whitcroft (apw) wrote :

@Ader -- that is correct. There was a long standing bug that shutdown for halt did a power off. This was fixed up for oneiric but a lot of us have finders trained to use the now incorrect incantation. I'll close this one out. Thanks for reporting it.

Changed in linux (Ubuntu):
status: Incomplete → Invalid
Revision history for this message
Montblanc (montblanc) wrote :

I'm experiencing the same, but I'm on Kubuntu and I try to shutdown normally (e.g. Kickoff / Exit / Turn off computer). Is Kubuntu using the "buggy" way to shutdown?

Revision history for this message
PhobosK (phobosk) wrote :

@Andy Whitcroft,
I do not know what exactly do you mean by "fix a long broken upstream behaviour", as all the other distroes i use (Mandriva, Gentoo, SuSe, Fedora) do poweroff after issuing an /sbin/halt command...

Actually Oneiric doesn't honour the user preferences poweroff flag (set in the /etc/default/halt and used by /etc/init.d/halt) at all, and this behaviour is a kinda annoying.

Besides if the halt/poweroff behaviour in Oneiric has been "fixed", there should be a fix for KDM/KDE (probably other desktop environments as well) too, 'cause right now their "Shutdown" command does halt without poweroff....

There is something that really needs fixing and i do not think this bug should be closed... actually bug #809628 is a duplicate...

Revision history for this message
Montblanc (montblanc) wrote : Re: [Bug 859075] Re: Oneiric does not shutdown

@PhobosK I agree that this bug should definitely be reopened, but as I said
in the comment before yours, KDE is not halting too, but it does poweroff. I
have to 'sudo halt -p now' instead of shutting down as *human beings* do!
Il giorno 16/ott/2011 03:45, "PhobosK" <email address hidden> ha scritto:

> @Andy Whitcroft,
> I do not know what exactly do you mean by "fix a long broken upstream
> behaviour", as all the other distroes i use (Mandriva, Gentoo, SuSe, Fedora)
> do poweroff after issuing an /sbin/halt command...
>
> Actually Oneiric doesn't honour the user preferences poweroff flag (set
> in the /etc/default/halt and used by /etc/init.d/halt) at all, and this
> behaviour is a kinda annoying.
>
> Besides if the halt/poweroff behaviour in Oneiric has been "fixed",
> there should be a fix for KDM/KDE (probably other desktop environments
> as well) too, 'cause right now their "Shutdown" command does halt
> without poweroff....
>
> There is something that really needs fixing and i do not think this bug
> should be closed... actually bug #809628 is a duplicate...
>
>
> ** Also affects: upstart
> Importance: Undecided
> Status: New
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/859075
>
> Title:
> Oneiric does not shutdown
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/upstart/+bug/859075/+subscriptions
>

Revision history for this message
PhobosK (phobosk) wrote :

@Montblanc,
I had already made some remarks in my comment on bug #809628 (https://bugs.launchpad.net/upstart/+bug/809628/comments/10) before i found this bug.

There is an ugly workaround that may help you with this...

Add to your /etc/sudoerrs (using sudoedit):
ALL ALL=NOPASSWD:/sbin/halt

and then create a "shortcut" on your KDE desktop to "sudo /sbin/halt -p" and use it instead of "Kickoff -> Exit -> Turn off computer"

But this is too ugly compared to a system that is honouring the /etc/init.d/halt script (taking its config options from /etc/default/halt)

Revision history for this message
ghostcube (ghostcube) wrote :

hi guys, got the following hint from kubuntu-devel irc channel.

check
systemsettings >> login screen >> shutdown

and change the command to "/sbin/shutdown -h -P now"

greetz

Revision history for this message
Stevan Kew Ell (slql) wrote :

I can confirm the same issue applies to Xubuntu. It's not so easy to alter /usr/lib/xfce4/session/xfsm-shutdown-helper to include the settings suggested to KDE.

Also, while the system never seems to power down when choosing the logout button, there is a slight difference when you use the laptop's power button to initiate shutdown. When using that method, the system sometimes powers off and sometimes doesn't, with no obvious difference between success and failure.

S

Revision history for this message
Clint Byrum (clint-fewbar) wrote :

So it sounds like there *is* a real bug in kde and XFCE. This is not in fact a bug in upstart however, as it is doing exactly as each name implies. Halting is an uncommon but real need for some systems where one wants to specifically stop the kernel and everything, and then do a hard reset without powering off. So whats needed is for KDE and XFCE to pass -P to shutdown, and possibly for whatever handles the power button do do the same.

Changed in upstart:
status: New → Invalid
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

affects: xfce4 (Ubuntu) → xfce4-session (Ubuntu)
Changed in xfce4-session (Ubuntu):
status: New → Confirmed
Montblanc (montblanc)
Changed in meta-kde (Ubuntu):
status: New → Confirmed
Revision history for this message
Stevan Kew Ell (slql) wrote :

@clint-fewbar #14 - yes, I would say that that is the case. It looks to my inexpert eye that the -P option is NOT part of the poweroff options in /usr/lib/xfce4/session/xfsm-shutdown-helper. What bothers me is the inconsistent nature of using the physical switch to initiate a shut down. I don't see why that sometimes works, as I thought is simply called xfsm-shutdown-helper.

S

Revision history for this message
ghostcube (ghostcube) wrote :

hmm ok "/sbin/shutdown -h -P now" doesnt work on my kubuntu.
any more ideas so far?

Revision history for this message
PhobosK (phobosk) wrote :

@Clint Byrum,

I do not think it is right to invalidate the bug for upstart.

As i had already said there is a shutdown script in the package "initscripts" -> /etc/init.d/halt.
It takes its config options from /etc/default/halt and it controls what the computer will do when shutting down - halt or poweroff.
The problem is that since the change in the upstart's halt command, this init script stopped working...

Considering the fact that some of the desktop managers use just the halt or shutdown commands to poweroff a pc, i think changes should be made in the upstart package, so the user be able to choose what the halt command actually does (probably move the halt init script to upstart or whatever). The default state of halt should be using poweroff like all other distroes... and that should be controlled via the init scripts... ..

As a whole this "fix" of halt/poweroff brought too much problems that need addressing.... Of course we are mostly talking about the upgrade of older Ubuntu versions situations anyway...

Revision history for this message
PhobosK (phobosk) wrote :

@ghostcube,
make sure you have these in your /etc/kde4/kdm/kdmrc file:

[Shutdown]
BootManager=Grub
HaltCmd=/sbin/shutdown -h -P now
RebootCmd=/sbin/shutdown -r now

then restart kdm and please report back...

affects: meta-kde (Ubuntu) → kde-workspace (Ubuntu)
Revision history for this message
Clint Byrum (clint-fewbar) wrote :

PhobosK, I see what you're saying. The default for /etc/default/halt is

HALT=poweroff

/etc/init.d/halt will then pass -p to halt, and the system should power off. If thats not what people are seeing, if 'halt -p' does not poweroff the system, then that would indeed be a bug in the halt command which is part of upstart.

If people can try booting a system with 'quiet' removed from the kernel command lines, and then edit /etc/init.d/halt and add

set -x

As the firs tline after #!/bin/sh,

Then shut the system down..

If it halts instead of powers off, you should be able to see the last command that is run, which will be 'halt'. If it also shows 'halt -p' then that is a bug in upstart. If not, then please check /etc/default/halt

Revision history for this message
Stevan Kew Ell (slql) wrote :

@Clint Byrum (clint-fewbar) Message 20

I have done as you ask, and I can get consistent failures and successes which may help. I am running Xubuntu and carried out all these tests using the shutdown button on the desktop. /etc/default/halt is set to poweroff.

When shutdown powers off the machine, I can confirm that it passes the following settings to halt:-

halt -d -f -i -p -h

I tried this on five occasions and operation is consistent, as long as you boot, and then immediately shut down. However, if you leave the machine for a few minutes, then the shut down process does not get very far at all. It hangs on:-

Killing all running processes.....

which is quite early in the shutdown process, and therefore the issue is not with the halt command but with the shutdown process itself. That's an assumption on my art as I don't really understand the way upstart handles this.

I assume that shutting down immediately means upstart is still running, while leaving it a few minutes means upstart finishes its processes.

I tried this on half a dozen occasions, leaving the machine for 3 minutes and get consistent results.

I hope this helps.

S

Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Excerpts from Stevan Kew Ell's message of Wed Oct 19 05:58:28 UTC 2011:
> @Clint Byrum (clint-fewbar) Message 20
>
> I have done as you ask, and I can get consistent failures and successes
> which may help. I am running Xubuntu and carried out all these tests
> using the shutdown button on the desktop. /etc/default/halt is set to
> poweroff.
>
> When shutdown powers off the machine, I can confirm that it passes the
> following settings to halt:-
>
> halt -d -f -i -p -h
>
> I tried this on five occasions and operation is consistent, as long as
> you boot, and then immediately shut down. However, if you leave the
> machine for a few minutes, then the shut down process does not get very
> far at all. It hangs on:-
>
> Killing all running processes.....
>
> which is quite early in the shutdown process, and therefore the issue is
> not with the halt command but with the shutdown process itself. That's
> an assumption on my art as I don't really understand the way upstart
> handles this.
>
> I assume that shutting down immediately means upstart is still running,
> while leaving it a few minutes means upstart finishes its processes.
>
> I tried this on half a dozen occasions, leaving the machine for 3
> minutes and get consistent results.
>
> I hope this helps.
>

That is fairly interesting, but may be a red herring.

The code that prints that out basically just runs killall5 -9 with any pids
still running as arguments. After that it will exit, so I suspect the
problem is further down.

There are quite a few scripts between sendsigs and halt..

lrwxrwxrwx 1 root root 18 2010-10-22 13:47 S20sendsigs -> ../init.d/sendsigs
lrwxrwxrwx 1 root root 17 2010-10-22 13:47 S30urandom -> ../init.d/urandom
lrwxrwxrwx 1 root root 22 2010-10-22 13:47 S31umountnfs.sh -> ../init.d/umountnfs.sh
lrwxrwxrwx 1 root root 20 2011-07-14 13:34 S35networking -> ../init.d/networking
lrwxrwxrwx 1 root root 18 2010-10-22 13:47 S40umountfs -> ../init.d/umountfs
lrwxrwxrwx 1 root root 20 2011-07-21 13:55 S48cryptdisks -> ../init.d/cryptdisks
lrwxrwxrwx 1 root root 26 2011-07-21 13:55 S59cryptdisks-early -> ../init.d/cryptdisks-early
lrwxrwxrwx 1 root root 20 2010-10-22 13:47 S60umountroot -> ../init.d/umountroot
lrwxrwxrwx 1 root root 14 2010-10-22 13:47 S90halt -> ../init.d/halt

Would be helpful to mod them all with 'set -x' so we can see what the
last command is before the system fails to shut down.

Revision history for this message
Stevan Kew Ell (slql) wrote :

Yes, I'm sorry if my lack of understanding about the shutdown process results in false assumptions.

I've added "set -x" to the files mentioned in /etc/init.d

The hang happens, for me, on the nfs umounting. The last four lines are:-

exec
[ /nfs/home ]
[ no = no ]
fstab-decode umount -f -l /nfs/home

And then it just sticks at that point.

The relevant line in /etc/fstab is
tnc:/home /nfs/home nfs defaults 0 2

I'll try altering some NFS options and see if that makes a difference.

S

Revision history for this message
Stevan Kew Ell (slql) wrote :

It's an NFS umount issue.

I've now tried using Natty's umountnfs.sh, but there's no difference, and
I've also tried altering fstab to use an IP address rather than a name. No
difference to the failure.

The immediate shutdown inconsistency is because the NFS mount hasn't yet
happened, triggered by networkmanager. As soon as NFS is mounted, the
system will not shut down.

Conversely, if I unmount NFS manually before trying to shut down, shutdown works correctly every time.

So I do not believe this has anything to do with the halt command.

It would be interesting to know if others with this problem also use NFS
mounts.

S

Revision history for this message
Montblanc (montblanc) wrote :

@Stevan I don't have any NFS partitions, so yours might be a different bug, or so I think.

Revision history for this message
Stevan Kew Ell (slql) wrote :

@montblanc - do you have any remote file systems, perhaps samba, mounted? I think the error occurs in the umountfs script, which, I think (bit may be wrong) affects all mounted file syystems.
S

Revision history for this message
Montblanc (montblanc) wrote :

@Stevan Yes! I'm sharing folders with Samba through Dolphin!

2011/10/20 Stevan Kew Ell <email address hidden>:
> @montblanc - do you have any remote file systems, perhaps samba, mounted?  I think the error occurs in the umountfs script, which, I think (bit may be wrong) affects all mounted file syystems.
> S
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/859075
>
> Title:
>  Oneiric does not shutdown
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/upstart/+bug/859075/+subscriptions
>

Revision history for this message
Stevan Kew Ell (slql) wrote :

@montblanc - I thinks that's definitive - there's something wrong with the umountfs process. I have hashed out my nfs mounts in /etc/fstab the last couple of days and shutting down is flawless.

@clint-fewbar - does this provide enough info for this to be taken further? Many thanks for the "set -x" suggestion.

S

Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Excerpts from Montblanc's message of Thu Oct 20 21:30:35 UTC 2011:
> @Stevan Yes! I'm sharing folders with Samba through Dolphin!
>

Sharing folders is different than mounting remote filesystems.

Can everybody affected just paste the output of 'mount' from a terminal
window?

umountnfs *should* be working, so if its not, there's something screwy.

Revision history for this message
Montblanc (montblanc) wrote :

Here's mine:

$ mount
/dev/sdb1 on / type ext3 (rw,relatime,errors=remount-ro,commit=0)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
udev on /dev type devtmpfs (rw,mode=0755)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
none on /run/shm type tmpfs (rw,nosuid,nodev)
/dev/sda1 on /media/Sicklebird type ext4
(rw,relatime,errors=remount-ro,commit=0)
/dev/sdb5 on /media/sdb5 type ext3 (rw,relatime,errors=remount-ro,commit=0)
/dev/sdc1 on /media/Sturgeon type ext4 (rw,relatime,errors=remount-ro,commit=0)
/dev/sdb6 on /media/sdb6 type ext3 (rw,relatime,errors=remount-ro,commit=0)
/dev/sdb7 on /media/sdb7 type ext3 (rw,relatime,errors=remount-ro,commit=0)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc
(rw,noexec,nosuid,nodev)
cgroup on /dev/cgroup/cpu type cgroup (rw,cpu)

2011/10/21 Clint Byrum <email address hidden>:
> Excerpts from Montblanc's message of Thu Oct 20 21:30:35 UTC 2011:
>> @Stevan Yes! I'm sharing folders with Samba through Dolphin!
>>
>
> Sharing folders is different than mounting remote filesystems.
>
> Can everybody affected just paste the output of 'mount' from a terminal
> window?
>
> umountnfs *should* be working, so if its not, there's something screwy.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/859075
>
> Title:
>  Oneiric does not shutdown
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/upstart/+bug/859075/+subscriptions
>

Revision history for this message
Stevan Kew Ell (slql) wrote :

Mine:-
----------------
/dev/sda3 on / type ext4 (rw,errors=remount-ro,commit=600)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
udev on /dev type devtmpfs (rw,mode=0755)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
tmpfs on /tmp type tmpfs (rw,noatime,mode=1777)
tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
none on /run/shm type tmpfs (rw,nosuid,nodev)
tmpfs on /var/log type tmpfs (rw,noatime,mode=0755)
tmpfs on /var/tmp type tmpfs (rw,noatime,mode=1777)
/dev/sda1 on /boot type ext3 (rw,commit=600)
/dev/sda4 on /home type ext4 (rw,commit=600)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
cgroup on /dev/cgroup/cpu type cgroup (rw,cpu)
gvfs-fuse-daemon on /home/stevan/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=stevan)
tnc:/home on /nfs/home type nfs (rw,addr=192.168.199.15)
--------

Revision history for this message
PhobosK (phobosk) wrote :

Here are they on the two PCs I have upgraded to Oneiric:

PC 1:
/dev/sdc1 on / type ext4 (rw,errors=remount-ro,acl,user_xattr,commit=0)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
udev on /dev type devtmpfs (rw,mode=0755)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
none on /run/shm type tmpfs (rw,nosuid,nodev)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)

PC 2: I will post the PC2 mounts when it is online sorry about that. But since i administer it I am pretty sure no remote mount points exist... even samba is not used at all...

Revision history for this message
Stevan Kew Ell (slql) wrote :

Latest investigation suggests that if a USB disk is plugged in and mounted, shutdown fails too. I'll try to do more tests on this, but again, it would be interesting ti see if others find consistency in this,

S

Revision history for this message
Montblanc (montblanc) wrote :

@Steven so can you shutdown normally unmounting all nfs partitions and
usb disks before the halt command? As you can see, I only have my
internal hard drives mounted and samba daemon running.

2011/10/22 Stevan Kew Ell <email address hidden>:
> Latest investigation suggests that if a USB disk is plugged in and
> mounted, shutdown fails too.  I'll try to do more tests on this, but
> again, it would be interesting ti see if others find consistency in
> this,
>
> S
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/859075
>
> Title:
>  Oneiric does not shutdown
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/upstart/+bug/859075/+subscriptions
>

Revision history for this message
Stevan Kew Ell (slql) wrote :

@montblanc - sorry about the delay in replying. Yes, that's exactly right. If I either disable my nfs mount in fstab, meaning it never mounts the nfs share, or I unmount it before shutting down, then all works perfectly. The moment my machine has a live nfs mount at shutdown time, it gets no further than trying to unmount the share, as demonstrated by clint-fewbar's debugging suggestion of adding "set -x" to scripts. In particular, I think the process in umountfs is the one where the problem occurs (stated carefully, as it may be some other component causing the issue from that script.)

S

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in xfce4-session (Ubuntu):
status: New → Confirmed
Revision history for this message
Montblanc (montblanc) wrote :

@Stevan Thanks. Then I guess what's causing me the same identical issue. I'm attaching my fstab just to let y'all see that I have no NFS mount points. As we stated, samba daemon seems not to be the cause.

Revision history for this message
Stevan Kew Ell (slql) wrote :

Yes, I was wondering about what the break point is - someone here had a USB disk mounted and was experiencing this failure. I've been trying to set check points in umountnfs.sh to see if I can see what may be causing the problem, but I fear I soon run out of knowledge. Great the bug has been flagged as confirmed.
S

Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Ok, the bits that everyone seems to be getting stopped on are in the sysvinit source package, so I've added it as well. I don't think the windowing environments are actually the cause anymore, they should be using what they use and the system's configuration will determine poweroff or not. So closing the other tasks as Invalid.

Changed in sysvinit (Ubuntu):
status: New → Confirmed
importance: Undecided → High
Changed in xfce4-session (Ubuntu):
status: Confirmed → Invalid
Changed in kde-workspace (Ubuntu):
status: Confirmed → Invalid
Revision history for this message
Stevan Kew Ell (slql) wrote :

I think this may be an upstream issue. On a whim, I updated a faithful old Thinkpad running Debian Squeeze to Wheezy, and the same issue occurs there - when I have an NFS mount, it does not shut down, but when I unmount it before shutting down, the machine powers off correctly. I did not go through all the "set -x" routine to confirm, but the behaviour is exactly the same. This worked perfectly under Squeeze, the same as it has worked under Natty.

S

Revision history for this message
Stevan Kew Ell (slql) wrote :

I have a hack that works for me. I should say that I have a very incomplete understanding of the way the umount* files work with each other, but I don't think the hack is likely to affect anything else.

I have edited the file /etc/init.t/umountnfs.sh

Somewhere around line 84, alter the following line:-
fstab-decode umount $FLAGS $DIRS
to

fstab-decode /sbin/umount.nfs $DIRS $FLAGS

Note that the two options need to be switched around to $DIRS $FLAGS

This works on Wheezy too.

S

Revision history for this message
Montblanc (montblanc) wrote :

It's great you found a workaround, Steven, but that can't be applied
on my environment since I don't have any nfs partitions, thus any
/sbin/umountnfs.sh . At this point, I'm not sure anymore we're talking
about the same bug... should I file another bug-report? :(

2011/10/29 Stevan Kew Ell <email address hidden>:
> I have a hack that works for me.  I should say that I have a very
> incomplete understanding of the way the umount* files work with each
> other, but I don't think the hack is likely to affect anything else.
>
> I have edited the file /etc/init.t/umountnfs.sh
>
> Somewhere around line 84, alter the following line:-
> fstab-decode umount $FLAGS $DIRS
> to
>
> fstab-decode /sbin/umount.nfs $DIRS $FLAGS
>
> Note that the two options need to be switched around  to $DIRS $FLAGS
>
> This works on Wheezy too.
>
> S
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/859075
>
> Title:
>  Oneiric does not shutdown
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/upstart/+bug/859075/+subscriptions
>

Revision history for this message
Stevan Kew Ell (slql) wrote :

I wonder if there are other areas of these scripts where perhaps alternatives are possible, but as the entire sysvinit package has been flagged as a high importance issue, perhaps it would be better to wait to see if a proper fix rather than my hack appears. I would suggest you try clint's suggestion if adding "set -x" to the files he discussed, as that should show exactly where the problem occurs on your machine.

S

Revision history for this message
Donatas Glodenis (dgvirtual) wrote :

As for me, I replaced the shutdown command in KDM settings:
/sbin/halt
to
/sbin/halt -p

and it started to work. I am running Kubuntu Oneiric, KDE 4.7.2, on an i386 laptop.

Revision history for this message
kiloxxx (kiloxxx) wrote :

I had the same problem: after the upgrade to Oneiric the system didn't poweroff.
"/sbin/halt" didn't work neither from kdm nor from konsole
"/sbin/halt -p" didn't work too.

I had to replace "/sbin/halt" in kdm with "/sbin/shutdown -h now"

Revision history for this message
Søren Holm (sgh) wrote :

"shutdown -h now" does not work for me. Executing it from the commandline just
ends up with the system saying "Power off" and a frozen cursor (usually it
flahsed but now it is constancly lit)

Revision history for this message
Montblanc (montblanc) wrote :

@Søren you should try setting '/sbin/shutdown -hp' in kdm settings.
'/sbin/halt -p' didn't work for me on kdm, but it was fine from the shell.
Il giorno 12/nov/2011 09:45, "Søren Holm" <email address hidden> ha scritto:

> "shutdown -h now" does not work for me. Executing it from the commandline
> just
> ends up with the system saying "Power off" and a frozen cursor (usually it
> flahsed but now it is constancly lit)
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/859075
>
> Title:
> Oneiric does not shutdown
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/upstart/+bug/859075/+subscriptions
>

Revision history for this message
Csimbi (turbotalicska) wrote :

I have nearly the same problem as the original poster.
Ubuntu server, 64bit.
I just upgraded from 11.04 to 11.10 (Zotac ITX board) - and I did not change any settings in the process so it should work as before.
But.
The system will not power off when it's supposed to - which is scheduled to happen at 23:00 every day (via cron).
It will halt the system but it will not cut the power; I have to hold down the power button to cut the power.
The last two messages are:
* Will now halt...
[ 174.941747] System halted.
Thanks for fixing.

Same as Bug #881792, Bug #809628 and Bug #880240.

Revision history for this message
Csimbi (turbotalicska) wrote :

BTW, wake-on-lan won't work after this. I wonder if it's related.
Since physical access to the hardware is limited, I would appreciate a fast-track resolution on this.
Thank you.

Revision history for this message
Ming Lei (tom-leiming) wrote :

Please try the patch below to see if it can help the issue.

http://marc.info/?l=linux-pm&m=132123391726374&w=2

Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Excerpts from Csimbi's message of Sun Nov 13 09:17:50 UTC 2011:
> I have nearly the same problem as the original poster.
> Ubuntu server, 64bit.
> I just upgraded from 11.04 to 11.10 (Zotac ITX board) - and I did not change any settings in the process so it should work as before.
> But.
> The system will not power off when it's supposed to - which is scheduled to happen at 23:00 every day (via cron).
> It will halt the system but it will not cut the power; I have to hold down the power button to cut the power.
> The last two messages are:
> * Will now halt...
> [ 174.941747] System halted.
> Thanks for fixing.
>
> Same as Bug #881792, Bug #809628 and Bug #880240.

Csimbi, what command are you using to shut down?

You need to do

shutdown -P

To ensure that the system is turned off after halting.

Also if you have limited physical access, I'd recommend a remote serial
console and remote power control, as relying on WoL without the ability
to force the machine *off* is going to be difficult.

Revision history for this message
Stephane Epardaud (stef-inforealm) wrote :

I have the same issue with nfs mounts hanging while shutting down from the Unity shutdown menu.

no longer affects: xfce4-session (Ubuntu)
Revision history for this message
Tipi Koivisto (tipit) wrote :

I was about the report another bug too because my problem is connected to all bugs which Csimbi already listed. Some are listed with x86 but it also affects amd64 arcs. Seems to me that this a really pain in the but.

I can't shut my Lenovo S205 in any other way than pressing the power button. "shutdown" or "poweroff" with any options gives the same result - FREEZE. "shutdown -r 0" as root on the other hand is executed nicely.

Depending on the command or from GUI when trying to shutdown the results are instant freeze or printing "*Will now poweroff", "*Will now halt", "*Checking battery state..." Then I can hear the hardisks shutting down but then it just freezes.

Hibernate or suspend does not work either.

I dont know exactly what above "no longer affects: xfce4-session (Ubuntu)" means but I am running Xubuntu 11.10 using xfce4 sessions.

Revision history for this message
Antonio J. de Oliveira (ajoliveira) wrote :

yes, indeed, it affects xfce4 on amd64. we are here to help when we say issues exist, i do maintain a graphics driver for a long time now because no alternative still exists. This is open source, it is not a good practice to demand for quick corrections, as it is not a good practice to clean up by hiding the head in the sand... The bug is there and it is driving people out to other venues...This is not what we want.

Revision history for this message
Antonio J. de Oliveira (ajoliveira) wrote :

I am not saying that xfce4 is in any way responsible, because if I switch to gome it happens, i believe xfce4 is just on the way.

Revision history for this message
Antonio J. de Oliveira (ajoliveira) wrote :

this looks serious, several times i have put my laptop in the case working, and it has overheated, cas was hot as hell, if one laptop case bursts into fire this will begin having legal implications, is there anything i can do to help?

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

For me, this is somehow related to the rabbitmq service. If I shut this service down from the console, then oneiric will properly power off.

Revision history for this message
Antonio J. de Oliveira (ajoliveira) wrote :

Thanks Andreas, I will conduct trials and in case results are positive I will make a shutdown script. I still have to look at the logs.

Revision history for this message
Christopher Witecki (christopher-witecki) wrote :

Hi, I too am suffering from this problem, however on Debian wheezy. It is definitely related to NFS, only started after I set up my NFS shares. Unfortunately I cannot shutdown my terminal unless I do I hard power off. Hopefully a fix will come down soon. Thanks to the developers for their continued work!

Revision history for this message
yen rio (yenrio) wrote :

Same problem here.
I'm using Kubuntu Oneiric and I can't shutdown my laptop in other way than the power off button.
But it only happens when it's not plugged in.

Revision history for this message
Montblanc (montblanc) wrote :

I just wanted to say that I can shutdown properly from 3.0.0-15.26 on. It was probably another bug, though, since I was having the same issues but no NFS partitions.

Revision history for this message
mityi (mityi) wrote :

in the systemsettings (KDE4.8) systemsettings / login screen / shutdown / bootmanager I chose not used bootmanager and the system shutdown perfectly

Revision history for this message
mityi (mityi) wrote :

 unfortunately, it worked once

Revision history for this message
mityi (mityi) wrote :

P.S. in the file / etc / default / grub I changed the line GRUB_DEFAULT = saved to GRUB_DEFAULT = 0 on and shutdown properly now

Revision history for this message
Fabio Marzocca (thesaltydog) wrote :

I am using Unity, kernel 3.0.0-16-generic 64-bits.

The system reaches "System Halted" but the PC does not shutdown (acpi=off).
No errors in the log.

Revision history for this message
daniele (daniele-email) wrote :

I have the same issue, I also tried different linux cmdline options without success.

root@camera-mythv:~# uname -a
Linux camera-mythv 3.0.0-16-generic #29-Ubuntu SMP Tue Feb 14 12:48:51 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

Revision history for this message
daniele (daniele-email) wrote :

Different cmdline options

Revision history for this message
daniele (daniele-email) wrote :

Maybe I found an workaround for thi issue, it's still under test, but the first 15 shutdown seems ok.

The hang is in the reboot syscall, see strace in attachment.

I enabled those two options in my BIOS (Advanced menu):

Clock to all DIMM/PCI/PCIE [Enabled]
Spread Spectrum [Enabled]

I tried with only one enabled and the system hangs on shutdown.

Revision history for this message
andornaut (andornaut) wrote :

I've also been able to reproduced this bug.

If I include the following line in /etc/fstab, then halt will not power-down the system:

//host/share /media/directory smbfs guest 0 0

Halt does power-down the system when that line is removed.

Revision history for this message
Fabio Marzocca (thesaltydog) wrote :

I have an NFS export on my PC. If I stop nfs-kernel-server, it switches off perfectly. If the NFS services are up, it doesn't switch off.

Revision history for this message
Antonio J. de Oliveira (ajoliveira) wrote :

I have not noticed the behavior on 2 servers running oneiric. On my laptop, migrated to 12.04 the problem persists. I have not shares on it, but I have nfs mounts. I have not noticed false shutdowns when take the laptop to places where fstab cannot mount my shares. What I will try to do next is to umount manually before shutting down.

no longer affects: kde-workspace (Ubuntu)
Revision history for this message
eraserix (eraserix) wrote :

I also observe regular hangs when I try to shutdown the system (12.04). I have normally mounted several cifs-shares.

I generated a kernel core dump when the computer seemed to hang during shutdown. Among a few remaining userspace processes where S31umountnfs and umount. Looking at umountnfs.sh revealed, that it does not just unmount nfs shares, but all kind of network shares (like cifs, coda, etc).

I suppose the problem is that the interface connected to the share is already down when the script is run, which then leads to blocking shutdown.

As a try to work around this problem, I set "Available to all users" in network manager for the connection in question. On a quick test, this seems to work.

Revision history for this message
Antonio J. de Oliveira (ajoliveira) wrote :

@eraserix, I have "available to all users" set, and I still experience the issue.

Revision history for this message
Tipi Koivisto (tipit) wrote :

On Wed, 2012-05-09 at 15:08 +0000, Antonio J. de Oliveira wrote:
> @eraserix, I have "available to all users" set, and I still experience
> the issue.

Same thing here.

>

--
Tipi
Timo-Tuomas Koivisto

Revision history for this message
Fabio Marzocca (thesaltydog) wrote :

Upgraded to 12.04, the issue disappeared.

Revision history for this message
Boerny (b-stader) wrote :

I was affected by this Bug in oneiric and precise.
Kubuntu didn't power off when shutting down.
But i found a solution to the problem here http://weits.blogspot.co.at/2012/02/kubuntu-1204-computer-wont-power-off.html.

The Problem is that in /etc/kde4/kdm/kdmrc "HaltCmd=/sbin/halt"
replace it with "HaltCmd=/sbin/shutdown -P now"

(for good step by step guide follow link)

Solved problem for me.

Revision history for this message
Yannick Drolet (ydrolet) wrote :

You could try the workaround found in this article: http://linux.koolsolutions.com/2009/08/04/howto-fix-linux-hangfreeze-during-reboots-and-restarts/ "reboot=bios" fixed the shutdown and reboot hangs for me.

Run in terminal> sudo nano /etc/default/grub
Edit this line and save> GRUB_CMDLINE_LINUX="reboot=bios"
Run in terminal> sudo update-grub
Restart your PC

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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