mailing list of musl libc
 help / color / mirror / code / Atom feed
From: "nathan@nathan7.eu" <nathan@nathan7.eu>
To: musl@lists.openwall.com
Subject: Re: abort() fails to terminate PID 1 process
Date: Sun, 19 Jun 2016 01:20:02 +0000	[thread overview]
Message-ID: <CANHaCVJ6szZ=GXvOigkBSOxNU4OhRa4EHKtOAJ1Gvmt86CNEGw@mail.gmail.com> (raw)
In-Reply-To: <CAHvfa+Oic2pMpw3fb0ZVrJ9be-c3-S1K-JRMnywLxB+EoyVj6w@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1033 bytes --]

It appears that raise(3) only returns after signal handling, and hence the
infinite loop should only be reached if we're hitting this failure case.
Perhaps we should replace it with asm("ud2") and the equivalent on non-x86
arches, causing a SIGILL, which will definitely abort the process.

On Sat, Jun 18, 2016 at 4:32 PM Karl Böhlmark <karl.bohlmark@gmail.com>
wrote:

> Hi!
>
> After running alpine-linux based docker containers for a while we noticed
> some problematic behaviour when one of our services had a memory leak
> causing the process to abort.
>
> Instead of getting abnormal process termination we were seeing the process
> hanging at 100% cpu.
>
> A minimal reproduction of this issue is to run
>
> #include <stdlib.h>
> int main ()
> {
> abort();
> }
>
> with "unshare --fork --pid" so that it runs as PID 1 in it's own PID
> namespace.
>
> Would it be reasonable to add a fallback strategy in abort() for
> terminating processes when the signals don't have any effect?
>
> Karl
>

[-- Attachment #2: Type: text/html, Size: 1557 bytes --]

  reply	other threads:[~2016-06-19  1:20 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-18 20:32 Karl Böhlmark
2016-06-19  1:20 ` nathan [this message]
2016-06-20  9:02 ` Igmar Palsenberg
2016-06-20 10:04   ` Szabolcs Nagy
2016-06-20 12:00     ` Igmar Palsenberg
2016-06-20 19:41       ` Rich Felker
2016-07-03 10:43         ` Igmar Palsenberg
2016-07-03 13:58           ` Rich Felker
2016-07-03 19:58             ` Laurent Bercot
2016-07-03 20:01               ` Rich Felker
2016-07-03 20:20                 ` Laurent Bercot
2016-07-03 20:24                   ` Rich Felker
2016-07-04 13:38               ` Igmar Palsenberg
2016-07-04 13:37             ` Igmar Palsenberg
2016-07-05  3:07               ` Rich Felker
2016-07-30 21:24                 ` Igmar Palsenberg
2016-06-20 10:29 ` Natanael Copa
2016-07-03 22:03 ` Rich Felker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CANHaCVJ6szZ=GXvOigkBSOxNU4OhRa4EHKtOAJ1Gvmt86CNEGw@mail.gmail.com' \
    --to=nathan@nathan7.eu \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).