Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp945795rdb; Tue, 19 Sep 2023 15:30:16 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFQ6ZJ72AiS4L0M/HCAUEGv5lS5TE+Ky+4or+MvBEa0Lb5OslLObxV3ZCZBkS9H2sHVQY7R X-Received: by 2002:a05:6a00:1587:b0:690:1720:aaa5 with SMTP id u7-20020a056a00158700b006901720aaa5mr1118349pfk.9.1695162616619; Tue, 19 Sep 2023 15:30:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695162616; cv=none; d=google.com; s=arc-20160816; b=azhFhWdgdRTXxsyfZgeEsp6si5aFmxI5oL81exPzZMlNAPdn3Wp2kCJH9IBb8lZ+nO wE9xfMM28td1VBFoTKHxzmfZTWW+Ba4v5s7DVWPigeh5JNagAkx2zwiJWj0aP4xBon2d zHYxeJgh9zVyGqKK8PuV1tQFO/u0rvHM/OPbLK0xKqE9Qg4daXNbr6sXTVsMYxX5ADSI EWip90JDdidFodTsyfGuQo65R1fVtEOMMX/A/zmxlHqskTBbihXXoG9rgpb367Go+GAl YYK247A15/2jlJQuFapV4PhWCVv09bdJb5hXfKh0IKdca9oGhOT3AH6g3ahSQQanwtBu 25iw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:references:in-reply-to:subject :cc:to:from:mime-version:content-transfer-encoding:dkim-signature :dkim-signature; bh=9/m8A3mbKNNH8TvVe+YpAdoQ+p+DLTEaMnupopxinzk=; fh=2/nRbjhWQCSnJnnTTPUmup8OnPQ2zL219vxmxLxRyD0=; b=q4jBpHTYPSBSVtF8ilgDKSotoF51nRSnKrGNNsCSfuzGIlblwlv/XJBcvF1TO3ElHu vD+Rcu6VUtRKTp1kwDn6819O7gsfUg9RzGsgD719dkMsf/6NP6ySzyuZaT2p6tLdGUAs Fk29r2qAh/4GtDyWhEADCIvw+ek4wEuL3ZZo46kUDvNWNvRxG1FQu/HAQfGgyfrUqxAi nwVpW9HwdGuwglSJ+PLmQRXUbnBtCtk7ChRPqkQ+iSKsICUqlAIKe4LDhStjEjoE/rue onmQlsjb4qJaLwxgnFmfcJp1DxbGeQk2JKERlH6cmAl/jPeFhEbPjgC00ptbvV86SgrK JHrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=kfYmKLse; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=qwcrpvks; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id j2-20020a63e742000000b00577549e67b9si1998756pgk.589.2023.09.19.15.30.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Sep 2023 15:30:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=kfYmKLse; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=qwcrpvks; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 592D180765C5; Tue, 19 Sep 2023 15:13:40 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233436AbjISWNo (ORCPT + 99 others); Tue, 19 Sep 2023 18:13:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52870 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233519AbjISWNm (ORCPT ); Tue, 19 Sep 2023 18:13:42 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6D475F2 for ; Tue, 19 Sep 2023 15:12:43 -0700 (PDT) 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-out1.suse.de (Postfix) with ESMTPS id 43BAC2294F; Tue, 19 Sep 2023 22:11:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1695161466; 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=9/m8A3mbKNNH8TvVe+YpAdoQ+p+DLTEaMnupopxinzk=; b=kfYmKLsemNw3gNBY7APuh8Jk4Ivl4JIDsenkARVdP3gtp7YyCR1z7QIavivV9asi+B1ikl GV4oX9S0APLgbRZXcqu717W592jDDaKvJ+41XYy5CJC3Ete3AORRI/vYRKlnObVyjH3Xmu VcxeYUnOJ2xAX1chsffP5xrCazTNZ+A= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1695161466; 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=9/m8A3mbKNNH8TvVe+YpAdoQ+p+DLTEaMnupopxinzk=; b=qwcrpvksDWa38j6K2sgvOp1vFS0SW1d7bFqfBcdNLKo0xKpDNSHN1ft9I707vZp56/5eUA ZLRzOnxC0a8mkJAQ== 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 ADAD613458; Tue, 19 Sep 2023 22:11:04 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id FLQKGHgcCmUQOAAAMHmgww (envelope-from ); Tue, 19 Sep 2023 22:11:04 +0000 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 From: "NeilBrown" To: "Chuck Lever" Cc: brauner@kernel.org, "Chuck Lever" , linux-nfs@vger.kernel.org Subject: Re: [PATCH v1] SUNRPC: Remove BUG_ON call sites In-reply-to: <169513768769.145733.5037542987990908432.stgit@manet.1015granger.net> References: <169513768769.145733.5037542987990908432.stgit@manet.1015granger.net> Date: Wed, 20 Sep 2023 08:11:01 +1000 Message-id: <169516146143.19404.11284116898963519832@noble.neil.brown.name> X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Tue, 19 Sep 2023 15:13:41 -0700 (PDT) On Wed, 20 Sep 2023, Chuck Lever wrote: > From: Chuck Lever > > There is no need to take down the whole system for these assertions. > > I'd rather not attempt a heroic save here, as some bug has occurred > that has left the transport data structures in an unknown state. > Just warn and then leak the left-over resources. > > Signed-off-by: Chuck Lever > Acked-by: Christian Brauner > --- > net/sunrpc/svc.c | 9 +++++---- > 1 file changed, 5 insertions(+), 4 deletions(-) > > Changes since v1: > - Use WARN_ONCE() instead of pr_warn() > > diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c > index 587811a002c9..3237f7dfde1e 100644 > --- a/net/sunrpc/svc.c > +++ b/net/sunrpc/svc.c > @@ -575,11 +575,12 @@ svc_destroy(struct kref *ref) > timer_shutdown_sync(&serv->sv_temptimer); > > /* > - * The last user is gone and thus all sockets have to be destroyed to > - * the point. Check this. > + * Remaining transports at this point are not expected. > */ > - BUG_ON(!list_empty(&serv->sv_permsocks)); > - BUG_ON(!list_empty(&serv->sv_tempsocks)); > + WARN_ONCE(!list_empty(&serv->sv_permsocks), > + "SVC: permsocks remain for %s\n", serv->sv_program->pg_name); > + WARN_ONCE(!list_empty(&serv->sv_tempsocks), > + "SVC: tempsocks remain for %s\n", serv->sv_program->pg_name); > > cache_clean_deferred(serv); > > Reviewed-by: NeilBrown The stack trace might not be helpful, but this circumstance really really shouldn't happen so if it ever does, I think we really want as much context as practicable. Thanks, NeilBrown