Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp8042584rwb; Wed, 23 Nov 2022 14:40:28 -0800 (PST) X-Google-Smtp-Source: AA0mqf7HHNGb3Z792MLshUv0Hq3IpLS0pincpY9JOyLSAt4uUUd+SyOJuPY9+b2KoV6Q+yCQ/YLB X-Received: by 2002:a17:906:e2cb:b0:7ad:c35a:ad76 with SMTP id gr11-20020a170906e2cb00b007adc35aad76mr25627567ejb.705.1669243228433; Wed, 23 Nov 2022 14:40:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669243228; cv=none; d=google.com; s=arc-20160816; b=hEjxpkSv3+cc/GZxgmNqDHbQnHuz8XS1JjmkCWMNsa+rJqE2xX5Rb/DkSPsM/vDUvg y1ZdxHuqA+3w9V4s+/6vtB7aeLzjg7DQh+LaRuLEVKSbrZWX88quUvr54wzoniA6dDbm /qYelp/ynswBcHd41JVfEcYb4fHUyMa5WE/1Viim/hmT1hfCB36YHCiGbIp8rylwq9/b thTW7ngPtcs4AsrhoQlvsysPATOvkdUxkWw7Ta6o/tqBO1kXYsgQ2jgfPb0y5LduJtbo 1go18MmKvb/lutKjQ8yb359OpBiEZQRZLV0Sat2K+b/re3q0wfk59ofAAHjw807JkODi QxQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=fLhGNMHa96/wA+O5cjR8fZn9vorxKNYqL3/+8UVA5TM=; b=lL9J7d1dtSEcvELaNTzJfMaZ68ftLlj8ePNJPwE4BbxKoiV4m0CA7XU62dwDhIbBK2 h9Brdsb/l3in4sxf+E69bxQvNE0d54HnKsLx4kGvVJHYLjgIQm22txr3530cEyc238o9 Hkn1jGrDM3IWPcW2u5SEnaxRnzHF2ywjyuHda/FUXpOTzoz8MaCgBkgLH4/ZGXVtyfTk kZ5iUDz1jI92e6mwdGPkl3km4UN8Iafy9QEIwxvTPoMOnj5IR5wSTtNo5t9ca0Z46ctr V5U5PjOeXPVf+qta8n0yLowSUN36i8iuPM3vVhVzWesd3jd0Qbp2i84nm4Tu6tPqz2XI BGxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pp6MYLpO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qa17-20020a170907869100b0078239e3f846si273893ejc.1.2022.11.23.14.40.07; Wed, 23 Nov 2022 14:40:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pp6MYLpO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229606AbiKWWRn (ORCPT + 88 others); Wed, 23 Nov 2022 17:17:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47322 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229646AbiKWWRe (ORCPT ); Wed, 23 Nov 2022 17:17:34 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3992A421BB; Wed, 23 Nov 2022 14:17:31 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 616C561F4B; Wed, 23 Nov 2022 22:17:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BE67AC433C1; Wed, 23 Nov 2022 22:17:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1669241850; bh=btg/2FUCoDNEAFPa3hm5+j+MaoLTsn2TxcmjRmx15vU=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=pp6MYLpO/6xD7CfM6XlhBQCayufBQ4jG0jC5E68OYEwprmmUJ2giWuTGwbwE+hS9K Z65KBPOF0AHoBKOTrpqkk+VdKP10CNMb8BX3+//XPiU/9cKBvp0TR65IPvP71ChBKO XChe4M0XCwhTw8BG4rHpdsps4DpmgAfW096Hw9dmHYUqEDxNnXiqGkMzaWl9UygZFG +Soge1IYE0M7p/9BgfdOipW5pSJNAztUg/LZqKkGD0zRNb0qVYuUwCL7qDwovLySwX v2fnFgoyN3Fbduyctyg+OO3R+rXyViORu5/omV3VkkINXUvEmlo+WK27SQ6Wkima6p b8NVqkEzgwJPw== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id 668B25C0C71; Wed, 23 Nov 2022 14:17:30 -0800 (PST) Date: Wed, 23 Nov 2022 14:17:30 -0800 From: "Paul E. McKenney" To: Frederic Weisbecker Cc: Pengfei Xu , Lai Jiangshan , Neeraj Upadhyay , Christian Brauner , "Eric W. Biederman" , linux-kernel@vger.kernel.org, heng.su@intel.com, rcu@vger.kernel.org Subject: Re: PID_NS unshare VS synchronize_rcu_tasks() (was: Re: [Syzkaller & bisect] There is task hung in "synchronize_rcu" in v6.1-rc5 kernel) Message-ID: <20221123221730.GK4001@paulmck-ThinkPad-P17-Gen-1> Reply-To: paulmck@kernel.org References: <20221123143758.GA1387380@lothringen> <20221123220648.GA1395324@lothringen> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221123220648.GA1395324@lothringen> X-Spam-Status: No, score=-7.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_HI,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 23, 2022 at 11:06:48PM +0100, Frederic Weisbecker wrote: > On Wed, Nov 23, 2022 at 11:45:50PM +0800, Pengfei Xu wrote: > > On 2022-11-23 at 15:37:58 +0100, Frederic Weisbecker wrote: > > > I have no idea how to solve the situation without violating the pid_namespace > > > rules and unshare() semantics (although I wish unshare(CLONE_NEWPID) had a less > > > error prone behaviour with allowing creating more than one task belonging to the > > > same namespace). > > > > > > So probably having an SRCU read side critical section within exit_notify() is > > > not a good idea, is there a solution to work around that for rcu tasks? > > > > > Thanks for the analysis! > > Add one more information: I tried to revert this commit only on top of > > v6.1-rc5 mainline by script, but it caused kernel make to fail, it could not > > confirm the bisect information is 100% accurate if I could not pass the > > revert step verification. I just provide all the information I could. > > No problem, I managed to reproduce with latest upstream. > I don't think the bisected commit is the culprit though, it may perhaps just make > the issue more likely to happen. Frederic, Boqun, Neeraj, and I dug through this earlier today, and record of our wanderings may be found here: https://docs.google.com/document/d/1hJxgiZ5TMZ4YJkdJPLAkRvq7sYQ-A7svgA8no6i-v8k/edit?usp=sharing It looks like we can break the deadlock within RCU Tasks, but it also looks like the namespace-PID semantics are at best an accident waiting to happen. ;-) Thanx, Paul > Thanks. > > > > > And this issue is too difficult to me. > > If I find more clue, I will update the eamil. > > > > Thanks! > > BR. > > > > > Thanks.