From nobody Sun Aug 28 08:15:37 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 4MFmbl6H4Dz4b5tK for ; Sun, 28 Aug 2022 08:15:47 +0000 (UTC) (envelope-from pete@twisted.org.uk) Received: from toybox.twisted.org.uk (toybox.twisted.org.uk [178.250.76.50]) (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 4MFmbk1bdKz3kJ0 for ; Sun, 28 Aug 2022 08:15:46 +0000 (UTC) (envelope-from pete@twisted.org.uk) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=twisted.org.uk; s=x; h=Content-Transfer-Encoding:Content-Type:In-Reply-To: From:References:To:Subject:MIME-Version:Date:Message-ID:Sender:Reply-To:Cc: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=FDu6DmZyZ7JS3q63kPyhmbSrsNI8pVSOZ0FiVlUvUIU=; b=nhnbL6Qru498pHhfy1vg+/ktxL xxj75ak+N50fd0muNRN283QrGGrbnGljJ0KvP3BT1vWj3j2YsIQWruiDHJW93lZBmmhipJaAwildH i42CfULzXMUC1xdi+ibmR1CcF89hJMFD+7HAFTau72BrEnQ42Q/ybhYMkt/caJE/A9MU=; Received: from mailnull by toybox.twisted.org.uk with spamc-scanned (Exim 4.95 (FreeBSD)) (envelope-from ) id 1oSDSD-000Co6-Vo for stable@freebsd.org; Sun, 28 Aug 2022 08:15:38 +0000 X-Spam-Checker-Version: SpamAssassin 3.4.5 (2021-03-20) on toybox.twisted.org.uk X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=ALL_TRUSTED,NICE_REPLY_A, TW_UU,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.5 X-Spam-Score: -0.9 () Received: from balta.twisted.org.uk ([2001:470:6cc4:1::57]) by toybox.twisted.org.uk with esmtpsa (TLS1.3) tls TLS_AES_128_GCM_SHA256 (Exim 4.95 (FreeBSD)) (envelope-from ) id 1oSDSD-000Co2-Tp for stable@freebsd.org; Sun, 28 Aug 2022 08:15:37 +0000 Message-ID: <0bfcccf8-1a40-326a-912a-734f97dffe4f@twisted.org.uk> Date: Sun, 28 Aug 2022 09:15:37 +0100 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 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.13.0 Subject: Re: double used hostuuids - Re: NFS issue - newnfs_request: Wrong session srvslot=1 slot=0, freeing free slot!! Content-Language: en-GB To: stable@freebsd.org References: <54e4240c-2ced-d079-5bfe-f3d397ff7f8f@klop.ws> From: Pete French In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-spamc-toybox: true X-transport-toybox: lookuphost X-Rspamd-Queue-Id: 4MFmbk1bdKz3kJ0 X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=twisted.org.uk header.s=x header.b=nhnbL6Qr; dmarc=none; spf=pass (mx1.freebsd.org: domain of pete@twisted.org.uk designates 178.250.76.50 as permitted sender) smtp.mailfrom=pete@twisted.org.uk X-Spamd-Result: default: False [-3.50 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-0.998]; R_SPF_ALLOW(-0.20)[+ip4:178.250.76.50/32]; R_DKIM_ALLOW(-0.20)[twisted.org.uk:s=x]; MIME_GOOD(-0.10)[text/plain]; MLMMJ_DEST(0.00)[stable@freebsd.org]; SUBJECT_ENDS_EXCLAIM(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; MIME_TRACE(0.00)[0:+]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; DKIM_TRACE(0.00)[twisted.org.uk:+]; RCPT_COUNT_ONE(0.00)[1]; ASN(0.00)[asn:12290, ipnet:178.250.72.0/21, country:GB]; FROM_HAS_DN(0.00)[]; ARC_NA(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DMARC_NA(0.00)[twisted.org.uk]; TO_DN_NONE(0.00)[]; MID_RHS_MATCH_FROM(0.00)[] X-ThisMailContainsUnwantedMimeParts: N 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.