[systemd-devel] Is there a way to recover from a crashed systemd without rebooting?

2017-10-31 Thread Daniel Wang
I hit a bug in systemd-232 and it crashed. Anything I tried to do with
`systemctl`, including `systemctl daemon-reexec` seemed to rely on the
systemd dbus service, which all resulted in `Failed to activate service
'org.freedesktop.systemd1': timed out`.

systemd runs as PID 1. Is there any way to recover without a reboot?

-- 
Best,
Daniel


smime.p7s
Description: S/MIME Cryptographic Signature
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Is there a way to recover from a crashed systemd without rebooting?

2017-11-01 Thread Lennart Poettering
On Di, 31.10.17 17:04, Daniel Wang (wonder...@google.com) wrote:

> I hit a bug in systemd-232 and it crashed. Anything I tried to do with
> `systemctl`, including `systemctl daemon-reexec` seemed to rely on the
> systemd dbus service, which all resulted in `Failed to activate service
> 'org.freedesktop.systemd1': timed out`.
> 
> systemd runs as PID 1. Is there any way to recover without a reboot?

When PID 1 crashes by a signal this is caught and PID 1 will freeze,
but first close all file descriptors. This normally means that you
cannot contact it anymore, but you should get immediate failure
replies about any attempts as all communication channels are
terminated and not left hanging.

I wished we could make PID 1 recover fully on such crashes, i.e. by
execing ourselves again on failure signal, however the last time I
looked (which was when we started working on systemd) the kernel
doesn't actually allows reexecing PID 1 anymore after it caught a
deadly signal once...

Long story short: no you cannot recover from PID 1 crashing. Sorry!

Lennart

-- 
Lennart Poettering, Red Hat
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel