From owner-freebsd-stable@freebsd.org Fri Apr 2 22:49:47 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 0FDFB5B5752 for ; Fri, 2 Apr 2021 22:49:47 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-oi1-f178.google.com (mail-oi1-f178.google.com [209.85.167.178]) (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 4FBwGy6nWFz4Wyn for ; Fri, 2 Apr 2021 22:49:46 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-oi1-f178.google.com with SMTP id w70so6239769oie.0 for ; Fri, 02 Apr 2021 15:49:46 -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=bBSdUu+0I4BwjTAbnrVUYw7OgrZgHTMGgNRYCoj7+DU=; b=beFXLGKD+6qyl4lL89/NZ3o1XHz9+euOPJLnhxI8yr3c/ysZ1PlVdmGOPiUFKxi/6r tVzBp2RB3LZbAl3akx41ln9UZyVpc8cb9GIypqLFPczGH3W2MCgwW5ySUS641mz/dpIc NW1vP55QhzAqvAmFy34ghrB8P+at/A5OPHQ+KOTFE16FITm9IoCGICR41FzgJkH3AFhS FwAwao9b1xmk7fqQ3amNPTDp7lAeWkkmyTMnOZpO8PJ+BsaSJNWqk0rEcvGTVd83yDna m/iPAiNXIMk2h3roMy+Mo3uAZwBrnTZQVEgu6sxbstIhaYGHTrjUSLXzmZsRQVXBogSV Bd9g== X-Gm-Message-State: AOAM530n9xqKPExt4uiLl9AxnvOcyooK8tcuUaOCWm9greCLACosLB+u /3kGflZY6+f1OVhYyJOKlPyiChmSqO8YhmGlV4I= X-Google-Smtp-Source: ABdhPJyhgJvCojmGK/MBr5DppYudvfwHtlVYDzIgYiQSAxaUd+Crnw7kUldNQkv2TwavK2tADpmUIfG/U5DCJIIGLxk= X-Received: by 2002:aca:b06:: with SMTP id 6mr11318303oil.73.1617403785651; Fri, 02 Apr 2021 15:49:45 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Alan Somers Date: Fri, 2 Apr 2021 16:49:34 -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: 4FBwGy6nWFz4Wyn X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] 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:49:47 -0000 On Fri, Apr 2, 2021 at 4:16 PM Rick Macklem wrote: > Alan Somers wrote: > >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. > Hmm. The 12.2 and 13.0 code is the same w.r.t. The only difference I can > think of > is that 13.0 has 4.2 in it and Linux tends to use the newest version > supported by the server. > All mounts were exactly version 4.1. However, I wasn't testing exactly the same Linux kernel version with 12.2 as I did with 13.0. That might be the difference. > > >* 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. > thanks for doing the testing, although it would have been more fun to > crash the Linux systems.;-) > > >I haven't tried backporting the patch to 12.2 yet. > The code hasn't changed in a long time, so it should drop in without > difficulty, but it also > probably doesn't need testing. > > rick > ps: I've already committed it to current/main. > > -Alan >