Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp5621121ybp; Tue, 8 Oct 2019 05:59:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqzYITopBs/Fhlkzgp5/FTdXRfxyCA+Kw6Lm8KfjSjhjcbXrUHX8bq87TWnhFWtb46ewLlWi X-Received: by 2002:a17:906:230c:: with SMTP id l12mr27878340eja.78.1570539576032; Tue, 08 Oct 2019 05:59:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570539576; cv=none; d=google.com; s=arc-20160816; b=QO4MIwE/eQhq1HnH4DoBrrG9OZsiBhE51f2HyE7SrdbSAxBFHgn28up9hkSBlO0If4 THvwpLHwsVpObgXt4JoiB72dJ5JZXWlGyPV3nV3xyc9IorR1NYTZz0ENJjc8P/yIyDHj YCOH73y0pFhy3zkEfF4TbZBrxsAgfV8RVeQ0E8e+Rf8H7DHidqtk/LwnlsFo+Ksnp7l3 6MjYcWo3sqT3DqBny+pZkDQ/MpHfmmLb4ExA7GLrBMi8GAajUBaCsqOhx0ozYFOyS4A+ mbXxuAhK0RQjxcVMymtv3asy1+EFdCQ9mSUBNfRQWvkCZMbunRgSmvquPUCl/iScTYt3 phTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=AV2pJyjjWDwaKVr64wvB1gpLkau4/A2cAtbwElrboN4=; b=gQ1svPIubzzKhzKPIEp8qONom717PEbjtVSjtHAeNhQLHe7dU0BTpXmHnrrnFzzbLv HQnSbqDSdsKch6TUSiB8gvG0hZjJ7kPsX06hy6l5J2zYbNXc1KPQ++Bdfi0/qXNPV4qP fij4zCt14fsG6mR1Roo9RF3G5iqRo9IhgwZ66CL/k/XKChMItoL7JoQbKl/0M9V6lYL/ WEDbPfFKBU4OeAk7WSUzsMLaf1tEDyDgxLV2o6Om6gB1V/uITUoIxgSKi9wVP7Tbxp/T 05L+EbOw1a/tM9dVtCPTSD4t+NsFHLFiNBk4b9jihMDD81spUL9K28ZiA3Nb63EaFV1j CW2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="oGuXSD/d"; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e31si10892750ede.199.2019.10.08.05.59.12; Tue, 08 Oct 2019 05:59:36 -0700 (PDT) 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; dkim=pass header.i=@gmail.com header.s=20161025 header.b="oGuXSD/d"; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731007AbfJHM7C (ORCPT + 99 others); Tue, 8 Oct 2019 08:59:02 -0400 Received: from mail-lf1-f67.google.com ([209.85.167.67]:40436 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730301AbfJHM7B (ORCPT ); Tue, 8 Oct 2019 08:59:01 -0400 Received: by mail-lf1-f67.google.com with SMTP id d17so11875990lfa.7 for ; Tue, 08 Oct 2019 05:59:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=AV2pJyjjWDwaKVr64wvB1gpLkau4/A2cAtbwElrboN4=; b=oGuXSD/dVaEASsZJf+mji2Xv+VvKyMFsMJQ+WdQ1Zjo+hIjf9g014Lf5UtWrM3qZBf d6YccpRj6rQgfNJ707o7eH1QlvHWoB+NbzbkgF6kEnpMiljHT6H0Or7EMiOEkmTLoNj0 lIAMjdRMBbOw43sjodUfnROuAIV7S8YaOlV7Qz2q3DKEQjC9EZuJnPDbGaD9tymsNc7R QP2CWVtGSPsqXWo27Wql0VGs35NvkswD0gal8ggzU0AtDIVmPei4YYrL1elT5rrtw06r HlHX5SKI1lik+LzT7FhBCb4mAYUPIesMiKLEBr+NMDpehk8v138yQr2qdfB1asGo8tZg 60Ew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=AV2pJyjjWDwaKVr64wvB1gpLkau4/A2cAtbwElrboN4=; b=KTnYg6E3jxo7l8A1Er3tQMcaH9RxmGVlddhQFkaBITErVwC++NyOPFRp6hf5lRW523 +vrdZV3XudrTlQ/xsxOaaQMSsE2gItXbw5LlgyQAeYOTkBxDvkU1bvCPGW1Zoi9i24Ne qM2wStz5T4HCZ4Kwfz74qSBYPruqm/tv+hfRszHVy9zJBhKD4UBaK6OwtpC2qEPW20Be JF4qPU5D0ufRsWg1DeXa9Xswz7sxfajOx4IiAZ3dlQJ9VnkYRP99CKT4MZWiXuVPJ0OV Y/o2qbARwFGiGVfB2ZSYblGfLlnsUEOli/l7K+izCI/zFILzHyCvezkrloX/dxk2RfAT re7w== X-Gm-Message-State: APjAAAUnQMzUzvVaShBCLerbSEA9qwOTLSXk4IVu7M0JzQC3/KMliq7q Cup2A/xisCYHyuNIHrzrKrUW6qGOAlSPfH19NGM= X-Received: by 2002:a19:711e:: with SMTP id m30mr20571268lfc.63.1570539539703; Tue, 08 Oct 2019 05:58:59 -0700 (PDT) MIME-Version: 1.0 References: <20191002020100.GA6436@castle.dhcp.thefacebook.com> <20191002181914.GA7617@castle.DHCP.thefacebook.com> <20191004000913.GA5519@castle.DHCP.thefacebook.com> <20191007232754.GB11171@tower.DHCP.thefacebook.com> <20191008123601.GA28621@redhat.com> In-Reply-To: <20191008123601.GA28621@redhat.com> From: Bruce Ashfield Date: Tue, 8 Oct 2019 08:58:47 -0400 Message-ID: Subject: Re: ptrace/strace and freezer oddities and v5.2+ kernels To: Oleg Nesterov Cc: Roman Gushchin , "linux-kernel@vger.kernel.org" , "tj@kernel.org" , Richard Purdie Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 8, 2019 at 8:36 AM Oleg Nesterov wrote: > > On 10/08, Bruce Ashfield wrote: > > > > So I've been looking through the config delta's and late last night, I was > > able to move the runtime back to a failed 4 minute state by adding the > > CONFIG_PREEMPT settings that we have by default in our reference > > kernel. > > Aha... Can you try the patch below? Confirmed. 4 second runtime with that change, 4 minutes with it in the original position. .. I'm kind of shocked I just didn't try that myself, since I spent plenty of time staring at the innards of cgroup_enter_frozen() for enough time to at least get an inkling to try that. I'll run this through some additional testing, but initial results are good. I'm not familiar enough with the semantics at play to even guess at any possible side effects. But do let me know if i can do anything else on this .. and thanks for everyone's patience. Bruce > > Oleg. > > --- x/kernel/signal.c > +++ x/kernel/signal.c > @@ -2205,8 +2205,8 @@ static void ptrace_stop(int exit_code, int why, int clear_code, kernel_siginfo_t > */ > preempt_disable(); > read_unlock(&tasklist_lock); > - preempt_enable_no_resched(); > cgroup_enter_frozen(); > + preempt_enable_no_resched(); > freezable_schedule(); > cgroup_leave_frozen(true); > } else { > -- - Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end - "Use the force Harry" - Gandalf, Star Trek II