Date: Sat, 27 Aug 2022 12:47:01 +0800 From: Ganbold Tsagaankhuu <ganbold@gmail.com> To: Rick Macklem <rmacklem@uoguelph.ca> Cc: freebsd-stable <freebsd-stable@freebsd.org> Subject: Re: NFS issue - newnfs_request: Wrong session srvslot=1 slot=0, freeing free slot!! Message-ID: <CAGtf9xOxEk1FR9xyL8X6FHtGmf1RT6sHvChgdRyXoOXPy8_8SA@mail.gmail.com> In-Reply-To: <YT4PR01MB97360B04D031BBD408029C59DD759@YT4PR01MB9736.CANPRD01.PROD.OUTLOOK.COM> References: <CAGtf9xNNCQLsWSN%2BspZmE8cQJ6UDTcdNcURbZxGdEo4-qZxn1A@mail.gmail.com> <YT4PR01MB9736383BF3B6F85D90115BA2DD759@YT4PR01MB9736.CANPRD01.PROD.OUTLOOK.COM> <CAGtf9xM6NHZuBEiEnYC%2BFDNqy6gPkUDkt=Ei7O_ymQV5SZEfgA@mail.gmail.com> <YT4PR01MB97362592C844062ABCA85625DD759@YT4PR01MB9736.CANPRD01.PROD.OUTLOOK.COM> <YT4PR01MB97360B04D031BBD408029C59DD759@YT4PR01MB9736.CANPRD01.PROD.OUTLOOK.COM>
next in thread | previous in thread | raw e-mail | index | archive | help
--0000000000005d7dee05e731b943 Content-Type: text/plain; charset="UTF-8" Rick, On Sat, Aug 27, 2022 at 6:17 AM Rick Macklem <rmacklem@uoguelph.ca> 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. > 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 <div dir=3D"ltr"><div>Rick,</div><br><div class=3D"gmail_quote"><div dir=3D= "ltr" class=3D"gmail_attr">On Sat, Aug 27, 2022 at 6:17 AM Rick Macklem <= ;<a href=3D"mailto:rmacklem@uoguelph.ca">rmacklem@uoguelph.ca</a>> wrote= :<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.= 8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Ganbold Tsagaa= nkhuu <<a href=3D"mailto:ganbold@gmail.com" target=3D"_blank">ganbold@gm= ail.com</a>> wrote:<br> > > Rick,<br> > ><br> > > On Fri, Aug 26, 2022 at 11:18 AM Rick Macklem > ><<a hre= f=3D"mailto:rmacklem@uoguelph.ca" target=3D"_blank">rmacklem@uoguelph.ca</a= ><mailto:<a href=3D"mailto:rmacklem@uoguelph.ca" target=3D"_blank">rmack= lem@uoguelph.ca</a>>> wrote:<br> Ganbold Tsagaankhuu <<a href=3D"mailto:ganbold@gmail.com" target=3D"_bla= nk">ganbold@gmail.com</a><mailto:<a href=3D"mailto:ganbold@gmail.com" ta= rget=3D"_blank">ganbold@gmail.com</a>>> wrote:<br> > > > Hi,<br> > > ><br> > > > We are having trouble with NFS running on STABLE:<br> > > ><br> > > > Aug 26 02:21:42 iron2 kernel: newnfs_request: Wrong session = srvslot=3D1 slot=3D0<br> [stuff snipped]<br> > > > Aug 26 02:22:46 iron2 kernel: newnfs_request: Wrong session = srvslot=3D1 slot=3D0<br> > > > Aug 26 02:22:46 iron2 kernel: freeing free slot!!<br> > > ><br> > > > 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:<br> > > ><br> > > > rw,nfsv4,minorversion=3D1,bg,soft,timeo=3D20,retrans=3D5,ret= rycnt=3D5<br> > > > ro,nfsv4,minorversion=3D1,bg,soft,timeo=3D20,retrans=3D5,ret= rycnt=3D5<br> > > ><br> > > > Is there any fix for this issue?<br> Oh, and one more thing. If you have multiple clients mounting the<br> NFSv4 server, make sure they all have unique hostids.<br> Check /etc/hostid and "sysctl kern.hostuuid". If two clients have= the<br> same kern.hostuuid, there will be lots of trouble.<br></blockquote><div><br= ></div><div>I see, we have 2 servers (NFS clients) running:</div><div><br><= /div><div>FreeBSD 13.1-STABLE #1 stable/13-n252199-9644bc4a112<br></div><di= v>FreeBSD 13.1-STABLE #3 stable/13-n252198-c1434fd2dea<br></div><div><br></= div><div>and no more errors so far.</div><div>However 2 servers have the sa= me hostid.=C2=A0</div><div>We will fix that and also will use hard mounts.<= /div><div><br></div><div>thanks a lot,</div><div><br></div><div>Ganbold</di= v><div><br></div><div>=C2=A0</div><blockquote class=3D"gmail_quote" style= =3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding= -left:1ex"> <br> rick<br> <br> > - Don't use "soft" mounts. See the Bugs section of "= ;man mount_nfs".<br> >=C2=A0 =C2=A0There are patches in stable/13 dated July 10, 2022. (I hav= e no idea<br> >=C2=A0 =C2=A0how to tell if n252198 would have them) that help, but use= of "soft"<br> >=C2=A0 =C2=A0mounts will never work correctly for NFSv4.<br> > - The attached small patch (not committed yet, but should be in<br> >=C2=A0 =C2=A0stable/13 in about 10days) fixes a couple of corner cases.= If you<br> >=C2=A0 =C2=A0are using a FreeBSD NFS server, I believe these corner cas= es only<br> >=C2=A0 =C2=A0occur after the NFS server reboots.<br> ><br> > rick<br> > ps: If you test the attached patch, please let me know how it goes.<br= > ><br> > Is this patch for NFS server? We are using Netapp NFS server on server= side.<br> No, it is for the client. However, as far as I know, a Netapp Filer never<b= r> generates a NFSERR_BADSESSION error (except maybe if you were using<br> a post-July 10. 2022 client), so the patch probably doesn't affect you.= <br> (Get rid of "soft" and you should be happy.)<br> <br> rick<br> <br> thanks,<br> <br> Ganbold<br> <br> <br> <br> thanks a lot,<br> <br> Ganbold<br> <br> <br> </blockquote></div></div> --0000000000005d7dee05e731b943--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAGtf9xOxEk1FR9xyL8X6FHtGmf1RT6sHvChgdRyXoOXPy8_8SA>