Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp6039024rwn; Mon, 12 Sep 2022 19:52:07 -0700 (PDT) X-Google-Smtp-Source: AA6agR57j35w1lBs7SEC8WqacXOjSWAIcNMCHQ9gTI+YjKwGfBfYf85I5Yu+filS0/kigQREN8Pq X-Received: by 2002:a05:6a00:2402:b0:52c:81cf:8df2 with SMTP id z2-20020a056a00240200b0052c81cf8df2mr30486579pfh.40.1663037527550; Mon, 12 Sep 2022 19:52:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663037527; cv=none; d=google.com; s=arc-20160816; b=fsXgbO1YFWIPNMVj6tGCJ58iN4YdLVZqI/n0C9WwhPKVWHRNLs6v2o+Slf9NBRq8Du 5kw408BYKNnAJA1+oOrubpsA7G3AuRb6sKaTaxVp3kddMZRxttbJTGrTaX0Mdhczagy6 MGWaBxRi+i7UUtkrEkMt0R3NC3kCH3IsGaa2GJtEUb1KtgYb0oJAF7qv+fofry1Edlvu uSz3IghcDQ+DwkfjCKeHjDaH/sgMxIpmeaE3IaZUVYz2p0awDN7d8pkoOSoZobjfQYs7 5ol/rI5M0ZlD3f5oNiEXbKMqJsbbcxDEDFZ0oPG5fA4AugiDfk+/ViPo7mkKq31qhi9E z80Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:feedback-id:dkim-signature:dkim-signature; bh=2Y0K8tT92lqyheJEd8IWcFQWbT2X7STc+YgZ6ML8spM=; b=bfbojpcisdbOSM3KSbv5++x3ePT4caaz2PyyTr2+I/k0BrXsI6+4J/iZ/ADRqzLu/6 R2ZnM/n/G+AzNYSdDBBMFRPAbU12UfxhQKJRyz2FWKW5Q2Xxs2xdvjHRyjwinnf2UC7u 7Q+kpj4E0NBcBZF1ZoELsLXy+M55f2ZLyYgfXjItEE5FdNgkaL+0xs5rq/qLIIrfSFj4 91KK2kUbpK4iSRFVXCs+IRnEmvuG3md+l4Dn+0Kwgk2rkVst5wGDHrnArh77+iDAHmNL dIjTITYpqBQdkqdir9QSuMKSSiYr2ih2bq16UPlC3L3iJtpvx1IfkaAqEQa4fp39FwJQ UujQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@dustymabe.com header.s=fm2 header.b=3YUd3jSF; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=nyhoiDHa; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nw4-20020a17090b254400b001fd7d02c976si10542878pjb.87.2022.09.12.19.51.53; Mon, 12 Sep 2022 19:52:07 -0700 (PDT) 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=@dustymabe.com header.s=fm2 header.b=3YUd3jSF; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=nyhoiDHa; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230008AbiIMCgR (ORCPT + 99 others); Mon, 12 Sep 2022 22:36:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49492 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229888AbiIMCgN (ORCPT ); Mon, 12 Sep 2022 22:36:13 -0400 Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2ACBFE014; Mon, 12 Sep 2022 19:36:12 -0700 (PDT) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id AEB225C00EA; Mon, 12 Sep 2022 22:36:09 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Mon, 12 Sep 2022 22:36:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dustymabe.com; h=cc:cc:content-transfer-encoding:content-type:date:date:from :from:in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm2; t=1663036569; x= 1663122969; bh=2Y0K8tT92lqyheJEd8IWcFQWbT2X7STc+YgZ6ML8spM=; b=3 YUd3jSFrLK17JWXtqIra2VXM3qDEjtNamQv1ZYnq+G6OAqANCDBasFwKTm0XU+x+ XNiQhLsFKT7tnWy8ROlqKru470SSPWd57P9U3b8PLP/yxEOZpY9J7XkAbaqZ6b0G 3i5jqGQA3HpwzKuYG0WwTqko0gOXks/fF0rOMkoTjYOoxSRG3iK1Ic+d1Te+KD8G AC+N2I6QLT3pKwB/GcGayIzQFS0gG0bNHqh3TNNWYQJBDy9j3RaH9C03RyYtow/g dTSp2lnru0Zim5in2Zk7PhnoysLPFA04Lds3bCOPScrRpZjBm4iTPjmtZIAh0cUx fOBNnDxXwvxNq0ixzwTkg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1663036569; x= 1663122969; bh=2Y0K8tT92lqyheJEd8IWcFQWbT2X7STc+YgZ6ML8spM=; b=n yhoiDHaknz2Qj7XFj6LsI8geC7LOVWzev4p78cjf8lW2ZbJr9QMfMSK/T+WwY8VT kOPWOfYRORIe6cmz8P1ECQJrkZjzN3pUPTWKdeuy6QVZARULZkCzpDKXp0X4q6EU 1Es6T7rehmtl0UMPUWus02nP3zOIFyy8SjHj6YPGDNaS9ZPF+ujEtlvmRR9bszdV e3yPZ0K6HSDfpDILJ8J+YKyukM/FhVtIgd8eGUdKVcpHxADB8WuFTm42yW71MFlh +Jgz7jH7Ol7WxlG5xdvTNXkYmfX+AJrFDkKr8TVcTQ1eGdJ/YAEov4CaxAB/B0x0 +Qr7DJho1RGabxlPYRdSA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrfedufedgiedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpeffuhhs thihucforggsvgcuoeguuhhsthihseguuhhsthihmhgrsggvrdgtohhmqeenucggtffrrg htthgvrhhnpeeiffffuefgtdfhgfekfedtkedtteefgfevueelueefueegvdehteeulefg ueekkeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe guuhhsthihseguuhhsthihmhgrsggvrdgtohhm X-ME-Proxy: Feedback-ID: i13394474:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 12 Sep 2022 22:36:08 -0400 (EDT) Message-ID: <95cbd47d-46ed-850e-7d4f-851b35d03069@dustymabe.com> Date: Mon, 12 Sep 2022 22:36:08 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 Subject: Re: regression caused by block: freeze the queue earlier in del_gendisk Content-Language: en-US To: Ming Lei , Christoph Hellwig Cc: Jens Axboe , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-raid@vger.kernel.org References: <017845ae-fbae-70f6-5f9e-29aff2742b8c@dustymabe.com> <20220907073324.GB23826@lst.de> <20220912071618.GA4971@lst.de> From: Dusty Mabe In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE 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 9/12/22 21:55, Ming Lei wrote: > On Mon, Sep 12, 2022 at 09:16:18AM +0200, Christoph Hellwig wrote: >> On Fri, Sep 09, 2022 at 04:24:40PM +0800, Ming Lei wrote: >>> On Wed, Sep 07, 2022 at 09:33:24AM +0200, Christoph Hellwig wrote: >>>> On Thu, Sep 01, 2022 at 03:06:08PM +0800, Ming Lei wrote: >>>>> It is a bit hard to associate the above commit with reported issue. >>>> >>>> So the messages clearly are about something trying to open a device >>>> that went away at the block layer, but somehow does not get removed >>>> in time by udev (which seems to be a userspace bug in CoreOS). But >>>> even with that we really should not hang. >>> >>> Xiao Ni provides one script[1] which can reproduce the issue more or less. >> >> I've run the reproduced 10000 times on current mainline, and while >> it prints one of the autoloading messages per run, I've not actually >> seen any kind of hang. > > I can't reproduce the hang too. I obviously can reproduce the issue with the test in our Fedora CoreOS test suite. It's part of a framework (i.e. it's not simple some script you can run) but it is very reproducible so one can add some instrumentation to the kernel and feed it through a build/test cycle to see different results or logs. I'm willing to share this with other people (maybe a screen share or some written down instructions) if anyone would be interested. > > What I meant is that new raid disk can be added by mdadm after stopping > the imsm container and raid disk with the autoloading messages printed, > I understand this behavior isn't correct, but I am not familiar with > raid enough. > > It might be related with the delay deleting gendisk from wq & md kobj > release handler. > > During reboot, if mdadm does this stupid thing without stopping, the hang > could be caused. > > I think the root cause is that why mdadm tries to open/add new raid bdev > crazily during reboot. > Dusty