Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 Nov 2025 14:09:11 +0100 (CET)
From:      Ronald Klop <ronald-lists@klop.ws>
To:        Rick Macklem <rick.macklem@gmail.com>
Cc:        freebsd-fs@freebsd.org, Mark Millard <marklmi@yahoo.com>, Ronald Klop <ronald@freebsd.org>
Subject:   Re: nfs hang
Message-ID:  <1159959906.6785.1763125751886@localhost>
In-Reply-To: <CAM5tNy7FYVVPaV8i9DUrwxL3%2BSEm8yXxpvT_oQSdgTuid9nBmw@mail.gmail.com>
References:  <A3D0678A-F5AC-449A-BC71-13D61F2D4A04@yahoo.com> <CAM5tNy7FYVVPaV8i9DUrwxL3%2BSEm8yXxpvT_oQSdgTuid9nBmw@mail.gmail.com>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
Van: Rick Macklem <rick.macklem@gmail.com>
Datum: vrijdag, 14 november 2025 12:53
Aan: Mark Millard <marklmi@yahoo.com>
CC: Ronald Klop <ronald@freebsd.org>, freebsd-fs@freebsd.org
Onderwerp: Re: nfs hang
> 
> On Thu, Nov 13, 2025 at 4:51PM Mark Millard <marklmi@yahoo.com> wrote:
> >
> > Ronald Klop <ronald_at_FreeBSD.org> wrote on
> > Date: Thu, 13 Nov 2025 17:17:48 UTC :
> >
> > > Op 13-11-2025 om 14:06 schreef Rick Macklem:
> > > > On Thu, Nov 13, 2025 at 2:45AM Ronald Klop <ronald@freebsd.org> wrote:
> > > >>
> > > >> Op 13-11-2025 om 11:41 schreef Ronald Klop:
> > > >>> . . .
> > > >>>
> > > >>>
> > > >>
> > > >>
> > > >> . . .
> > > > Do you have more than one client mounting the file system?
> > > > If you do, make sure they all have different /etc/hostid's.
> > > > (Cloning a system disk without deleting /etc/hostid can
> > > > result in multiple clients with the same /etc/hostid. That
> > > > mean they are "the same client" to the NFSv4 server
> > > > and that can cause the above.)
> > > >
> > > > If this is not the problem, I don't know why you'd see the
> > > > above but I suspect the above explains the hang.
> > > >
> > > > rick
> > > >
> > >
> > >
> > > Two clients. Both have different /etc/hostid.
> > >
> > > I noticed that the procstat stacks start with "null_reclaim". And poudriere null-mounts the nfs mounts in the poudriere-jails.
> >
> > Do the poudriere jails on each host use the host's /etc/hostid (by content)?
> >
> > Any worries about needing poudriere jail /etc/hostid content uniqueness?
> From NFSv4's point of view, /etc/hostid is used at mount time.
> The client will use the one outside of any jail, since that is where the
> mount is done from.
> 
> Now, although I was thinking about the client (since that is where
> the hangs occur), it might be an issue if you were running the nfsd
> in multiple jails that have the same /etc/hostid as well.
> --> The server identifies itself to the client via the /etc/hostid and
>      a different identity means different server.
>      However, it could be a problem if the servers in different jails
>      return the "same server" from the same /etc/hostid.
> 
> I'll admit it as been years since I did the "run nfsd in a vnet jail"
> code and I don't remember if the use of /etc/hostid is vnet'd or
> not.
> 
> rick
> 
> >
> > > Could nfs+nullfs give some trouble? Or maybe it is just nullfs that hangs everything and the nfs stuff is just a result of it.
> > >
> > > At the same moment I had git hanging on a non-NFS mount. See attachment for the procstat which also includes nfs-calls.
> >
> > ===
> > Mark Millard
> > marklmi at yahoo.com
> >
> 
> 
> 


I only have 1 nfs server.
My vnet jail that runs nfsd does not have /etc/hostid.

/etc/rc.d/hostid and hostid_save have the keyword nojail so they never run inside a jail (AFAIK).
# sysctl kern.hostid
kern.hostid: 0

Is that an issue?

Regards,
Ronald.
 
[-- Attachment #2 --]
<html><head></head><body><br>
<p><strong>Van:</strong> Rick Macklem &lt;rick.macklem@gmail.com&gt;<br>
<strong>Datum:</strong> vrijdag, 14 november 2025 12:53<br>
<strong>Aan:</strong> Mark Millard &lt;marklmi@yahoo.com&gt;<br>
<strong>CC:</strong> Ronald Klop &lt;ronald@freebsd.org&gt;, freebsd-fs@freebsd.org<br>
<strong>Onderwerp:</strong> Re: nfs hang</p>

<blockquote style="padding-right: 0px; padding-left: 5px; margin-left: 5px; border-left: #000000 2px solid; margin-right: 0px">
<div class="MessageRFC822Viewer" id="P">
<div class="TextPlainViewer" id="P.P">On Thu, Nov 13, 2025 at 4:51PM Mark Millard &lt;marklmi@yahoo.com&gt; wrote:<br>
&gt;<br>
&gt; Ronald Klop &lt;ronald_at_FreeBSD.org&gt; wrote on<br>
&gt; Date: Thu, 13 Nov 2025 17:17:48 UTC :<br>
&gt;<br>
&gt; &gt; Op 13-11-2025 om 14:06 schreef Rick Macklem:<br>
&gt; &gt; &gt; On Thu, Nov 13, 2025 at 2:45AM Ronald Klop &lt;ronald@freebsd.org&gt; wrote:<br>
&gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt;&gt; Op 13-11-2025 om 11:41 schreef Ronald Klop:<br>
&gt; &gt; &gt;&gt;&gt; . . .<br>
&gt; &gt; &gt;&gt;&gt;<br>
&gt; &gt; &gt;&gt;&gt;<br>
&gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt;&gt; . . .<br>
&gt; &gt; &gt; Do you have more than one client mounting the file system?<br>
&gt; &gt; &gt; If you do, make sure they all have different /etc/hostid's.<br>
&gt; &gt; &gt; (Cloning a system disk without deleting /etc/hostid can<br>
&gt; &gt; &gt; result in multiple clients with the same /etc/hostid. That<br>
&gt; &gt; &gt; mean they are "the same client" to the NFSv4 server<br>
&gt; &gt; &gt; and that can cause the above.)<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; If this is not the problem, I don't know why you'd see the<br>
&gt; &gt; &gt; above but I suspect the above explains the hang.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; rick<br>
&gt; &gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; Two clients. Both have different /etc/hostid.<br>
&gt; &gt;<br>
&gt; &gt; I noticed that the procstat stacks start with "null_reclaim". And poudriere null-mounts the nfs mounts in the poudriere-jails.<br>
&gt;<br>
&gt; Do the poudriere jails on each host use the host's /etc/hostid (by content)?<br>
&gt;<br>
&gt; Any worries about needing poudriere jail /etc/hostid content uniqueness?<br>
>From NFSv4's point of view, /etc/hostid is used at mount time.<br>
The client will use the one outside of any jail, since that is where the<br>
mount is done from.<br>
<br>
Now, although I was thinking about the client (since that is where<br>
the hangs occur), it might be an issue if you were running the nfsd<br>
in multiple jails that have the same /etc/hostid as well.<br>
--&gt; The server identifies itself to the client via the /etc/hostid and<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;a different identity means different server.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;However, it could be a problem if the servers in different jails<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return the "same server" from the same /etc/hostid.<br>
<br>
I'll admit it as been years since I did the "run nfsd in a vnet jail"<br>
code and I don't remember if the use of /etc/hostid is vnet'd or<br>
not.<br>
<br>
rick<br>
<br>
&gt;<br>
&gt; &gt; Could nfs+nullfs give some trouble? Or maybe it is just nullfs that hangs everything and the nfs stuff is just a result of it.<br>
&gt; &gt;<br>
&gt; &gt; At the same moment I had git hanging on a non-NFS mount. See attachment for the procstat which also includes nfs-calls.<br>
&gt;<br>
&gt; ===<br>
&gt; Mark Millard<br>
&gt; marklmi at yahoo.com<br>
&gt;</div>

<hr></div>
</blockquote>
<br>
<br>
I only have 1 nfs server.<br>
My vnet jail that runs nfsd does not have /etc/hostid.<br>
<br>
/etc/rc.d/hostid and hostid_save have the keyword nojail so they never run inside a jail (AFAIK).<br>
# sysctl kern.hostid<br>
kern.hostid: 0<br>
<br>
Is that an issue?<br>
<br>
Regards,<br>
Ronald.<br>
&nbsp;</body></html>
home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1159959906.6785.1763125751886>