Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 20 Jun 2016 14:00:42 +0200 (CEST)
From: Igmar Palsenberg <>
Subject: Re: abort() fails to terminate PID 1 process

> > First, processes kan install handlers, which might 
> > instruct the kernel to ignore the signal. SIGABORT can be ignored. I don't 
> abort() should terminate the process even if SIGABRT is ignored.

That rule doesn't apply to pid 1 by default. Pid 1 should be a proper init 
system, not a full blows application that makes the system blow up on 
every error.
> > expect my process to be SIGILL'ed next because of this (which, can also be 
> > ignored).
> > Libc should NOT mess with these kind of things, that's up to the 
> > application.
> the glibc fallbacks are
> change signal mask and set default handling for SIGABRT
> raise(SIGABRT);
> "abort instruction" (segfault, sigtrap or sigill depending on target)
> _exit(127);
> infinite loop

Pid 1 is an exception to all of this. 

> on x86 glibc, pid 1 would terminate with SIGSEGV
> (unless there is a segfault handler).
> the musl logic is explained in
> neither of them is correct because it is not possible to
> exit with the right status in general.
> SIGKILL can only be ignored by pid 1 whose exit status is
> not supposed to be observable so musl may want to have a
> fallback after it since the pid namespace thing is nowadays
> widely abused on linux.

Well, normally abort() does some signal magic, and then raises again. 
Which is what POSIX mandates I think.

If you're pid 1 however, you should behave like one.


Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.