[systemd-devel] Shutdown problems

Nikolaus Rath Nikolaus at rath.org
Thu Nov 13 12:54:47 PST 2014


Nikolaus Rath <Nikolaus at rath.org> writes:
> Lennart Poettering <lennart at poettering.net> writes:
>> On Sat, 08.11.14 11:16, Nikolaus Rath (Nikolaus at rath.org) wrote:
>>
>>> > Please boot with "systemd.log_level=debug", then make the machine hang
>>> > and check what the last things in the logs say. Maybe then paste that
>>> > somewhere online and post the URL for that here, so that we can have a
>>> > look.
>>> 
>>> Here's the output (obtained by changing log level and remounting earlier
>>> in the debug.sh script):
>>> 
>>> https://dl.dropboxusercontent.com/u/11545826/shutdown.log
>>> 
>>> Thanks for your help!
>>
>> Hmm the logs show that systemd pretty much completed its
>> shutdown. After the message "Cannot finalize remaining DM devices,
>> continuing." the only thing that still runs is the shutdown hooks you
>> used to generate this log, plus either a jump back into your initrd
>> (if your initrd supports that) or the reboot() system call. 
>>
>> If the latter hangs then it's a kernel bug.
>
> reboot -f works fine - could it still be a kernel bug?
>
>> Please check if there are any other scripts in
>> /lib/systemd/system-shutdown/ that might be at fault here.
>
> Nope, none.
>
>> Please check if your initrd is one of those which support jumping back
>> into the initrd on shutdown. For that check if /run/initramfs/shutdown
>> exists during runtime and is executable.
>
> No, /run/initramfs/shutdown does not exist.
>
>> If so, it's probably an
>> initrd problem, please file a bug against your initrd implementation.
>>
>> You appear to be using LVM, I wouldn't be surprised if LVM is broken
>> here, but I cannot help you debugging this, please contact the LVM
>> maintainers in this case.
>
> Is there some indication that LVN is at fault? As I said in my first
> email, the crucial difference seems to be if an X11 console is active or
> not:
>
>  * If I execute "systemctl reboot" while a text console is active,
>    everything works fine.
>
>  * If I execute "systemctl reboot" while the X11 console is active, the
>    system hangs (I tried waiting up to 7 minutes). Furthermore, I am
>    unable to switch to another console with Ctrl+Alt+Fn, the computer
>    becomes unresponsive to the keyboard and the monitor powers down.
>
> On which tty/pty systemctl itself is executed does not matter (I tested
> this by running systemctl in an ssh session from a remote system), it
> only matters which console is currently active.

Some more information:

* if I start a debug-shell on a serial port, at some point the shell
seems to freeze as well.

* if I boot with sysvinit instead of systemd things work fine:

  - The system reboots even if an X11 console is active
  - During the shutdown, I can switch between text consoles and see
    log messages

Any ideas?


Thanks,
Nikolaus
-- 
GPG encrypted emails preferred. Key id: 0xD113FCAC3C4E599F
Fingerprint: ED31 791B 2C5C 1613 AF38 8B8A D113 FCAC 3C4E 599F

             »Time flies like an arrow, fruit flies like a Banana.«


More information about the systemd-devel mailing list