From owner-freebsd-stable@freebsd.org Fri Apr 2 22:00:02 2021 Return-Path: Delivered-To: freebsd-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A2F9B5B41BC for ; Fri, 2 Apr 2021 22:00:02 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-oi1-f181.google.com (mail-oi1-f181.google.com [209.85.167.181]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FBv9Y53m9z4TDj for ; Fri, 2 Apr 2021 22:00:01 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-oi1-f181.google.com with SMTP id c16so6118664oib.3 for ; Fri, 02 Apr 2021 15:00:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=UrpjUrXIi4a9i75DhEl5HX349xcVh8Azvm3Nld+7b3o=; b=rEIgHE3B211STA8KCVYLqq4UO+BFhAPRgI33bkPKcoZMvG3gLDvyyh5/31knMqxkhH Rbn+XqTiK3RtRisL0w2ojtYhFp+834/+MtYIL6cK3vKole1IKD0DSZltuoELu6bVznfe YIPyN2TGBkh7i0ZT5VcgMZt+dp78Fz9XmC2osEJL9wK5sXxperU2KIAQBOMV5s9ldAyX RX6EKVjOfj0zCXgW13HIwe8Ajs6MpKl0crp81/K7jZE29QH1MENcsJkLG96viBrMrZkD 1mRVKwAYtZhb1C81GeNX8/VkMnuhUlhhq4Y9WNlODW+csPVvG2v3zlUS6bimdUsNWT/S DmNQ== X-Gm-Message-State: AOAM533QRblF7FiYdlb724woGPb7wGV1bEiN/ZdAtj1thtkyXJX3ZzOp GlAkTqSpisESxDoa1HJSsbv7RKN7wGPGrSOldco= X-Google-Smtp-Source: ABdhPJwJnzBi3yUTZJtMu329lI4wYmx4K7cEDcDDX5edOE3fWFWYmYP+I85jiqOWXMlkoUfcy3THTXMSojc4zCzI1dI= X-Received: by 2002:aca:3046:: with SMTP id w67mr10868268oiw.57.1617400800565; Fri, 02 Apr 2021 15:00:00 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Alan Somers Date: Fri, 2 Apr 2021 15:59:49 -0600 Message-ID: Subject: Re: FreeBSD NFSv4.1/4.2 server is broken when Linux mounts use "nconnects" To: Rick Macklem Cc: freebsd-stable X-Rspamd-Queue-Id: 4FBv9Y53m9z4TDj X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of asomers@gmail.com designates 209.85.167.181 as permitted sender) smtp.mailfrom=asomers@gmail.com X-Spamd-Result: default: False [-2.99 / 15.00]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; TO_DN_ALL(0.00)[]; NEURAL_HAM_SHORT(-1.00)[-1.000]; RCPT_COUNT_TWO(0.00)[2]; FORGED_SENDER(0.30)[asomers@freebsd.org,asomers@gmail.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RBL_DBL_DONT_QUERY_IPS(0.00)[209.85.167.181:from]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[asomers@freebsd.org,asomers@gmail.com]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.99)[-0.987]; FREEFALL_USER(0.00)[asomers]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; R_DKIM_NA(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-stable@freebsd.org]; DMARC_NA(0.00)[freebsd.org]; SPAMHAUS_ZRD(0.00)[209.85.167.181:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[209.85.167.181:from]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.167.181:from]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-stable] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Apr 2021 22:00:02 -0000 On Mon, Mar 29, 2021 at 3:52 PM Rick Macklem wrote: > Hi, > > The FreeBSD NFS server is broken when handling multiple > connections for NFSv4.1/4.2. > It incorrectly binds the back channel to a new connection > when is sees an RPC with Sequence in it (almost all RPCs) > and might send a callback on the wrong connection. > > I have a fix, but it won't be in a release until 12.3/13.1. > It can be found in Bugzilla PR#254560. > > In the meantime, avoid using the "nconnects" option > on Linux client mounts. > > Thanks go to Ben Coddington @redhat for diagnosing > this and testing the patch. > > Sorry about the breakage, rick > ps: It was done intentionally long ago, when clients > did not do BindConnectionToSession and then slipped > through the cracks. > I've tested the patch and it works. Specifically: * Without the patch and without nconnect, everything works on both 12.2 and 13.0. * Without the patch, with nconnect, and without delegations, everything works on 12.2, but on 13.0 clients lock up when they try file I/O. * Without the patch, with nconnect, and with delegations, clients lock up on both 12.2 and 13.0. * With the patch on 13.0, everything works even with nconnect and delegations. I haven't tried backporting the patch to 12.2 yet. -Alan