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

Daniel Wang wonderfly at google.com
Wed Nov 1 17:32:38 UTC 2017


Thanks Lennart.

On Wed, Nov 1, 2017 at 12:55 AM, Lennart Poettering <lennart at poettering.net>
wrote:

> On Di, 31.10.17 17:04, Daniel Wang (wonderfly at 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
>



-- 
Best,
Daniel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20171101/84fc2c4c/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4849 bytes
Desc: S/MIME Cryptographic Signature
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20171101/84fc2c4c/attachment.bin>


More information about the systemd-devel mailing list