From nobody Sat Aug 27 04:47:01 2022 X-Original-To: freebsd-stable@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4MF41Z5YFmz4ZTS0 for ; Sat, 27 Aug 2022 04:47:14 +0000 (UTC) (envelope-from ganbold@gmail.com) Received: from mail-io1-xd2c.google.com (mail-io1-xd2c.google.com [IPv6:2607:f8b0:4864:20::d2c]) (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 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MF41Y5Jb4z3QpY for ; Sat, 27 Aug 2022 04:47:13 +0000 (UTC) (envelope-from ganbold@gmail.com) Received: by mail-io1-xd2c.google.com with SMTP id n202so2706265iod.6 for ; Fri, 26 Aug 2022 21:47:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc; bh=ZCPUMpGPbeUiSYAn6ATK/wu2h0HErv9rPXzLGaLtDIY=; b=Yw6OzK4taaY8okMGpPbG0fpk8JGIk61ZxEC0o46dm6LPtqTxdHNQ2P9hJDAZYNWYji voTqfcHdc+1pMCTLX61HV5VMMHBtJmnsOQanm8EkiIQvj1sZvss//Khw7+XyxQYMBKEw D6B+mCfZvIG3ClucYhOWaLGSBu/FGh2e+Y3xGHEjP+pAqkRPVGKlwTblJqZ0y5LqLAA9 DOLwqsB5vyrtMnu6N+oUdYVSHAsbkF//wKTxaWEQr4dyHr/Tqqn9ve0rp7vNoiKpxXAh Rp5Qa0w1THiBuduMeep4daY2eJF291vR469Mq3tQrUTW/i+xWsn+jQETTcvU4UnHfFal 5BLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=ZCPUMpGPbeUiSYAn6ATK/wu2h0HErv9rPXzLGaLtDIY=; b=eRVETvU6CjCGaQndG7zdESRPv6D0/90SSIv8bcU4KNc4t1hruS1pcA0GxaHlfj8M/5 NjnInhlfAhkujuGwdwjYnaC4X/FrAsJbIezXZ2ailxWGEDgY+xHOb7o7OxlhaIXCnxoH GoHb/a6M9JY/Fd0XCxvwyJT+a8r4CnAIf3HoCKiUnM+JxK/9ZeF3TgQ3wuDv31opeOfN /UWh1gMFpF9d4S04N+JacbIgPJYsPek7CJvOPnewUuJR0QuTR9YNPbTn2k52sYtIRmnN E+VmTaOJC5SDfqZn9MZC+f6/sGY+N1JXaLdYBJl/cWbvSu4NKx8v4mIPUWoUyJVrVkGb aK9w== X-Gm-Message-State: ACgBeo3iLU0f/MtOoTvk21v7suSbT8N4L0vhWuk1ZaBsXPgOa5q2HEi/ q7nIRcZ/kPbIGpz2JVfvyfJnVpnyIPXn6IdL1ApFG+jpClM= X-Google-Smtp-Source: AA6agR6WX6rl2PxNJGWxkoB93CbMUA+9GI36d96WF0Ra/SNKSSkuX08jw//bTQOUeTjS3Hirk4ju67U0c1BymrF3odA= X-Received: by 2002:a05:6638:40a7:b0:346:99c3:91f2 with SMTP id m39-20020a05663840a700b0034699c391f2mr5519245jam.9.1661575632877; Fri, 26 Aug 2022 21:47:12 -0700 (PDT) List-Id: Production branch of FreeBSD source code List-Archive: https://lists.freebsd.org/archives/freebsd-stable List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-stable@freebsd.org X-BeenThere: freebsd-stable@freebsd.org MIME-Version: 1.0 References: In-Reply-To: From: Ganbold Tsagaankhuu Date: Sat, 27 Aug 2022 12:47:01 +0800 Message-ID: Subject: Re: NFS issue - newnfs_request: Wrong session srvslot=1 slot=0, freeing free slot!! To: Rick Macklem Cc: freebsd-stable Content-Type: multipart/alternative; boundary="0000000000005d7dee05e731b943" X-Rspamd-Queue-Id: 4MF41Y5Jb4z3QpY X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20210112 header.b=Yw6OzK4t; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of ganbold@gmail.com designates 2607:f8b0:4864:20::d2c as permitted sender) smtp.mailfrom=ganbold@gmail.com X-Spamd-Result: default: False [-3.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999]; NEURAL_HAM_LONG(-1.00)[-0.999]; NEURAL_HAM_SHORT(-1.00)[-0.997]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20210112]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; FROM_HAS_DN(0.00)[]; FREEFALL_USER(0.00)[ganbold]; FREEMAIL_FROM(0.00)[gmail.com]; PREVIOUSLY_DELIVERED(0.00)[freebsd-stable@freebsd.org]; ARC_NA(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::d2c:from]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FREEMAIL_ENVFROM(0.00)[gmail.com]; DKIM_TRACE(0.00)[gmail.com:+]; TO_DN_ALL(0.00)[]; MID_RHS_MATCH_FROMTLD(0.00)[]; MLMMJ_DEST(0.00)[freebsd-stable@freebsd.org]; RCPT_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; SUBJECT_ENDS_EXCLAIM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_TLS_LAST(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-ThisMailContainsUnwantedMimeParts: N --0000000000005d7dee05e731b943 Content-Type: text/plain; charset="UTF-8" Rick, On Sat, Aug 27, 2022 at 6:17 AM Rick Macklem wrote: > Ganbold Tsagaankhuu wrote: > > > Rick, > > > > > > On Fri, Aug 26, 2022 at 11:18 AM Rick Macklem > > > wrote: > Ganbold Tsagaankhuu > wrote: > > > > Hi, > > > > > > > > We are having trouble with NFS running on STABLE: > > > > > > > > Aug 26 02:21:42 iron2 kernel: newnfs_request: Wrong session > srvslot=1 slot=0 > [stuff snipped] > > > > Aug 26 02:22:46 iron2 kernel: newnfs_request: Wrong session > srvslot=1 slot=0 > > > > Aug 26 02:22:46 iron2 kernel: freeing free slot!! > > > > > > > > We are running FreeBSD 13.1-STABLE #3 stable/13-n252198-c1434fd2dea: > Fri Aug 26 01:51:53 UTC 2022 and mount options are: > > > > > > > > rw,nfsv4,minorversion=1,bg,soft,timeo=20,retrans=5,retrycnt=5 > > > > ro,nfsv4,minorversion=1,bg,soft,timeo=20,retrans=5,retrycnt=5 > > > > > > > > Is there any fix for this issue? > Oh, and one more thing. If you have multiple clients mounting the > NFSv4 server, make sure they all have unique hostids. > Check /etc/hostid and "sysctl kern.hostuuid". If two clients have the > same kern.hostuuid, there will be lots of trouble. > I see, we have 2 servers (NFS clients) running: FreeBSD 13.1-STABLE #1 stable/13-n252199-9644bc4a112 FreeBSD 13.1-STABLE #3 stable/13-n252198-c1434fd2dea and no more errors so far. However 2 servers have the same hostid. We will fix that and also will use hard mounts. thanks a lot, Ganbold > > rick > > > - Don't use "soft" mounts. See the Bugs section of "man mount_nfs". > > There are patches in stable/13 dated July 10, 2022. (I have no idea > > how to tell if n252198 would have them) that help, but use of "soft" > > mounts will never work correctly for NFSv4. > > - The attached small patch (not committed yet, but should be in > > stable/13 in about 10days) fixes a couple of corner cases. If you > > are using a FreeBSD NFS server, I believe these corner cases only > > occur after the NFS server reboots. > > > > rick > > ps: If you test the attached patch, please let me know how it goes. > > > > Is this patch for NFS server? We are using Netapp NFS server on server > side. > No, it is for the client. However, as far as I know, a Netapp Filer never > generates a NFSERR_BADSESSION error (except maybe if you were using > a post-July 10. 2022 client), so the patch probably doesn't affect you. > (Get rid of "soft" and you should be happy.) > > rick > > thanks, > > Ganbold > > > > thanks a lot, > > Ganbold > > > --0000000000005d7dee05e731b943 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Rick,

On Sat, Aug 27, 2022 at 6:17 AM Rick Macklem <= ;rmacklem@uoguelph.ca> wrote= :
Ganbold Tsagaa= nkhuu <ganbold@gm= ail.com> wrote:
> > Rick,
> >
> > On Fri, Aug 26, 2022 at 11:18 AM Rick Macklem > ><rmacklem@uoguelph.ca<mailto:rmack= lem@uoguelph.ca>> wrote:
Ganbold Tsagaankhuu <ganbold@gmail.com<mailto:ganbold@gmail.com>> wrote:
> > > Hi,
> > >
> > > We are having trouble with NFS running on STABLE:
> > >
> > > Aug 26 02:21:42 iron2 kernel: newnfs_request: Wrong session = srvslot=3D1 slot=3D0
[stuff snipped]
> > > Aug 26 02:22:46 iron2 kernel: newnfs_request: Wrong session = srvslot=3D1 slot=3D0
> > > Aug 26 02:22:46 iron2 kernel: freeing free slot!!
> > >
> > > We are running FreeBSD 13.1-STABLE #3 stable/13-n252198-c143= 4fd2dea: Fri Aug 26 01:51:53 UTC 2022 and mount options are:
> > >
> > > rw,nfsv4,minorversion=3D1,bg,soft,timeo=3D20,retrans=3D5,ret= rycnt=3D5
> > > ro,nfsv4,minorversion=3D1,bg,soft,timeo=3D20,retrans=3D5,ret= rycnt=3D5
> > >
> > > Is there any fix for this issue?
Oh, and one more thing. If you have multiple clients mounting the
NFSv4 server, make sure they all have unique hostids.
Check /etc/hostid and "sysctl kern.hostuuid". If two clients have= the
same kern.hostuuid, there will be lots of trouble.
I see, we have 2 servers (NFS clients) running:

<= /div>
FreeBSD 13.1-STABLE #1 stable/13-n252199-9644bc4a112
FreeBSD 13.1-STABLE #3 stable/13-n252198-c1434fd2dea

and no more errors so far.
However 2 servers have the sa= me hostid.=C2=A0
We will fix that and also will use hard mounts.<= /div>

thanks a lot,

Ganbold

=C2=A0

rick

> - Don't use "soft" mounts. See the Bugs section of "= ;man mount_nfs".
>=C2=A0 =C2=A0There are patches in stable/13 dated July 10, 2022. (I hav= e no idea
>=C2=A0 =C2=A0how to tell if n252198 would have them) that help, but use= of "soft"
>=C2=A0 =C2=A0mounts will never work correctly for NFSv4.
> - The attached small patch (not committed yet, but should be in
>=C2=A0 =C2=A0stable/13 in about 10days) fixes a couple of corner cases.= If you
>=C2=A0 =C2=A0are using a FreeBSD NFS server, I believe these corner cas= es only
>=C2=A0 =C2=A0occur after the NFS server reboots.
>
> rick
> ps: If you test the attached patch, please let me know how it goes. >
> Is this patch for NFS server? We are using Netapp NFS server on server= side.
No, it is for the client. However, as far as I know, a Netapp Filer never generates a NFSERR_BADSESSION error (except maybe if you were using
a post-July 10. 2022 client), so the patch probably doesn't affect you.=
(Get rid of "soft" and you should be happy.)

rick

thanks,

Ganbold



thanks a lot,

Ganbold


--0000000000005d7dee05e731b943--