Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1146981rwd; Tue, 16 May 2023 12:31:05 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5TvrunH32pudu7PMvRRI4TgnE2oCHSqNEHeruA+30Wqgtj6s5XhNG0HTHNtY3eeyA43C2q X-Received: by 2002:a17:90b:2288:b0:24e:1483:13c4 with SMTP id kx8-20020a17090b228800b0024e148313c4mr37176114pjb.20.1684265464408; Tue, 16 May 2023 12:31:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684265464; cv=none; d=google.com; s=arc-20160816; b=FVxaAMHlQuTGwpxJHkqLrTq84sLyV3LvE75N6m15Bc3/U3a24ZI7jQ2l8EhczBTYsL u5xCYuBzAzWtXGqIQOC7Rpgf5h4uxWA5WdF+xyXieyBW/NlGGt7QpAHzFDbvpZLlFLgB QOe9qv17M680s0wyF8Unr+0GxVQeWXRJ6UrINY48RYJRli8r1G9zkpwW9krylHJcLrAb tKML+mfY/efIUgU8O3BS2IjxXRAfX1E0DpQVh8ecKpx+YwVXWuW4GQrkCTj7F4iL6ixF sqauA7jmFC6rFcW7WmyXo+pkZs7XICGYASLVz52OmiQAm6JGEAw0JIXaM2+SthzpSUwW qQzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:in-reply-to :date:cc:to:from:subject:message-id:dkim-signature; bh=2m499957akIC7fITQmIu8I0Df83xL5g6pWwdqbs40Q8=; b=BNZ41NPgkWP3gTGEwkrVDbiIxgLGxxFMD4zljZ+R/va5UQviJs9oi9Q3ck+qgHEaPu +Ouv0q6h1t4EFjtfb4+3tW7xt62fM02y6uw0TZNFSYwUw9D48f8Ji5yGe3da5eXU5SCJ xWWv6+kIG2zz8gWhU5wH8UK4InVaiZrXB69Iqq7MbdWdBoxnRxrpAR2z931pigXFjJeS dhqXMYPhJtMH/F/IkSAOQWrGkAxMnbcz6VlejpiiW+kFAnYXyFqrvSWmqo/TBeEDiGLV dkmwfcWSYBtOfKdbKtMGu0sY1heoj1EJ/wqmlN7/Il23lxIYgR4Ux/MmM6d69QBA5X/Z YJYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=h95Ueo2W; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-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 k6-20020a17090a404600b0024df993792dsi125224pjg.80.2023.05.16.12.30.38; Tue, 16 May 2023 12:31:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-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=h95Ueo2W; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-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 S229492AbjEPTXr (ORCPT + 99 others); Tue, 16 May 2023 15:23:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49462 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229565AbjEPTXq (ORCPT ); Tue, 16 May 2023 15:23:46 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C608B7AB8 for ; Tue, 16 May 2023 12:23:44 -0700 (PDT) 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 3EBF8633A0 for ; Tue, 16 May 2023 19:23:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E35AEC433A0; Tue, 16 May 2023 19:23:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684265023; bh=AHTGLkEWNe4FtI3CuaotSz2+Drt6D6081z2Ghjay72c=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=h95Ueo2WCtevQ0sq/r76jbswXptkLkWfG5v6s3fSxFC5mVADBSUWoQu04GJiYbled 1uOWbIn7EPZTthgP0rmcxQE+qsm/EhIOQ18l0p/wgu/wNDe5JRLvDhlCMqGovJK+Q/ bb2IlYFvyifXe5XhaG1VzvF8QvXS2cl6WG6KMdBzT1AiugOHXJKww/zHMSAWgfY2II ERBz7aGWU1pw5WketkPMaBU/CDJQAy1UpRsUUVUWWpk6FRNNYmmMmEpipqSHzV9mSa zYDrfOH/t/OAaJVNtYyTeiNMvxWfMfdeoXK8K58EN9MLch8QEqPMhW6vhMWvk0gKnx 0S/vQ4Ky8vfAQ== Message-ID: <569be8e6eff7af373e6baaf2170edb8a8c52f262.camel@kernel.org> Subject: Re: [PATCH v1 26/27] SUNRPC: Set rq_accept_statp inside ->accept methods From: Jeff Layton To: Chuck Lever III , Jiri Slaby , Steve Dickson Cc: Chuck Lever , Linux NFS Mailing List , Neil Brown , Alexander Ahring Oder Aring Date: Tue, 16 May 2023 15:23:41 -0400 In-Reply-To: <4AB1ED03-57C8-42C1-9A04-6C224E98EDCC@oracle.com> References: <167319499150.7490.2294168831574653380.stgit@bazille.1015granger.net> <167319546521.7490.43383592461162363.stgit@bazille.1015granger.net> <3e34a2dc-7d72-b719-248f-e78361db8a5b@kernel.org> <4AB1ED03-57C8-42C1-9A04-6C224E98EDCC@oracle.com> Content-Type: multipart/mixed; boundary="=-igvbfTe4pJo+y8GPA1bU" User-Agent: Evolution 3.48.1 (3.48.1-1.fc38) MIME-Version: 1.0 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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-nfs@vger.kernel.org --=-igvbfTe4pJo+y8GPA1bU Content-Type: text/plain; charset="ISO-8859-15" Content-Transfer-Encoding: quoted-printable On Tue, 2023-05-02 at 14:14 +0000, Chuck Lever III wrote: >=20 > > On May 2, 2023, at 7:01 AM, Jiri Slaby wrote: > >=20 > > On 08. 01. 23, 17:31, Chuck Lever wrote: > > > From: Chuck Lever > > > To navigate around the space that svcauth_gss_accept() reserves > > > for the RPC payload body length and sequence number fields, > > > svcauth_gss_release() does a little dance with the reply's > > > accept_stat, moving the accept_stat value in the response buffer > > > down by two words. > > > Instead, let's have the ->accept() methods each set the proper > > > final location of the accept_stat to avoid having to move > > > things. > >=20 > > Hi, > >=20 > > I bisected to this (4bcf0343e8) >=20 > Assuming you did the bisect on the NFS server's kernel? >=20 >=20 > > as it breaks nfs3-only servers in 6.3. I.e. /etc/nfs.conf containing: > > [nfsd] > > vers4=3Dno >=20 > Note: Changing the settings in /etc/nfs.conf had no effect > on my server, so I effected the change by stopping the > server and poking values into /proc/fs/nfsd/versions by > hand. >=20 > Steve? >=20 >=20 > > The client sees: > > mount("10.0.2.15:/tmp", "/mnt", "nfs", 0, "vers=3D4.2,addr=3D10.0.2.15= ,clientad"...) =3D -1 EIO (Input/output error) > > write(2, "mount.nfs: mount system call fai"..., 45 > > mount.nfs: mount system call failed for /mnt > >=20 > > And the kernel says: > > nfs4_discover_server_trunking unhandled error -5. Exiting with error E= IO > >=20 > > I reported in downstream as: > > https://bugzilla.suse.com/show_bug.cgi?id=3D1210995 > >=20 > > It cannot be reverted cleanly on the top of 6.3. > >=20 > > Any ideas? >=20 > I can reproduce a similar problem. Network capture shows > that the server is responding with NFS4ERR_NOENT to the > EXCHANGE_ID operation, and the client kernel log says: >=20 > > nfs4_discover_server_trunking unhandled error -121. Exiting with error= EIO >=20 > That's not the failure mode I expected given the commit > you bisected to, so it might not be the same problem you've > hit. I'll troubleshoot this and send a fix for testing. >=20 Alex hit this problem in testing too, and I took a quick look. In the attached capture, the client should have gotten back a RPC_PROG_MISMATCH error, but the server has recorded an extra successful accept state before encoding the RPC_PROG_MISMATCH error, leading to a malformed reply. I think that the problem is that encoding the accept status too early means that we can't properly handle failures from the pg_init_request call. Chuck, any thoughts on how you'd like to handle this? --=20 Jeff Layton --=-igvbfTe4pJo+y8GPA1bU Content-Type: application/x-pcapng; name="bad-fallback.pcapng.gz" Content-Disposition: attachment; filename="bad-fallback.pcapng.gz" Content-Transfer-Encoding: base64 Cg0NCrwAAABNPCsaAQAAAP//////////AgAzAEFNRCBSeXplbiA3IDE3MDAgRWlnaHQtQ29yZSBQ cm9jZXNzb3IgKHdpdGggU1NFNC4yKQADACUATGludXggNi4yLjE1LTMwMC5qdGxkcm0uMS5mYzM4 Lng4Nl82NAAAAAQAMwBEdW1wY2FwIChXaXJlc2hhcmspIDQuMC41IChHaXQgY29tbWl0IGU1NTYx NjJkOGRhMykAAAAAALwAAAABAAAAZAAAAAEAAAAAAAQAAgADAGJyMAAJAAEACQAAAAsACgAAcG9y dCAyMDQ5AAAMACUATGludXggNi4yLjE1LTMwMC5qdGxkcm0uMS5mYzM4Lng4Nl82NAAAAAAAAABk AAAABgAAAGwAAAAAAAAAi7FfFxgO8n1KAAAASgAAAFJUAADTfEzMavlGoQgARQAAPPCqQABABsYx wKgBA8CoAYwC9QgBgbx+BgAAAACgAvrwhA4AAAIEBbQEAggKBtM3bwAAAAABAwMHA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