Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp753265pxb; Wed, 16 Feb 2022 03:46:20 -0800 (PST) X-Google-Smtp-Source: ABdhPJyGo0q+1OjOuYjCs4vSBWcS9vDOZONobmD5JXiV9TWzcxQqbL0KIwvs17zS/j8T5su7oDqE X-Received: by 2002:a05:6402:294e:b0:40f:905b:dab5 with SMTP id ed14-20020a056402294e00b0040f905bdab5mr2471427edb.103.1645011980196; Wed, 16 Feb 2022 03:46:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645011980; cv=none; d=google.com; s=arc-20160816; b=cW1/JCaWKAEEYUVuXjo83yEHaRbdGNG+KgsC25nmEAiNPh9sNoZimiJHSpKy+LYxbK as5gSA3B7ApNWPE4CaAn9gyPj68w4N9nTQ38mCAT9iF7xd6Nv23gYsGh/8nOM0fbPfj3 hkC6ATyJNwLfWc1O8kNj/9RYu6uxO2gnJDk4UDdliSm/Urn8+y3r7bjnHe5Q621ssEaU LX0WcVwfUK/rEFw60cknPGs4N9Z7PWfPRQd4HTtlLVqzOIowLk2Rq20mzQsOGSgZ1B8s WigWz5auOOBApxet0g39354jdIIDf+ab+zfTzqq8xeVVuGdLwMqzl3uS9JWtE74QoWju PIiQ== 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:subject :from:references:cc:to:content-language:user-agent:mime-version:date :message-id:dkim-signature:dkim-signature; bh=L9+Yeu3hCssm1DnX2Utx6ifmH+5dNqbEfg/BNDzwuCA=; b=HX/pbAw+JQX16jdplSkT7ied2AvUGLlfisWtgLWzuRaaTT1UA1eN8yxsrmOhw8LT0D SElFgqGaiFriL5Gb50ijCJPGDIF0Ha4Nn/e13HuVpWC9WCifsjcBtVahot+ynQvW8Eiw SJyDRrW3G61ApIyeP+SgG13GDM28kR5/QAKD8E3J9FVtndF1/M2oKzik3D2a7caG8rMz litFuHLs8fr1QjlBQyd74lHlUFgKDGARJAfO1ecMPwV5XHrCZUUqmZ71b/pS0CW3FHSy qJen5AEwildWuAB/5NDcMzHZzLuXZLcCN1/iCsbaxsfdCIHrlejXWnK5g/V5nmFhWQiq WJGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=f1mvO8mW; dkim=neutral (no key) header.i=@suse.de; 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=suse.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i17si2040076edc.591.2022.02.16.03.45.57; Wed, 16 Feb 2022 03:46:20 -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=@suse.de header.s=susede2_rsa header.b=f1mvO8mW; dkim=neutral (no key) header.i=@suse.de; 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=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231284AbiBPLcw (ORCPT + 99 others); Wed, 16 Feb 2022 06:32:52 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:42242 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229643AbiBPLcv (ORCPT ); Wed, 16 Feb 2022 06:32:51 -0500 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 88A7E1EC66; Wed, 16 Feb 2022 03:32:39 -0800 (PST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 0E1A51F383; Wed, 16 Feb 2022 11:32:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1645011158; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=L9+Yeu3hCssm1DnX2Utx6ifmH+5dNqbEfg/BNDzwuCA=; b=f1mvO8mWa3qxAfrnnn6xUDrWm874NLgzMvkb2j0LcnYdJi4/euhFVy6ZATEMSUG63cQnuM 4KbxJZT/ji3a9Xqj76fnc5fWmm+4KnRYQgsMsFZ34hpF/DFyPksP4mXeBxNTHn/F9fT9Xh XnmkwuEjt+lQwP6wAuXcm6yO27lKoCI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1645011158; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=L9+Yeu3hCssm1DnX2Utx6ifmH+5dNqbEfg/BNDzwuCA=; b=LpPtYjywAl6GtaWQhWHeHae1Khkxa4osg1FlKgLj5P+SMNBNI86w1+TTeuvkjI1GHfteN6 3Ey5pPGoItBljaCw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id E3D0D13AF3; Wed, 16 Feb 2022 11:32:37 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id D9hXN9XgDGIcMQAAMHmgww (envelope-from ); Wed, 16 Feb 2022 11:32:37 +0000 Message-ID: Date: Wed, 16 Feb 2022 12:32:37 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.4.0 Content-Language: en-US To: =?UTF-8?Q?Markus_Bl=c3=b6chl?= , Christoph Hellwig Cc: Keith Busch , Jens Axboe , Sagi Grimberg , linux-nvme@lists.infradead.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, Stefan Roese References: <20220214095107.3t5en5a3tosaeoo6@ipetronik.com> <20220215191731.GB25076@lst.de> <20220216111841.jaunxn6blouzjleg@ipetronik.com> From: Hannes Reinecke Subject: Re: [RFC PATCH] nvme: prevent hang on surprise removal of NVMe disk In-Reply-To: <20220216111841.jaunxn6blouzjleg@ipetronik.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,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 2/16/22 12:18, Markus Blöchl wrote: > On Tue, Feb 15, 2022 at 08:17:31PM +0100, Christoph Hellwig wrote: >> On Mon, Feb 14, 2022 at 10:51:07AM +0100, Markus Blöchl wrote: >>> After the surprise removal of a mounted NVMe disk the pciehp task >>> reliably hangs forever with a trace similar to this one: >> >> Do you have a specific reproducer? At least with doing a >> >> echo 1 > /sys/.../remove >> >> while running fsx on a file system I can't actually reproduce it. > > We built our own enclosures with a custom connector to plug the disks. > > So an external enclosure for thunderbolt is probably very similar. > (or just ripping an unscrewed NVMe out of the M.2 ...) > > But as already suggested, qemu might also be very useful here as it also > allows us to test multiple namespaces and multipath I/O, if you/someone > wants to check those too (hotplug with multipath I/O really scares me). > Nothing to be scared of. I've tested this extensively in the run up to commit 5396fdac56d8 ("nvme: fix refcounting imbalance when all paths are down") which, incidentally, is something you need if you want to test things. Let me see if I can dig up the testbed. Cheers, Hannes -- Dr. Hannes Reinecke Kernel Storage Architect hare@suse.de +49 911 74053 688 SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nürnberg HRB 36809 (AG Nürnberg), GF: Felix Imendörffer