Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp1736092imj; Sun, 10 Feb 2019 09:08:45 -0800 (PST) X-Google-Smtp-Source: AHgI3Ibuy7KPmAYS65Yiplg3a8WOVS7PNs5LJ0scFuozwrQ5ACMdNLov/UfaazHk8NjIdeyhVo8i X-Received: by 2002:a63:515d:: with SMTP id r29mr6036617pgl.350.1549818525465; Sun, 10 Feb 2019 09:08:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549818525; cv=none; d=google.com; s=arc-20160816; b=cC7HrHPQa+5MtpxuWO4KViA6RmpLpMEQKKXiYGyBQWpFdn5fvOKz7m5a5Dl8eHBGgV IJ5MkbRmtB1ZaBwJEg7I/ho4wi+4Ytos/nMd+lIjjutQIdm/E/qRBlsvIerdQvwbXCsw r2+1FT4+c9kR8gWcLOvA2spRxoQNL/yd2QbpvdZewGF85Z8sR2JoEi2CsCehMU1+/CG4 jhUXi2NBmL5yF7asKdQYlmuy+9sjXCb5DkEmZtKyHGNKcVtrbNxCzxEVm1wRy+38Ew0t NUxpi4ZL8KzXA7hbJSblD1XB0SXFvXo0dXNPQJ6attdTW8ZO71x/f0z+P1yykA7Hwt/b di0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:subject:content-transfer-encoding :mime-version:user-agent:message-id:in-reply-to:date:references:cc :to:from; bh=euIOHab+lDo1a1jqKsI3ZibEy4nmIdttVm2Q2ZN/aqc=; b=1KxjQ8NuektfKB7hmQuwblCBw8kmJ79RVE+/AxSEHTiuq+OsWJdR0umR4TJxEpyJJn gPalskdWGf4j483yjQNmaUEd8bKZ/3sLqmAAkxlI1udYc2W8yBv2p47bqGzxUk4ToKGs kB1Td839gBzPL239mVNCcH6LhYAnRDQYz4zXvQDpkbD6D5LNZHfxe0zIncXPFUDWsodj dG84rSyQPSKDMREA6YHDkxMZ1QTpkyBGhR8xPV2SWHfJL/RUNMuVUZ6YRUxh2mKkuWNV gomlwBP0qKn8dC2G9Xbjol8SC6rsPEGM9QLCia5e7ArBEQwDLW2wLd0KOemEel6EQnTz WaEg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=xmission.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id be11si8239664plb.134.2019.02.10.09.07.58; Sun, 10 Feb 2019 09:08:45 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=xmission.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726029AbfBJRGT convert rfc822-to-8bit (ORCPT + 99 others); Sun, 10 Feb 2019 12:06:19 -0500 Received: from out03.mta.xmission.com ([166.70.13.233]:56908 "EHLO out03.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725896AbfBJRGT (ORCPT ); Sun, 10 Feb 2019 12:06:19 -0500 Received: from in02.mta.xmission.com ([166.70.13.52]) by out03.mta.xmission.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.87) (envelope-from ) id 1gssYb-00070c-E0; Sun, 10 Feb 2019 10:06:17 -0700 Received: from ip68-227-174-240.om.om.cox.net ([68.227.174.240] helo=x220.xmission.com) by in02.mta.xmission.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.87) (envelope-from ) id 1gssYR-0007Ef-4z; Sun, 10 Feb 2019 10:06:17 -0700 From: ebiederm@xmission.com (Eric W. Biederman) To: Ivan Delalande Cc: Andrew Morton , Al Viro , Dmitry Safonov <0x7f454c46@gmail.com>, Oleg Nesterov , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Andy Lutomirski References: <20190205025308.GA24455@visor> <20190205131119.3e388a0a1a69c0a041ed87ef@linux-foundation.org> <20190206031029.GB9368@visor> <87pns2q2ug.fsf@xmission.com> <20190209001638.GA14025@visor> Date: Sun, 10 Feb 2019 11:05:52 -0600 In-Reply-To: <20190209001638.GA14025@visor> (Ivan Delalande's message of "Fri, 8 Feb 2019 16:16:38 -0800") Message-ID: <87ftsvmv4f.fsf@xmission.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT X-XM-SPF: eid=1gssYR-0007Ef-4z;;;mid=<87ftsvmv4f.fsf@xmission.com>;;;hst=in02.mta.xmission.com;;;ip=68.227.174.240;;;frm=ebiederm@xmission.com;;;spf=neutral X-XM-AID: U2FsdGVkX19NJYnYnwLROvcJ+QQJmt92auStM1N1DCo= X-SA-Exim-Connect-IP: 68.227.174.240 X-SA-Exim-Mail-From: ebiederm@xmission.com X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on sa02.xmission.com X-Spam-Level: X-Spam-Status: No, score=0.5 required=8.0 tests=ALL_TRUSTED,BAYES_50, DCC_CHECK_NEGATIVE,T_TM2_M_HEADER_IN_MSG,T_TooManySym_01,XMSubLong autolearn=disabled version=3.4.2 X-Spam-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% * [score: 0.4982] * 0.7 XMSubLong Long Subject * 0.0 T_TM2_M_HEADER_IN_MSG BODY: No description available. * -0.0 DCC_CHECK_NEGATIVE Not listed in DCC * [sa02 1397; Body=1 Fuz1=1 Fuz2=1] * 0.0 T_TooManySym_01 4+ unique symbols in subject X-Spam-DCC: XMission; sa02 1397; Body=1 Fuz1=1 Fuz2=1 X-Spam-Combo: ;Ivan Delalande X-Spam-Relay-Country: X-Spam-Timing: total 9954 ms - load_scoreonly_sql: 0.03 (0.0%), signal_user_changed: 2.5 (0.0%), b_tie_ro: 1.75 (0.0%), parse: 0.63 (0.0%), extract_message_metadata: 9 (0.1%), get_uri_detail_list: 1.01 (0.0%), tests_pri_-1000: 3.0 (0.0%), tests_pri_-950: 1.06 (0.0%), tests_pri_-900: 0.85 (0.0%), tests_pri_-90: 24 (0.2%), check_bayes: 22 (0.2%), b_tokenize: 5 (0.1%), b_tok_get_all: 10 (0.1%), b_comp_prob: 1.74 (0.0%), b_tok_touch_all: 3.7 (0.0%), b_finish: 0.52 (0.0%), tests_pri_0: 253 (2.5%), check_dkim_signature: 0.38 (0.0%), check_dkim_adsp: 7 (0.1%), poll_dns_idle: 9645 (96.9%), tests_pri_10: 1.72 (0.0%), tests_pri_500: 9656 (97.0%), rewrite_mail: 0.00 (0.0%) Subject: Re: [PATCH v2] exec: don't force_sigsegv processes with a pending fatal signal X-Spam-Flag: No X-SA-Exim-Version: 4.2.1 (built Thu, 05 May 2016 13:38:54 -0600) X-SA-Exim-Scanned: Yes (on in02.mta.xmission.com) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Ivan Delalande writes: > Hi Eric, > > On Thu, Feb 07, 2019 at 11:13:59PM -0600, Eric W. Biederman wrote: >> I just noticed this. From my patch queue that I intend to send to >> Linus tomorrow. I think this change fixes your issue of getting >> the SIGSEGV instead of the already pending fatal signal. >> >> So I think this fixes your issue without any other code changes. >> Ivan can you verify that the patch below is enough? > > I was having issues with just this patch applied on top of v5.0-rc5 or > the latest master: defunct processes accumulating, exiting processes > that would hang forever, and some kernel functions eating all the CPU > (setup_sigcontext, common_interrupt, __clear_user, do_signal…). > > But using your user-namespace.git/for-linus worked great and I've been > running my reproducer for a few hours now without issue. I'll probably > keep it running over the week-end as it has been unreliable at times, > but it looks promising so far. Sounds. Thank you for finding my tree, and thank you for testing. > A difference I've noticed with your tree (unrelated to my issue here but > that you may want to look at) is when I run my reproducer under > strace -f, I'm now getting quite a lot of "Exit of unknown pid 12345 > ignored" warnings from strace, which I've never seen with mainline. > My reproducer simply fork-exec tail processes in a loop, and tries to > sigkill them in the parent with a variable delay. What was your base tree? My best guess is that your SIGKILL is getting there before strace realizes the process has been forked. If we can understand the race it is probably worth fixing. Any chance you can post your reproducer. It is possible it is my most recent fixes, or it is possible something changed from the tree you were testing and the tree you are working on. Eric