From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751758AbbKJTYF (ORCPT ); Tue, 10 Nov 2015 14:24:05 -0500 Received: from mx1.redhat.com ([209.132.183.28]:54941 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750992AbbKJTYD (ORCPT ); Tue, 10 Nov 2015 14:24:03 -0500 Date: Tue, 10 Nov 2015 21:20:07 +0100 From: Oleg Nesterov To: Andrey Ryabinin Cc: Roland McGrath , Tejun Heo , LKML Subject: Re: ptrace() hangs on attempt to seize/attach stopped & frozen task Message-ID: <20151110201950.GA4925@redhat.com> References: <5640B7F2.70406@virtuozzo.com> <20151109185506.GA22744@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20151109185506.GA22744@redhat.com> User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/09, Oleg Nesterov wrote: > > Hi, > > On 11/09, Andrey Ryabinin wrote: > > > > Hi, > > > > So, the ptrace() hangs if we try to attach to stopped task from freezing cgroup. > > It seems this was introduced by 5d8f72b55c2756("freezer: change ptrace_stop/do_signal_stop to use freezable_schedule()"). > > quite possible... Not really, this was broken before that commit. Note that try_to_freeze() was called under "relock:" label, so we had the same problem: the tracee doesn't do do_jobctl_trap() after do_signal_stop() without try_to_freeze() in between. Not that it matters, but still. Oleg.