From nobody Sun Aug 28 09:04:00 2022 X-Original-To: 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 4MFngZ31Gzz4b9W6 for ; Sun, 28 Aug 2022 09:04:10 +0000 (UTC) (envelope-from SRS0=ij0+=ZA=klop.ws=ronald-lists@realworks.nl) Received: from smtp-relay-int.realworks.nl (smtp-relay-int.realworks.nl [194.109.157.24]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4MFngY10XNz3ngS for ; Sun, 28 Aug 2022 09:04:09 +0000 (UTC) (envelope-from SRS0=ij0+=ZA=klop.ws=ronald-lists@realworks.nl) Date: Sun, 28 Aug 2022 11:04:00 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=klop.ws; s=rw2; t=1661677440; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to; bh=KgCpvecMorASni4WAMZ+IEaRDWCJ59RMP1LC3C0XvS8=; b=NF1yAGjrR1oHE65KbaJ2Wiz6hV5qf1IEVXbN6cJHwe7SxVWxblE4N3Qw6GexkpV5xTcMxS 5ntGvd9uA8tLNyksxmDU42U6EaHXusU4rTdB+Zo7Ir+eR7owH5HP1y+Id+LIaVDIT9tCh/ HS2TJfdg85MYm8QUkKe9MSR9lZPtCfO3hrWeYCf/U/8a9fX+1nfN6QvQE0CVWpzNv1bxaJ T2zKWmYltiPvYpMAiKJWZChBo+C29BF5ftsqTycEIm6nSKBN1q5RsNwyrpbLcNQk5mflq2 /PLQlRZVf29OEQ84KZEZQ8WO2ruU6UcsvuKUjx3NWL+wIAx0K02tBlpWTzyyeA== From: Ronald Klop To: Pete French , stable@freebsd.org Message-ID: <817221085.13327.1661677440487@localhost> In-Reply-To: <0bfcccf8-1a40-326a-912a-734f97dffe4f@twisted.org.uk> Subject: Re: double used hostuuids - Re: NFS issue - newnfs_request: Wrong session srvslot=1 slot=0, freeing free slot!! 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 Content-Type: multipart/alternative; boundary="----=_Part_13326_1183167834.1661677440482" X-Mailer: Realworks (621.116) Importance: Normal X-Priority: 3 (Normal) X-Rspamd-Queue-Id: 4MFngY10XNz3ngS X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=klop.ws header.s=rw2 header.b=NF1yAGjr; dmarc=pass (policy=quarantine) header.from=klop.ws; spf=pass (mx1.freebsd.org: domain of "SRS0=ij0+=ZA=klop.ws=ronald-lists@realworks.nl" designates 194.109.157.24 as permitted sender) smtp.mailfrom="SRS0=ij0+=ZA=klop.ws=ronald-lists@realworks.nl" X-Spamd-Result: default: False [-3.11 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999]; NEURAL_HAM_SHORT(-1.00)[-0.998]; NEURAL_HAM_LONG(-0.91)[-0.911]; MID_RHS_NOT_FQDN(0.50)[]; DMARC_POLICY_ALLOW(-0.50)[klop.ws,quarantine]; FORGED_SENDER(0.30)[ronald-lists@klop.ws,SRS0=ij0@realworks.nl]; R_DKIM_ALLOW(-0.20)[klop.ws:s=rw2]; R_SPF_ALLOW(-0.20)[+ip4:194.109.157.0/24]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; MLMMJ_DEST(0.00)[stable@freebsd.org]; RCVD_COUNT_ZERO(0.00)[0]; ARC_NA(0.00)[]; ASN(0.00)[asn:3265, ipnet:194.109.0.0/16, country:NL]; MIME_TRACE(0.00)[0:+,1:+,2:~]; SUBJECT_ENDS_EXCLAIM(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; TAGGED_FROM(0.00)[=ZA=klop.ws=ronald-lists]; FROM_HAS_DN(0.00)[]; HAS_X_PRIO_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; DKIM_TRACE(0.00)[klop.ws:+]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FROM_NEQ_ENVFROM(0.00)[ronald-lists@klop.ws,SRS0=ij0@realworks.nl] X-ThisMailContainsUnwantedMimeParts: N ------=_Part_13326_1183167834.1661677440482 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Van: Pete French Datum: 28 augustus 2022 10:16 Aan: stable@freebsd.org Onderwerp: Re: double used hostuuids - Re: NFS issue - newnfs_request: Wrong session srvslot=1 slot=0, freeing free slot!! > > > > On 27/08/2022 16:18, Rick Macklem wrote: > > Ronald Klop wrote: > >> On 8/27/22 00:17, 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. > >>> > >>> rick > >> > >> Just a thought. Is it possible/easy to warn about double used hostuuids >from different client IP addresses? > >> Although that will not help this person using Netapp as a server. > > I don't think so. Same hostuuid implies same system, so how does a > > server know they are two different systems? > > - A client could have multiple IP host addresses, so different client > > host IP addresses for a TCP connection does not imply different systems. > > > > I can, however, modify the console message the server generates when > > it sees a session has been replaced to include "check clients have > > unique hostuuids", which might help. > > > > I also plan on adding a sentence to "man mount_nfs" about this, > > since I just had an email discussion with someone else where the > > problem turned out to be "same hostuuids for multiple clients" > > and the loss of sessions on the FreeBSD server was the hint that > > clued me in. > > > > At least I now know this configuration issue exists. > > > > rick > > > > Regards, > > Ronald. > > > > It well worth adding this I think. I didnt realise this about NFSv4, and I do a lot with cloud machines, where I simply clone the discs, and thus ended up with many machines with the same hostid. Took me a while to work out why my NFS was havign issues... > > > -pete. > > > > > > It might help this case if the nfs client combined hostid+ip as a client id. Or include mac address. People tend to change the mac after a clone. Regards, Ronald ------=_Part_13326_1183167834.1661677440482 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit

Van: Pete French <pete@twisted.org.uk>
Datum: 28 augustus 2022 10:16
Aan: stable@freebsd.org
Onderwerp: Re: double used hostuuids - Re: NFS issue - newnfs_request: Wrong session srvslot=1 slot=0, freeing free slot!!


On 27/08/2022 16:18, Rick Macklem wrote:
> Ronald Klop <ronald-lists@klop.ws> wrote:
>> On 8/27/22 00:17, Rick Macklem wrote:
>>> Ganbold Tsagaankhuu <ganbold@gmail.com> wrote:
>>>>> Rick,
>>>>>
>>>>> On Fri, Aug 26, 2022 at 11:18 AM Rick Macklem > ><rmacklem@uoguelph.ca<mailto:rmacklem@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=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.
>>>
>>> rick
>>
>> Just a thought. Is it possible/easy to warn about double used hostuuids >from different client IP addresses?
>> Although that will not help this person using Netapp as a server.
> I don't think so. Same hostuuid implies same system, so how does a
> server know they are two different systems?
> - A client could have multiple IP host addresses, so different client
>    host IP addresses for a TCP connection does not imply different systems.
>
> I can, however, modify the console message the server generates when
> it sees a session has been replaced to include "check clients have
> unique hostuuids", which might help.
>
> I also plan on adding a sentence to "man mount_nfs" about this,
> since I just had an email discussion with someone else where the
> problem turned out to be "same hostuuids for multiple clients"
> and the loss of sessions on the FreeBSD server was the hint that
> clued me in.
>
> At least I now know this configuration issue exists.
>
> rick
>
> Regards,
> Ronald.
>

It well worth adding this I think. I didnt realise this about NFSv4, and I do a lot with cloud machines, where I simply clone the discs, and thus ended up with many machines with the same hostid. Took me a while to work out why my NFS was havign issues...


-pete.






It might help this case if the nfs client combined hostid+ip as a client id. Or include mac address. People tend to change the mac after a clone.

Regards,
Ronald
------=_Part_13326_1183167834.1661677440482--