[systemd-devel] Sending a SIGABRT to PID1

Mantas Mikulėnas grawity at gmail.com
Sun May 3 09:00:20 PDT 2015


On Sun, May 3, 2015 at 6:18 PM, Víctor Fernández <vfrico at gmail.com> wrote:

> Hello
>
> I'm using rigth now a Manjaro distribution (derived from arch). Making
> some test, i've discovered that sending SIGABRT (6) to PID 1 (systemd) will
> cause system to enter on unstable mode:
>
> after doing this, the system reboot graphic server (at least, it request
> to login again) and if you resend the SIGABRT, the system goes to Kernel
> Panic Mode.
>
> Here is the code I've tested (executing as sudo, of course).
>
> echo "int main(){kill(1,6);kill(1,6);}" > a.c && gcc a.c && sudo ./a.out
>
> It appears not to be a very large problem (since root permisions are
> required), but I think is an undiserable behaviour.
>
> Is this really a bug?
>

No, it is not a bug that a program crashes *when you ask it to crash*. The
whole point of SIGABRT is that it kills the program immediately, when the
program calls abort() after detecting some serious inconsistency.

It is also not a bug that the kernel panics when init exits. Several things
depend on the existence of PID 1.

-- 
Mantas Mikulėnas <grawity at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20150503/6716786c/attachment.html>


More information about the systemd-devel mailing list