NFS Panic

From: Cy Schubert <Cy.Schubert_at_cschubert.com>
Date: Fri, 23 May 2025 05:48:06 UTC
Hi,

A couple of my machines have had the following panic.

panic: refcount 0xfffff8008dbdabf4 wraparound^M
cpuid = 3^M
time = 1747977394^M
KDB: stack backtrace:^M
db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 
0xfffffe008d1474d0^M
vpanic() at vpanic+0x136/frame 0xfffffe008d147600^M
panic() at panic+0x43/frame 0xfffffe008d147660^M
vput() at vput+0x67/frame 0xfffffe008d147680^M
nfs_lookup() at nfs_lookup+0x3bf/frame 0xfffffe008d1479f0^M
vop_sigdefer() at vop_sigdefer+0x30/frame 0xfffffe008d147a20^M
vfs_lookup() at vfs_lookup+0x467/frame 0xfffffe008d147aa0^M
namei() at namei+0x2ed/frame 0xfffffe008d147b00^M
vn_open_cred() at vn_open_cred+0x537/frame 0xfffffe008d147c80^M
openatfp() at openatfp+0x281/frame 0xfffffe008d147dd0^M
sys_openat() at sys_openat+0x3d/frame 0xfffffe008d147e00^M
amd64_syscall() at amd64_syscall+0x15a/frame 0xfffffe008d147f30^M
fast_syscall_common() at fast_syscall_common+0xf8/frame 0xfffffe008d147f30^M
--- syscall (499, FreeBSD ELF64, openat), rip = 0x82213d96a, rsp = 
0x8209c3518,
rbp = 0x8209c3550 ---^M
Uptime: 22h48m25s^M
Dumping 3196 out of 7994 MB:..1%..11%..21%..31%..41%..51%..61%..71%..81%..91
%^M
Dump complete^M
Automatic reboot in 15 seconds - press a key on the console to abort^M
Rebooting...^M

The panicking machine was the NFS client. The machine was at 30fd79b0c0a3. 
The NFS mount was handled by the automounter to mount my home dir from 
another machine. I was rsyncing a copy of src (mistakenly) to the machine. 
Some of the files were written to the share before it panicked. The 
underlying filesystem is on ZFS.

Stack trace follows:

__curthread () at /opt/src/git-src/sys/amd64/include/pcpu_aux.h:57
57              __asm("movq %%gs:%c1,%0" : "=r" (td)
(kgdb) #0  __curthread () at /opt/src/git-src/sys/amd64/include/pcpu_aux.h:5
7
        td = <optimized out>
#1  doadump (textdump=textdump@entry=1)
    at /opt/src/git-src/sys/kern/kern_shutdown.c:404
        error = 0
        coredump = <optimized out>
#2  0xffffffff806fa010 in kern_reboot (howto=260)
    at /opt/src/git-src/sys/kern/kern_shutdown.c:524
        once = 0
        __pc = 0x0
#3  0xffffffff806fa547 in vpanic (
    fmt=0xffffffff80b6e6f1 "refcount %p wraparound",
    ap=ap@entry=0xfffffe008d147640)
    at /opt/src/git-src/sys/kern/kern_shutdown.c:979
        buf = "refcount 0xfffff8008dbdabf4 wraparound", '\000' <repeats 217 
time
s>
        __pc = 0x0
        __pc = 0x0
        __pc = 0x0
        other_cpus = {__bits = {7, 0 <repeats 15 times>}}
        td = 0xfffff8002dd42000
        bootopt = <unavailable>
        newpanic = <optimized out>
#4  0xffffffff806fa373 in panic (fmt=<unavailable>)
    at /opt/src/git-src/sys/kern/kern_shutdown.c:892
        ap = {{gp_offset = 16, fp_offset = 48,
            overflow_arg_area = 0xfffffe008d147670,
            reg_save_area = 0xfffffe008d147610}}
#5  0xffffffff807faf87 in _refcount_update_saturated (count=<unavailable>)
    at /opt/src/git-src/sys/sys/refcount.h:52
No locals.
#6  refcount_releasen (count=<unavailable>, n=1)
    at /opt/src/git-src/sys/sys/refcount.h:151
        old = <optimized out>
#7  refcount_release (count=<unavailable>)
    at /opt/src/git-src/sys/sys/refcount.h:171
No locals.
#8  vput (vp=<optimized out>) at /opt/src/git-src/sys/kern/vfs_subr.c:3711
No locals.
#9  0xffffffff805c7bff in nfs_lookup (ap=ap@entry=0xfffffe008d147a48)
    at /opt/src/git-src/sys/fs/nfsclient/nfs_clvnops.c:1438
        dvp = 0xfffff80089998c08
        newvp = 0xfffff8008dbdaa50
        np = 0xfffffe00d0c537c0
        attrflag = 0
        dattrflag = 0
        ncticks = -2139333169
        nfhp = 0xfffffe00104e61c0
        dnfsva = {na_vattr = {va_type = 80, va_mode = 33038,
            va_bsdflags = 65535, va_uid = 2378017360, va_gid = 4294965248,
            va_nlink = 18446741877053224856, va_fsid = 18446735278986613504,
            va_fileid = 9, va_size = 18446741878188881856, va_blocksize = 0,
            va_atime = {tv_sec = 0, tv_nsec = 0}, va_mtime = {tv_sec = 5632,
              tv_nsec = 8013448}, va_ctime = {tv_sec = 0,
              tv_nsec = -2195520669736}, va_birthtime = {tv_sec = 686,
              tv_nsec = 8}, va_gen = 0, va_flags = 18446741878188881880,
            va_rdev = 346, va_bytes = 8, va_filerev = 0,
            va_vaflags = 2159652436, va_spare = -9133229150802726348},
          na_suppattr = {bits = {3132, 0, 768876544}},
          na_mntonfileno = 18446741874959868352, na_filesid = {
            18446744071574388420, 18446735278385405952}}
        nfsva = {na_vattr = {va_type = VNON, va_mode = 45765,
            va_bsdflags = 63488, va_uid = 663, va_gid = 0,
            va_nlink = 18446735280615796760, va_fsid = 18446741877053225448,
            va_fileid = 18446735280615796736, va_size = 
18446741878188881856,
            va_blocksize = -2196656326896, va_atime = {tv_sec = -2140327393,
              tv_nsec = -8786968814592}, va_mtime = {tv_sec = -2126898064,
              tv_nsec = -2196656326448}, va_ctime = {tv_sec = -2139681839,
              tv_nsec = -8786968814592}, va_birthtime = {tv_sec = 
-2126898064,
              tv_nsec = -2196656326416}, va_gen = 18446744071569869777,
            va_flags = 18446735286740713088, va_rdev = 18446744071582653552,
            va_bytes = 18446741877053225232,
            va_filerev = 18446744071569869777, va_vaflags = 845322824,
            va_spare = -2139674112}, na_suppattr = {bits = {3502585960,
              4294966784, 0}}, na_mntonfileno = 0, na_filesid = {
            18446741878188881880, 416}}
        vattr = {va_type = VDIR, va_mode = 493, va_bsdflags = 0,
          va_uid = 1000, va_gid = 1000, va_nlink = 2, va_fsid = 
250081247028,
          va_fileid = 99091, va_size = 3, va_blocksize = 512, va_atime = {
            tv_sec = 1747977382, tv_nsec = 958897000}, va_mtime = {
            tv_sec = 1747977394, tv_nsec = 313670000}, va_ctime = {
            tv_sec = 1747977394, tv_nsec = 313670000}, va_birthtime = {
            tv_sec = 1742392133, tv_nsec = 731659000}, va_gen = 0,
          va_flags = 0, va_rdev = 0, va_bytes = 512, va_filerev = 8013402,
          va_vaflags = 1747977381, va_spare = 0}
        nctime = {tv_sec = 1747977394, tv_nsec = 304107000}
        ts = {tv_sec = 82105, tv_nsec = 804860589}
        cnp = 0xfffffe008d147d18
        vpp = 0xfffffe008d147cf0
        mp = 0xfffffe00c2c1b000
        flags = 346325252
        error = <optimized out>
        td = 0xfffff8002dd42000
        nmp = <optimized out>
        needs_nameddir = <optimized out>
        openmode = <optimized out>
        newnp = <optimized out>
        ltype = <optimized out>
        is_nameddir = <optimized out>
        opennamed = <optimized out>
#10 0xffffffff807e5ee0 in vop_sigdefer (vop=<optimized out>,
    a=0xfffffe008d147a48) at /opt/src/git-src/sys/kern/vfs_default.c:1482
        bp = 0xffffffff805c7840 <nfs_lookup>
        prev_stops = 0
        rc = <optimized out>
#11 0xffffffff807eb327 in VOP_LOOKUP (dvp=0xfffff80089998c08,
    vpp=0xfffffe008d147cf0, cnp=0xfffffe008d147d18) at ./vnode_if.h:67
        a = {a_gen = {a_desc = 0xffffffff810e4b90 <vop_lookup_desc>},
          a_dvp = 0xfffff80089998c08, a_vpp = 0xfffffe008d147cf0,
          a_cnp = 0xfffffe008d147d18}
#12 vfs_lookup (ndp=ndp@entry=0xfffffe008d147c98)
    at /opt/src/git-src/sys/kern/vfs_lookup.c:1284
        dp = 0xfffff80089998c08
        error = <optimized out>
        relookup = <optimized out>
        cnp = 0xfffffe008d147d18
        ni_dvp_unlocked = 0
        wantparent = 0
        docache = 1
        lastchar = <optimized out>
        cp = <optimized out>
        prev_ni_pathlen = 9
        prev_ni_next = 0xffffffffffffffff <error: Cannot access memory at 
addres
s 0xffffffffffffffff>
        lkflags_save = 524288
        tdp = <optimized out>
        pr = <optimized out>
        nulchar = <optimized out>
        rdonly = <optimized out>
#13 0xffffffff807ea47d in namei (ndp=ndp@entry=0xfffffe008d147c98)
    at /opt/src/git-src/sys/kern/vfs_lookup.c:706
        dp = 0xfffff80089998c08
        pwd = 0xfffff8000d2e1c30
        status = CACHE_FPL_STATUS_ABORTED
        cnp = 0xfffffe008d147d18
        td = 0xfffff8002dd42000
        error = <optimized out>
#14 0xffffffff80812d57 in vn_open_cred (ndp=ndp@entry=0xfffffe008d147c98,
    flagp=flagp@entry=0xfffffe008d147da4, cmode=cmode@entry=0,
    vn_open_flags=vn_open_flags@entry=16, cred=0xfffff80051a9d300,
    fp=0xfffff8000e50eb90) at /opt/src/git-src/sys/kern/vfs_vnops.c:356
        vp = 0x0
        mp = 0xfffffe008d147c80
        vat = {va_type = VLNK, va_mode = 0, va_bsdflags = 0, va_uid = 2,
          va_gid = 0, va_nlink = 0, va_fsid = 18446735279980743744,
          va_fileid = 18446741874923406336, va_size = 18446741874923406336,
          va_blocksize = -2196656325632, va_atime = {tv_sec = -2136993772,
            tv_nsec = -8794722938112}, va_mtime = {tv_sec = 1,
            tv_nsec = -2198749683240}, va_ctime = {tv_sec = -8794722938112,
            tv_nsec = -2198749683264}, va_birthtime = {tv_sec = -2139209136,
            tv_nsec = -2196656325728}, va_gen = 663,
          va_flags = 18446735280103378544, va_rdev = 18446735278986613504,
          va_bytes = 18446735280103378520, va_filerev = 1,
          va_vaflags = 2366929872, va_spare = -2140327393}
        first_open = false
        error = <optimized out>
        fmode = <optimized out>
        vap = <optimized out>
#15 0xffffffff80808db1 in openatfp (td=0xfffff8002dd42000, dirfd=3,
    path=0x846ac479fd <error: Cannot access memory at address 0x846ac479fd>,
    pathseg=pathseg@entry=UIO_USERSPACE, flags=131329, mode=<optimized out>,
    fpp=0x0) at /opt/src/git-src/sys/kern/vfs_syscalls.c:1252
        fp = 0xfffff8000e50eb90
        nd = {
          ni_dirp = 0x846ac479fd <error: Cannot access memory at address 
0x846ac
479fd>, ni_segflg = UIO_USERSPACE, ni_rightsneeded = 0xfffffe008d147d80,
          ni_startdir = 0x0, ni_rootdir = 0xfffff8000d35b528, ni_topdir = 
0x0,
          ni_dirfd = 3, ni_lcf = 0, ni_filecaps = {fc_rights = {cr_rights = 
{
                144132780261900287, 288230376153808895}}, fc_ioctls = 0x0,
            fc_nioctls = -1, fc_fcntls = 120}, ni_vp = 0x0,
          ni_dvp = 0xfffff80089998c08, ni_resflags = 0, ni_debugflags = 3,
          ni_loopcnt = 0, ni_pathlen = 1, ni_next = 0xfffff8000d2f5008 "",
          ni_cnd = {cn_flags = 346325252, cn_cred = 0xfffff80051a9d300,
            cn_nameiop = LOOKUP, cn_lkflags = 532480,
            cn_pnbuf = 0xfffff8000d2f5000 "realpath",
            cn_nameptr = 0xfffff8000d2f5000 "realpath", cn_namelen = 8},
          ni_cap_tracker = {tqh_first = 0x0, tqh_last = 0xfffffe008d147d48},
          ni_dvp_seqc = 1400, ni_vp_seqc = 0}
        indx = -1
        rights = <optimized out>
        p = <optimized out>
        fdp = 0xfffffe00c2bf8c90
        pdp = 0xfffff8008ceb0c40
        error = 0
        cmode = 0
        vp = <optimized out>
        fcaps = <optimized out>
#16 0xffffffff80808b0d in kern_openat (dirfd=<unavailable>,
    path=<unavailable>, pathseg=UIO_USERSPACE, flags=<unavailable>,
    mode=<unavailable>, td=<optimized out>)
    at /opt/src/git-src/sys/kern/vfs_syscalls.c:1336
No locals.
#17 sys_openat (td=<optimized out>, uap=<optimized out>)
    at /opt/src/git-src/sys/kern/vfs_syscalls.c:1147
No locals.
#18 0xffffffff80acf35a in syscallenter (td=0xfffff8002dd42000)
    at /opt/src/git-src/sys/amd64/amd64/../../kern/subr_syscall.c:191
        se = 0xffffffff8105add0 <sysent+15968>
        p = 0xfffffe00c2c22000
        sa = 0xfffff8002dd423f0
        error = <optimized out>
        sy_thr_static = true
        traced = <optimized out>
        _audit_entered = <optimized out>
#19 amd64_syscall (td=0xfffff8002dd42000, traced=0)
    at /opt/src/git-src/sys/amd64/amd64/trap.c:1215
        ksi = {ksi_link = {tqe_next = 0x4, tqe_prev = 0xfffffe008d147ee0},
          ksi_info = {si_signo = -2139674112, si_errno = -1,
            si_code = -1928036720, si_pid = -512, si_uid = 0,
            si_status = 32768, si_addr = 0x8140407a2e293234, si_value = {
              sival_int = 3, sival_ptr = 0x3, sigval_int = 3,
              sigval_ptr = 0x3}, _reason = {_fault = {_trapno = 768877856},
              _timer = {_timerid = 768877856, _overrun = -2048}, _mesgq = {
                _mqd = 768877856}, _poll = {_band = -8795324144352},
              _capsicum = {_syscall = 768877856}, __spare__ = {
                __spare1__ = -8795324144352, __spare2__ = {-1928036352, 
-512,
                  -2126898064, -1, 768876544, -2048, -2130704920}}}},
          ksi_flags = 7, ksi_sigq = 0xfffff8002dd42000}
#20 <signal handler called>
No locals.
#21 0x000000082213d96a in ?? ()
No symbol table info available.
Backtrace stopped: Cannot access memory at address 0x8209c3518



-- 
Cheers,
Cy Schubert <Cy.Schubert@cschubert.com>
FreeBSD UNIX:  <cy@FreeBSD.org>   Web:  https://FreeBSD.org
NTP:           <cy@nwtime.org>    Web:  https://nwtime.org

			e^(i*pi)+1=0