From nobody Sun Aug 28 15:41:16 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 4MFyTq6qJQz4Zqxg for ; Sun, 28 Aug 2022 15:41:19 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from CAN01-YQB-obe.outbound.protection.outlook.com (mail-yqbcan01on2040.outbound.protection.outlook.com [40.107.116.40]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "DigiCert Cloud Services CA-1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MFyTp680xz3J1d for ; Sun, 28 Aug 2022 15:41:18 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iXl4uBoHcHZjZwgEgeFpoDspHX/SLkneFRmLo17k1sLiNapaISlqRk9xAJSa3SAfB96HwYviR7IpbbBnm+aKiIMEWp6CCVwS2mDwxINhfMqzHYNhTWRdjgCZCybTW7UNfDsQsXgUrYk5+zlsldAidHorL7+TZMCv8c26jW151dE0SGwI/qQvi+FVBx1Edc8K720VuCxk1GLVW20eyY4mVzDi8i1DuY5EVO48kHpHXWN9yaI15QBEasWB4Rc5vP/M9FG8tSQxO1q20sVUMOUFterGwPLsVIsRWlit3a/+G0dy2Zey7llRvCesSqAmTxwACBnnl+S88/entOAG0L5q/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=BYcROTwAqVj9LZw8VNS5aNO/z0g5hRJiA0HzxvyKGtY=; b=JLhfGQb8uVdoSpvYKcarD8kPX5DW3WW7z4PipSIemzRX/GXBbGUNVewtVRJwbXc2TONUBkYR+G76LhymD4rntsHj9Hwycw+VZlRslcygxyKLxCiFew9JJw006w1icfn3X9G3V8jSrg1N2nzoFUNEBeNDZz+5bwiJyk8ZLFlxHJomw54larqFCZ+1UEnfi6KSsLjLkVVZ4D+PWcx6FzS2EzzleCwon3XFQ7qObHADCZyV3BeVHF+Vt1ESxjFQoUBiHLuu9dwGM9Izs5W5RSTCziSwTzEdBhudwCXvx08d2JJHfMLXUfcLKDtMBP60KpOo8YEFbtQfwKZtAJv8b7OrhQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=uoguelph.ca; dmarc=pass action=none header.from=uoguelph.ca; dkim=pass header.d=uoguelph.ca; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=uoguelph.ca; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=BYcROTwAqVj9LZw8VNS5aNO/z0g5hRJiA0HzxvyKGtY=; b=AnHCsehb8ha/PB4z34mtDAXMZZ7yx1DLuwSx1uaTR4R/e4gvDgK4z0wiTG6HbMszZsILiSMnt/xAI2mU3AlGjAqdEDDA7Wsd7gLB7Iz4oNqKVvld5MuAT261ewJAto3aYJTKDNBFoTatA6vpqn+U3EjZeqJZeOoYXdLJ2z853y4e/R0aMBX5TVSCR2jwCDl74C/DC1gVSHZpeUHMhDxjJKuwi+CzDULUi8GTA43oD2ygNT83SCAgooJGD2jTb9MZll54xbsdWgw/ec/FpT7E7zlcOsyepZtJpRlzaKTslYcMKzQdt9sdQPzk9uLPZm5Xp3a1cyZffsP5Uf/EhLfdgQ== Received: from YT2PR01MB9729.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:df::22) by YT2PR01MB6514.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:6d::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5566.15; Sun, 28 Aug 2022 15:41:17 +0000 Received: from YT2PR01MB9729.CANPRD01.PROD.OUTLOOK.COM ([fe80::3865:f8eb:5111:8be7]) by YT2PR01MB9729.CANPRD01.PROD.OUTLOOK.COM ([fe80::3865:f8eb:5111:8be7%5]) with mapi id 15.20.5566.015; Sun, 28 Aug 2022 15:41:16 +0000 From: Rick Macklem To: Ronald Klop , Pete French , "stable@freebsd.org" Subject: Re: double used hostuuids - Re: NFS issue - newnfs_request: Wrong session srvslot=1 slot=0, freeing free slot!! Thread-Topic: double used hostuuids - Re: NFS issue - newnfs_request: Wrong session srvslot=1 slot=0, freeing free slot!! Thread-Index: AQHYuPX4Bm3b05JqHEiEpg2gE19wMa3AgCRKgAALTQCAAABR2IABNL8KgACaugCAAIBMt4ABH0GAgAANhQCAAGqRCA== Date: Sun, 28 Aug 2022 15:41:16 +0000 Message-ID: References: <0bfcccf8-1a40-326a-912a-734f97dffe4f@twisted.org.uk> <817221085.13327.1661677440487@localhost> In-Reply-To: <817221085.13327.1661677440487@localhost> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: fcbbc8d2-fbc0-4986-070c-08da890bbf10 x-ms-traffictypediagnostic: YT2PR01MB6514:EE_ x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: x/BLfvHVlKH6MbAQDXYON2eKeX/VOwk893iJm3ZGXDjkVkOW2cOUervMDpe3GpcS9g31ooQtYwjNHyZ2rZYwmJdkUZpS5+Im2P0TK2BEfnwir/TMPB2HBdJ7KfvqVJXTOyf6KQ5FgMAjIaYz0LmbrTEQDCHSoHvZRBY1S0JFcw9fcQ1B+Ls3MBMj6mCcWVxFOHxRwXBxYleNx/VZm2hq6ssglX9uv2swrrWC3IVAjERAZcas3X2UnI1g0XcrgUVJ+g+gA6GHoPEalUcRyIbnDQNKiD0YRvdLQHU2oMhAma4laLr6ypA4iPDkL1w1VagbxFpjqoRvGNT4T9nFjmNIMfPFpGQyOL2xmq6ihSVVBotCv28EOeCTiv6bK9t9s+/GtS1qBGOq0ZKjDfTrhuyPVR819KdMEeoXoC3/lCyb8q0b+Z6xxG4QDMww8AaGgqJjkYzGFLi/sihz6qltgcl2Ze/itqyRQrHHSOPpRlky/iIAk9HvkjQ2blqt2rJgn0Xgld6zumgt5vAJaI3vwHpUnNj0/fuZFBPCt/WQlRK1XA633xyzqN0GdAOkSR3VSwAduUpu7DSbzYtffeu9eqI6skBmXjgnga9VRECjNvhv4AGLvtjBcKaB/dM6B/ZJaaO4E2wNObf+tTD+O1ju4xxBn1m1kUNoXm4X6mcMtcHeQHVMA+MzKNfv5GpbIbDDOPO6COrveFBeRwMzdLDwLVde6dCfTmUea5l6hK+8h84YNykjEEmW9ER+ehIWElkQlKV8Q/2bSERRE5tN1sDkQKuvBQ== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:YT2PR01MB9729.CANPRD01.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230016)(4636009)(346002)(136003)(366004)(376002)(396003)(39860400002)(64756008)(66446008)(66476007)(110136005)(2906002)(52536014)(66556008)(5660300002)(66946007)(8936002)(8676002)(41320700001)(91956017)(33656002)(76116006)(316002)(786003)(478600001)(41300700001)(6506007)(7696005)(9686003)(53546011)(86362001)(71200400001)(38070700005)(83380400001)(186003)(55016003)(122000001)(38100700002);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?J+3e7UJEA5a0XzFqvCspsrIAhEZB0eu6zhaeGQ24LgLYdkSsJGNi+2USke?= =?iso-8859-1?Q?vMGcj8AeqS/Om5tBrt8wQtXEoOYNWvzewjnqGaXWvjeuzNEEqT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SL84GZQaY0hoVmpXLNsbmBPx9NU8Yp9cdzkY2oO?= =?iso-8859-1?Q?D5O4edgknWL0OGUADFjBfYk1/2tw7Dt98JK/um3fKbIsC86TtMLdHKUls4?= =?iso-8859-1?Q?UXTggVohYqci10r/FNORtGv6Q+kAjzT9d10jPb1qhTA+Zlz2wDdkFHpG81?= =?iso-8859-1?Q?YTqzVZUd+S8L+pasbQUUSYzZ2Kj1IvgkzERpZNtLPsG2Lj/fi+PCRc2muy?= =?iso-8859-1?Q?Hl4p0YhTNJPP7QRFb612EPbmR3t53h/Jz1/o1o8IWjOTvCwCiqjp5D61HJ?= =?iso-8859-1?Q?YezRxmnFFaxWTUbDkP4r7KqZO1wt6t9Gr98qpe8GbydekNGcVxJ8fd+hg+?= =?iso-8859-1?Q?wUbEncf4crrn+025GPnmR/JjhUGAWlVXrMLyehpEDvkJPR+5au/DSWWkQ+?= =?iso-8859-1?Q?FVl+n2jaQcb6KX1AGovW+6hy9sIMCFiln2aS2EnqHutSduAD3n4XSfxraK?= =?iso-8859-1?Q?Q5kpE131M0HhYSKNu5duIc09mO66vH5qWT4mz0gkvf3eeW4rZFwAijBJbn?= =?iso-8859-1?Q?jsZDByc0czA9FE3MaVLYdGl58iUkdCabIdbrYZXrGGIxW4dzUb/A4I454r?= =?iso-8859-1?Q?e25267H10v8Gt27LtagQA05q3nx3oLgYfZJ15Z9yeRRYmdvDnqdFb0hjlS?= =?iso-8859-1?Q?fmHwm66gs8F6G3mzWzHxQFjYa3kMHuYSfdyua6vUSZ4SyEOmcg4/FC39s/?= =?iso-8859-1?Q?SbBfUTgvZUhYsmquRYKJLW6wTn8XedzBT2Jxdv4g?= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable 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 X-OriginatorOrg: uoguelph.ca X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: YT2PR01MB9729.CANPRD01.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-Network-Message-Id: fcbbc8d2-fbc0-4986-070c-08da890bbf10 X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Aug 2022 15:41:16.9022 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: be62a12b-2cad-49a1-a5fa-85f4f3156a7d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: nszt6o4ERaTCVOTM6z1QUkLwFVR5cl8lIICLCTWjNfzvwmpOkb/ps1eN+qKUkJ5KnkbS+aydlnAXgQgIMClYsA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: YT2PR01MB6514 X-Rspamd-Queue-Id: 4MFyTp680xz3J1d X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=uoguelph.ca header.s=selector2 header.b=AnHCsehb; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=none) header.from=uoguelph.ca; spf=pass (mx1.freebsd.org: domain of rmacklem@uoguelph.ca designates 40.107.116.40 as permitted sender) smtp.mailfrom=rmacklem@uoguelph.ca X-Spamd-Result: default: False [-6.00 / 15.00]; ARC_ALLOW(-1.00)[microsoft.com:s=arcselector9901:i=1]; DWL_DNSWL_LOW(-1.00)[uoguelph.ca:dkim]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; DMARC_POLICY_ALLOW(-0.50)[uoguelph.ca,none]; R_SPF_ALLOW(-0.20)[+ip4:40.107.0.0/16]; R_DKIM_ALLOW(-0.20)[uoguelph.ca:s=selector2]; MIME_GOOD(-0.10)[text/plain]; MLMMJ_DEST(0.00)[stable@freebsd.org]; SUBJECT_ENDS_EXCLAIM(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:8075, ipnet:40.104.0.0/14, country:US]; TO_DN_EQ_ADDR_SOME(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FREEFALL_USER(0.00)[rmacklem]; DKIM_TRACE(0.00)[uoguelph.ca:+]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; RWL_MAILSPIKE_POSSIBLE(0.00)[40.107.116.40:from] X-ThisMailContainsUnwantedMimeParts: N Ronald Klop wrote:=0A= > Van: Pete French =0A= > Datum: 28 augustus 2022 10:16=0A= > Aan: stable@freebsd.org=0A= > Onderwerp: Re: double used hostuuids - Re: NFS issue - newnfs_request: Wr= ong session srvslot=3D1 slot=3D0, freeing free slot!!=0A= > =0A= > On 27/08/2022 16:18, Rick Macklem wrote:=0A= > > Ronald Klop wrote:=0A= > >> On 8/27/22 00:17, Rick Macklem wrote:=0A= > >>> Ganbold Tsagaankhuu wrote:=0A= > >>>>> Rick,=0A= > >>>>>=0A= > >>>>> On Fri, Aug 26, 2022 at 11:18 AM Rick Macklem > >> wrote:=0A= > >>> Ganbold Tsagaankhuu > wro= te:=0A= > >>>>>> Hi,=0A= > >>>>>>=0A= > >>>>>> We are having trouble with NFS running on STABLE:=0A= > >>>>>>=0A= > >>>>>> Aug 26 02:21:42 iron2 kernel: newnfs_request: Wrong session srvslo= t=3D1 slot=3D0=0A= > >>> [stuff snipped]=0A= > >>>>>> Aug 26 02:22:46 iron2 kernel: newnfs_request: Wrong session srvslo= t=3D1 slot=3D0=0A= > >>>>>> Aug 26 02:22:46 iron2 kernel: freeing free slot!!=0A= > >>>>>>=0A= > >>>>>> We are running FreeBSD 13.1-STABLE #3 stable/13-n252198-c1434fd2de= a: Fri Aug 26 01:51:53 UTC 2022 and mount options are:=0A= > >>>>>>=0A= > >>>>>> rw,nfsv4,minorversion=3D1,bg,soft,timeo=3D20,retrans=3D5,retrycnt= =3D5=0A= > >>>>>> ro,nfsv4,minorversion=3D1,bg,soft,timeo=3D20,retrans=3D5,retrycnt= =3D5=0A= > >>>>>>=0A= > >>>>>> Is there any fix for this issue?=0A= > >>> Oh, and one more thing. If you have multiple clients mounting the=0A= > >>> NFSv4 server, make sure they all have unique hostids.=0A= > >>> Check /etc/hostid and "sysctl kern.hostuuid". If two clients have the= =0A= > >>> same kern.hostuuid, there will be lots of trouble.=0A= > >>>=0A= > >>> rick=0A= > >>=0A= > >> Just a thought. Is it possible/easy to warn about double used hostuuid= s >from different client IP addresses?=0A= > >> Although that will not help this person using Netapp as a server.=0A= > > I don't think so. Same hostuuid implies same system, so how does a=0A= > > server know they are two different systems?=0A= > > - A client could have multiple IP host addresses, so different client= =0A= > > host IP addresses for a TCP connection does not imply different syst= ems.=0A= > >=0A= > > I can, however, modify the console message the server generates when=0A= > > it sees a session has been replaced to include "check clients have=0A= > > unique hostuuids", which might help.=0A= > >=0A= > > I also plan on adding a sentence to "man mount_nfs" about this,=0A= > > since I just had an email discussion with someone else where the=0A= > > problem turned out to be "same hostuuids for multiple clients"=0A= > > and the loss of sessions on the FreeBSD server was the hint that=0A= > > clued me in.=0A= > >=0A= > > At least I now know this configuration issue exists.=0A= > >=0A= > > rick=0A= > >=0A= > > Regards,=0A= > > Ronald.=0A= > >=0A= > =0A= > 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=0A= > work out why my NFS was havign issues...=0A= I have already committed a change for the server console message to main an= d it will be MFC'd=0A= in a couple of weeks.=0A= =0A= I will do a man page update soon, as well.=0A= =0A= > -pete.=0A= =0A= > It might help this case if the nfs client combined hostid+ip as a client = id. Or include mac address. People=0A= > tend to change the mac after a clone.=0A= Well, in the past I have thought about this...=0A= The problem is that, ideally, the string used by the NFSv4 client mount sho= uld be=0A= invariant over time (including client reboot cycles).=0A= Depending upon the situation, a machine's IP addresses can change over time= (dynamically=0A= assigned via dhcp, for example). They can also end up as addresses like 192= .168.1.n sitting=0A= behind a nat gateway, where the IP could be duplicated on other subnets.=0A= As for MAC, if it is taken from a hardware card, then that hardware card ge= ts replaced,=0A= the MAC changes.=0A= =0A= I think /etc/hostid (or whatever is used to set "kern.hostuuid") seems the = best bet=0A= for something unique that remains invariant for the life of the system.=0A= I think all cloners need to do is remove /etc/hostid from the master being= =0A= cloned and then each clone will generate their own /etc/hostid upon first b= oot.=0A= =0A= rick=0A= =0A= Regards,=0A= Ronald=0A=