Re: FreeBSD 12.3/13.1 NFS client hang

From: Rick Macklem <rmacklem_at_uoguelph.ca>
Date: Mon, 30 May 2022 04:31:10 UTC
Kurt Jaeger <pi@freebsd.org> wrote:
[stuff snipped]
>
> Given that simple NFS mounts and editing with vi on nfs mounts should
> be very basic use-cases, it's time to find ways to debug this 8-(
To find out what processes are holding locked NFS vnode...
Run a kernel with the debugger built into it.
options DDB
options KDB

# sysctl debug.kdb.alt_break_to_debugger=1

Then, when the hang has occurred, go to the console.
Type <ctrl><alt><esc>
You should go into the debugger:
db>
Then type "show alllocks".
You are looking for the pids of the processes that hold NFS vnode locks.
db> continue
- Allows the system to run again.

Then look through the output of "ps axHl" for the processes found above
and see what they are sleeping on.
(My hunch is that at least one of them is sleeping on "vmopar", but it
 is just a hunch.)

These processes are your problem. Figure out how to stop them from
sleeping on something else while holding an NFS vnode lock and you've
fixed your problem. (Do not assume it is an NFS problem. I'm pretty sure
it is not caused by NFS.)

rick

> This also implies that switching from soft->hard won't fix the problem.

Thanks for the encouragement 8-}

> In summary, I don't think your hang is anything like Andreas's, rick

I'll report as soon as I have a another hang.

--
pi@FreeBSD.org         +49 171 3101372                  Now what ?