shutdown does not poweroff (desktop computer)
Incomplete, Needs information, NormalPublic

Description

Joshua Pritikin wrote on 14. December 2014 03:06:

It gets to "Reached target Shudown." in the console but the power remains on. Is there some setting I need to change so it powers off?

importbot added a subscriber: importbot.

Matthias Klumpp wrote on 04. December 2014 06:15:

How did you trigger the shutdown? (command line? if so, which command? desktop-shell?)
Is kexec-tools installed?

Joshua Pritikin wrote on 04. December 2014 07:04:

I tried shutdown from the root prompt (poweroff). I also tried the shutdown button in gnome. These two means exhibit the same behavior. Eventually, systemd reaches the Shutdown target but the power remains on. I installed tanglu2 (today's snapshot; i386) on a laptop today and find the same behavior there too.

kexec-tools is not installed on any of my machines.

Matthias Klumpp wrote on 04. December 2014 07:08:

Can you follow the debug instructions at http://freedesktop.org/wiki/Software/systemd/Debugging/#index2h1
Is there anything interesting to be found in the journal? (you can tell the journal to display the logs from last boot, it should contain information on what happened during shutdown)

Joshua Pritikin wrote on 04. December 2014 10:04:

+ The shutdown hang is caused by an autofs mounted NFS volume. Without mounting it, shutdown works fine.
+ shutdown -f works fine
+ journalctl --list-boots only shows 1 entry. Do I need to enable a longer history somehow?
+ I tried the instructions given in the link you provided. I couldn't find the shutdown-log.txt file. It is not in /.

Please advise.

Matthias Klumpp wrote on 04. December 2014 11:50:

Replying to [comment:4 jpritikin]:

+ The shutdown hang is caused by an autofs mounted NFS volume. Without mounting it, shutdown works fine.

How do you mount it? If via fstab, do you use the _netdev mount option? If not, can you add it and try again please?
The output of systemctl show mnt-nfs-mount.mount might be helpful too.

+ shutdown -f works fine
+ journalctl --list-boots only shows 1 entry. Do I need to enable a longer history somehow?

Hmm, you should have a persistant journal - how does your /var/log/journal folder look like?

+ I tried the instructions given in the link you provided. I couldn't find the shutdown-log.txt file. It is not in /.

You need to explicitly enable that (using the steps described in the document) - but please try the things above first :-)

Joshua Pritikin wrote on 04. December 2014 21:52:

Replying to [comment:5 matthias]:

Replying to [comment:4 jpritikin]:
> + The shutdown hang is caused by an autofs mounted NFS volume. Without mounting it, shutdown works fine.
How do you mount it? If via fstab, do you use the _netdev mount option? If not, can you add it and try again please?

I believe the mount options are listed in /etc/auto.nfs,

<pre>
store -fstype=nfs,hard,intr,nodev,nosuid router:/tmp/mnt
</pre>

I tried adding _netdev to this list (after nosuid), but it didn't show up when the path was automounted.

The output of systemctl show mnt-nfs-mount.mount might be helpful too.

Attached

+ shutdown -f works fine

> + journalctl --list-boots only shows 1 entry. Do I need to enable a longer history somehow?
Hmm, you should have a persistant journal - how does your /var/log/journal folder look like?

<pre>
root@meerkat:/etc# df -h /var/log/journal
Filesystem Size Used Avail Use% Mounted on
/dev/dm-0 12G 4.8G 5.9G 45% /
root@meerkat:/etc# find /var/log/journal/
/var/log/journal/
/var/log/journal/f3aefb62bc1e4591bbe972dda743e805
/var/log/journal/f3aefb62bc1e4591bbe972dda743e805/system.journal
/var/log/journal/f3aefb62bc1e4591bbe972dda743e805/user-1000.journal
/var/log/journal/10bca24135d246fc93a929214565e5ae
/var/log/journal/10bca24135d246fc93a929214565e5ae/system.journal
/var/log/journal/10bca24135d246fc93a929214565e5ae/user-1001.journal
/var/log/journal/5ac7dfee990b464e80062eb4803842ea
/var/log/journal/5ac7dfee990b464e80062eb4803842ea/system.journal
/var/log/journal/5ac7dfee990b464e80062eb4803842ea/user-1000.journal
/var/log/journal/9b04bf54117943188f7cdc83aa9c5c48
/var/log/journal/9b04bf54117943188f7cdc83aa9c5c48/system.journal
/var/log/journal/9b04bf54117943188f7cdc83aa9c5c48/user-1001.journal
[lots more ...]

root@meerkat:/etc# journalctl --list-boots
0 cf25d96a1d724979940e2b2def1a4434 Thu 2014-12-04 07:40:06 EST—Thu 2014-12-04 07:43:06 EST
</pre>

Matthias Klumpp wrote on 05. December 2014 04:21:

The journal looks okay - the mnt-nfs-mount.mount looks broken...
Which version of systemd/version of Tanglu do you use? I remember that something like this was fixed a long time ago by http://cgit.freedesktop.org/systemd/systemd/commit/?id=7700945

Joshua Pritikin wrote on 05. December 2014 05:04:

tanglu2 systemd 215-6tanglu1

I installed from a daily build just a few days ago. Do I need to dist-upgrade or something?

Matthias Klumpp wrote on 06. December 2014 07:26:

Okay, could you try that with systemd 215-8tanglu1 as well?
(You should get an update notification for that version).

Joshua Pritikin wrote on 07. December 2014 12:04:

Replying to [comment:9 matthias]:

Okay, could you try that with systemd 215-8tanglu1 as well?

<pre>
journalctl --list-boots # still only shows 1 entry
</pre>

When I restart, the behavior is slightly different. There is a long pause while systemd tries to unmount the nfs volume. There was a timer countdown before. Now there is no timer but it succeeds after about a minute. Still, it gets to the end of the process and does nothing. It does not actually restart/shutdown.

Joshua Pritikin wrote on 08. December 2014 08:17:

It seems like the most important problem is that I can't get journalctl to work. If I could provide accurate logs then it should be easier to fix autofs/nfs.

Matthias Klumpp wrote on 14. December 2014 03:06:

Ticket retargeted after milestone closed

Joshua Pritikin wrote on 25. December 2014 03:24:

Would it help to report this against the Debian package? Or would that be counterproductive?

ximion changed the task status from "Open" to "Incomplete".Jul 28 2015, 11:38 AM
ximion added a subscriber: ximion.

Joshua Pritikin wrote on 25. December 2014 03:24:

Would it help to report this against the Debian package? Or would that be counterproductive?

Yes, unless this issue is fixed in the current release of Tanglu already, since we ship a more recent systemd version now - can you please check that?
Cheers,
Matthias