From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/10282 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: abort() fails to terminate PID 1 process Date: Sun, 3 Jul 2016 18:03:05 -0400 Message-ID: <20160703220304.GL15995@brightrain.aerifal.cx> References: Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1467583445 28251 80.91.229.3 (3 Jul 2016 22:04:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 3 Jul 2016 22:04:05 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-10295-gllmg-musl=m.gmane.org@lists.openwall.com Mon Jul 04 00:03:51 2016 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1bJpUI-0005PA-BQ for gllmg-musl@m.gmane.org; Mon, 04 Jul 2016 00:03:38 +0200 Original-Received: (qmail 30351 invoked by uid 550); 3 Jul 2016 22:03:35 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 30290 invoked from network); 3 Jul 2016 22:03:17 -0000 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:10282 Archived-At: On Sat, Jun 18, 2016 at 10:32:23PM +0200, Karl Böhlmark 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 > 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? I've improved the fallback strategy. It's not perfect yet but should mitigate your issue: https://git.musl-libc.org/cgit/musl/commit/?id=0c8bc102f287d3993751d80ba2dffb01e0c8bc7f Rich