From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1034036AbcIWKWo (ORCPT ); Fri, 23 Sep 2016 06:22:44 -0400 Received: from mx1.redhat.com ([209.132.183.28]:14621 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1033909AbcIWKWk (ORCPT ); Fri, 23 Sep 2016 06:22:40 -0400 Date: Fri, 23 Sep 2016 12:21:41 +0200 From: Oleg Nesterov To: Michal Hocko Cc: LKML , strace-devel@lists.sourceforge.net, Mike Galbraith , Aleksa Sarai Subject: Re: strace lockup when tracing exec in go Message-ID: <20160923102141.GA16189@redhat.com> References: <20160921152946.GA24210@dhcp22.suse.cz> <1474517702.4851.21.camel@gmail.com> <20160922080126.GA11875@dhcp22.suse.cz> <20160922083602.GB11875@dhcp22.suse.cz> <1474537209.5022.8.camel@gmail.com> <20160922095303.GD11875@dhcp22.suse.cz> <1474538945.5022.20.camel@gmail.com> <20160922110925.GE11875@dhcp22.suse.cz> <20160922135301.GF11875@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160922135301.GF11875@dhcp22.suse.cz> User-Agent: Mutt/1.5.18 (2008-05-17) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Fri, 23 Sep 2016 10:22:40 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/22, Michal Hocko wrote: > > --- a/kernel/signal.c > +++ b/kernel/signal.c > @@ -91,6 +91,10 @@ static int sig_ignored(struct task_struct *t, int sig, bool force) > if (!sig_task_ignored(t, sig, force)) > return 0; > > + /* Do not ignore signals sent from child to the parent */ > + if (current->ptrace && current->parent == t) > + return 0; This doesn't look right in general, and this can't really help. This assumes that the tracer will call do_wait() after mm_access() fails, but this is not necessarily true. Note also ptrace_attach(), -ERESTARTNOINTR means that the tracer won't even return to user-space if SIGCHLD is ignored, the tracer will silently restart the syscall. Oleg.