Bug 812571 - systemctl reboot hangs when commanded from ssh session
systemctl reboot hangs when commanded from ssh session
Status: CLOSED WORKSFORME
Product: Fedora
Classification: Fedora
Component: systemd (Show other bugs)
16
i686 Linux
unspecified Severity unspecified
: ---
: ---
Assigned To: systemd-maint
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-04-14 20:29 EDT by John Griffiths
Modified: 2012-09-14 12:53 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-09-14 12:53:26 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description John Griffiths 2012-04-14 20:29:13 EDT
Description of problem:
When logged in a root through ssh and issuing:
    sync;systemctl reboot;exit
the system hangs and does not reboot.

Version-Release number of selected component (if applicable):
systemd-units-37-17.fc16.i686

How reproducible:
I have tried this on three systems. It works fine on two of the systems and fails on one consistently.

Steps to Reproduce:
1. Log in as root using ssh
2. Issue systemctl reboot;exit commands
  
Actual results:
System hangs. I had to drive over 40 miles round trip to reboot the system. 

The system locks up in some state. The hardware is still running, but it does not respond to the keyboard or mouse and no ports are open. Screen is black. Have to hold the power button for five seconds to get the system to power off. Then re-power to get to boot. Booting seems slow even if there is no fsck done, but after it boots, all seems well.

Expected results:
System should reboot.

Additional info:
This just started happening with the last few kernels. I think it started with kernel-PAE 3.3.1-2.fc16 but it may have been the one before that.

The system that fails is a Dell Precision 380 Workstation with Intel(R) Pentium(R) D CPU 3.00GHz. 

One of the ones that reboots normally is also a Dell with a Intel(R) Pentium(R) 4 CPU 2.40GHz. The other one that reboots is a home built on an Asus motherboard using an AMD Athlon(tm) 64 Processor 3200+.
Comment 1 Michal Schmidt 2012-04-16 06:51:07 EDT
Is the fact, that the reboot is issued from an ssh session, actually important?
I mean, have you confirmed that reboot works fine from a local login?
Comment 2 John Griffiths 2012-04-16 12:28:46 EDT
Reboot works from menu on display manager (I use KDE).

Reboot works from system logout/shutdown/restart widget on toolbar in KDE.

Reboot works from a non-graphic terminal login (tty02) using systemctl reboot.

systemctl reboot hangs when run from a graphical session (kde) when run from an su - session.

systemctl reboot hangs when run from a ssh session when run from an su - session.

systemctl reboot hangs when run from a ssh session using root@host but did get to a point where at least the network was started.

Somewhere along the way, the system got into a start where the graphical system would not start and there were no tty terminal sessions running (ctl-alt-F2(3-6). I found that the network was running and from an ssh session saw that the /tmp/.X0-lock file existed, but the display manager was not running on the screen and the system did not respond to any keyboard actions. I did a systemctl poweroff from the ssh session. When I powered up, the display manager started properly.
Comment 3 Lennart Poettering 2012-04-16 13:58:33 EDT
When this happens, could you please log in via a second ssh session, then run "systemctl list-jobs", and attach the output here?

Also, could you run "pstack" on the reboot process to see where it is hanging? (also attach output here)
Comment 4 Jóhann B. Guðmundsson 2012-04-16 15:32:27 EDT
I hit the same issue on an upgraded F15 to F16 with an .i386 PAE kernel. a while back when a friend of mine had decided to upgrade his a Fedora xbmc media center and the upgrade process or specifically the Gnome part of the upgrading process left him ( more specifically his user account ) with none working ( wireless ) keyboard and no means to reboot the machine ( you got a hand it to those Gnome designers press a key to get reboot in the menu but what happens if you wind up not having any keyboard duh, idiots <sigh> ).

So I rebooted via ssh running the reboot command and it hang, waited for 20 minutes before performing hard reboot got the wireless keyboard working again in Gnome for his user account and tested rebooting locally which work just fine both from multi-user.target and within Gnome itself, then logged again to the machine via ssh and issued the command and it hang again.  

Seem to be hanging on NetworkManager/SSH at that time...
Comment 5 John Griffiths 2012-04-17 11:51:12 EDT
Will try to get the "systemctl list-jobs" and "pstack" data this weekend. This server is in use by others and I try to keep it available during the week days.
Comment 6 John Griffiths 2012-04-19 10:54:53 EDT
Was not able to get list-jobs or pstack data this time. Will try again later.

I got the chance to reboot since a new kernel was pushed.

I opened two ssh sessions into the system. One for root and one for another user which was then su-ed to root. The sync;systemctl reboot was issued from the su root session.

Both ssh sessions were closed by the system.

The system hung on the way down I believe because it happens almost immediately. There is not any terminal available from the system console. Nothing is displayed and the monitor goes into power save mode which indicates there is no video signal.

The system would not allow a new ssh connection; the connection is refused.

The system does respond to ping.

The system did not shutdown. I waited 5 minutes. I had to do a hard power off by holding in the power button on the system.

The system booted normally after power was turned on again.
Comment 7 Lennart Poettering 2012-09-14 10:48:58 EDT
Do you use any more exotic low-level service, such as autofs or so?
Comment 8 John Griffiths 2012-09-14 12:39:16 EDT
This is no longer happening with the new kernel.
Comment 9 Lennart Poettering 2012-09-14 12:53:26 EDT
OK, closing then.

Note You need to log in before you can comment on or make changes to this bug.