[Bug 274992] automount -c causes panic: invalid vfs_ops count 0

From: <bugzilla-noreply_at_freebsd.org>
Date: Thu, 09 Nov 2023 18:39:35 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=274992

--- Comment #2 from Edward Tomasz Napierala <trasz@FreeBSD.org> ---
Sorry, another driver messed up my crashdump; had to reboot to clear this up. 
So:

#4  0xffffffff80b4fb13 in panic (fmt=<unavailable>)
    at /usr/home/trasz/git/freebsd-src/sys/kern/kern_shutdown.c:894
        ap = {{gp_offset = 16, fp_offset = 48, 
            overflow_arg_area = 0xfffffe00f5dc0a50, 
            reg_save_area = 0xfffffe00f5dc09f0}}
#5  0xffffffff80c3c98b in vfs_op_exit_locked (mp=mp@entry=0xfffffe00f73ad000)
    at /usr/home/trasz/git/freebsd-src/sys/kern/vfs_mount.c:1895
No locals.
#6  0xffffffff80c3c9fc in vfs_op_exit (mp=mp@entry=0xfffffe00f73ad000)
    at /usr/home/trasz/git/freebsd-src/sys/kern/vfs_mount.c:1908
No locals.
#7  0xffffffff80c3f47f in vfs_domount_update (td=td@entry=0xfffff8000a0fb000, 
    vp=0xfffff8002eeefa80, fsflags=fsflags@entry=65536, 
    jail_export=<optimized out>, optlist=optlist@entry=0xfffffe00f5dc0d50)
    at /usr/home/trasz/git/freebsd-src/sys/kern/vfs_mount.c:1561
        export = {ex_flags = 335806548, ex_root = 4, ex_uid = 0, 
          ex_ngroups = -170128272, 
          ex_groups = 0xffffffff81760d00 <vop_islocked_desc>, 
          ex_addr = 0xfffff8002eeefa80, ex_addrlen = 112 'p', 
          ex_mask = 0xfffffe00f5dc0c98, ex_masklen = 1 '\001', 
          ex_indexfile = 0xfffffe00f5dc0c18 "\200w\034\002", 
          ex_numsecflavors = -170128184, ex_secflavors = {-512, -170128360, 
            -512, -170128184, -512}}
        o2export = {ex_flags = -2122951984, ex_root = 4294967295, ex_anon = {
            cr_version = 787413632, cr_uid = 4294965248, cr_ngroups = -512, 
            cr_groups = {4294965248, 0, 0, 4124838672, 4294966784, 
              2160297514, 4294967295, 4124838672, 4294966784, 2160222316, 
              4294967295, 129682944, 4294965248, 787413632, 4294965248, 
              4124838936}, {_cr_unused1 = 0xfffffe00f5dc0c18, 
              cr_pid = -170128360}}, ex_addr = 0x1, ex_addrlen = 0 '\000', 
          ex_mask = 0xfffffe00f5dc0c18, ex_masklen = 152 '\230', 
          ex_indexfile = 0xfffffe00f5dc0ba0 "", 
          ex_numsecflavors = -2134672048, ex_secflavors = {-1, 787414528, 
            -2048, 4, 0}}
        mp = 0xfffffe00f73ad000
        flag = 0
        vfs_suser_failed = <optimized out>
        error = 2
        rootvp = 0x0
        fsid_up_len = <optimized out>
        fsid_up = 0xfffff800021c77a0
        export_error = <optimized out>
        bufp = <optimized out>
        len = <optimized out>
        i = <optimized out>
        grps = <optimized out>
#8  0xffffffff80c3b1f9 in vfs_domount (td=td@entry=0xfffff8000a0fb000, 
    fstype=fstype@entry=0xfffff800021c7760 "autofs", 
    fspath=fspath@entry=0xfffff800021c7780 "/net", 
    fsflags=fsflags@entry=65536, jail_export=false, 
    optlist=optlist@entry=0xfffffe00f5dc0d50)
    at /usr/home/trasz/git/freebsd-src/sys/kern/vfs_mount.c:1687
        nd = {ni_dirp = 0xfffff800021c7780 "/net", ni_segflg = UIO_SYSSPACE, 
          ni_rightsneeded = 0xffffffff816017d8 <cap_no_rights>, 
          ni_startdir = 0x0, ni_rootdir = 0xfffff80007bace00, 
          ni_topdir = 0x0, ni_dirfd = -100, ni_lcf = 0, ni_filecaps = {
            fc_rights = {cr_rights = {0, 0}}, fc_ioctls = 0x0, 
            fc_nioctls = -1, fc_fcntls = 0}, ni_vp = 0xfffff8002eeefa80, 
          ni_dvp = 0xfffff800045e7380, ni_resflags = 1, ni_debugflags = 3, 
          ni_loopcnt = 0, ni_pathlen = 1, ni_next = 0xfffff80007b96804 "", 
          ni_cnd = {cn_flags = 335806548, cn_cred = 0xfffff80007a0f300, 
            cn_nameiop = LOOKUP, cn_lkflags = 524288, 
            cn_pnbuf = 0xfffff80007b96800 "/net", 
            cn_nameptr = 0xfffff80007b96801 "net", cn_namelen = 3}, 
          ni_cap_tracker = {tqh_first = 0x0, tqh_last = 0xfffffe00f5dc0cc8}, 
          ni_dvp_seqc = 2163107909, ni_vp_seqc = 8}
        error = <optimized out>
        vfsp = 0x0
        vp = <unavailable>
        pathbuf = <optimized out>
#9  0xffffffff80c39cb2 in vfs_donmount (td=td@entry=0xfffff8000a0fb000, 
    fsflags=<optimized out>, fsflags@entry=65536, 
    fsoptions=0xfffff80001be3000)
    at /usr/home/trasz/git/freebsd-src/sys/kern/vfs_mount.c:998
        fspath = 0xfffff800021c7780 "/net"
        errmsg = 0x0
        fspathlen = 5
        errmsg_len = 0
        errmsg_pos = 3
        autoro = false
        optlist = 0xfffff800021c77c0
        error = 0
        fstypelen = 7
        fstype = 0xfffff800021c7760 "autofs"
        has_nonexport = <optimized out>
        jail_export = <optimized out>
        opt = <optimized out>
        tmp_opt = <optimized out>
#10 0xffffffff80c3936c in sys_nmount (td=0xfffff8000a0fb000, 
    uap=0xfffff8000a0fb400)
    at /usr/home/trasz/git/freebsd-src/sys/kern/vfs_mount.c:475
        flags = 65536
        iovcnt = <optimized out>
        auio = <unavailable>
        error = 0
#11 0xffffffff810516b3 in syscallenter (td=0xfffff8000a0fb000)
    at
/usr/home/trasz/git/freebsd-src/sys/amd64/amd64/../../kern/subr_syscall.c:188
        p = 0xfffffe00f9df7ac0
        sa = 0xfffff8000a0fb3f0
        error = <optimized out>
        se = 0xffffffff816c4ae0 <sysent+12096>
        sy_thr_static = true
        traced = <optimized out>
        _audit_entered = <optimized out>
#12 amd64_syscall (td=0xfffff8000a0fb000, traced=0)
    at /usr/home/trasz/git/freebsd-src/sys/amd64/amd64/trap.c:1194
        ksi = {ksi_link = {tqe_next = 0xfffffe00f5dc0f30, 
            tqe_prev = 0xffffffff81050714 <trap+1940>}, ksi_info = {
            si_signo = 0, si_errno = 0, si_code = 548267104, si_pid = 8, 
            si_uid = 4124839648, si_status = -512, 
            si_addr = 0xffffffff80bc4759 <witness_warn+1001>, si_value = {
              sival_int = 8, sival_ptr = 0x8, sigval_int = 8, 
              sigval_ptr = 0x8}, _reason = {_fault = {_trapno = 0}, _timer = {
                _timerid = 0, _overrun = 32768}, _mesgq = {_mqd = 0}, 
              _poll = {_band = 140737488355328}, _capsicum = {_syscall = 0}, 
              __spare__ = {__spare1__ = 140737488355328, __spare2__ = {
                  34377672, -2048, 3, 0, 0, 0, 65536}}}}, 
          ksi_flags = -2128951196, ksi_sigq = 0xfffff8000a0fb000}

The mount is:

(kgdb) p *mp
$1 = {mnt_vfs_ops = 0, mnt_kern_flag = 1073741824, mnt_flag = 0, mnt_pcpu =
0xfffffe017332bfb0, mnt_rootvnode = 0x0, mnt_vnodecovered = 0xfffff8002eeefe00,
mnt_op = 0xffffffff8396fa10 <autofs_vfsops>,
  mnt_vfc = 0xffffffff8396f9c0 <autofs_vfsconf>, mnt_mtx = {lock_object =
{lo_name = 0xffffffff81135be2 "struct mount mtx", lo_flags = 16973824, lo_data
= 0, lo_witness = 0xfffff8042e575b00},
    mtx_lock = 18446735277785329664}, mnt_gen = 1, mnt_list = {tqe_next =
0xfffffe00f960b100, tqe_prev = 0xfffffe00f73eb068}, mnt_syncer =
0xfffff8002ebe7540, mnt_ref = 3, mnt_nvnodelist = {
    tqh_first = 0xfffff8002eeefa80, tqh_last = 0xfffff8002ebe7568},
mnt_nvnodelistsize = 2, mnt_writeopcount = 0, mnt_opt = 0xfffff800010f8c50,
mnt_optnew = 0x0, mnt_stat = {f_version = 538182936, f_type = 207,
    f_flags = 0, f_bsize = 512, f_iosize = 0, f_blocks = 0, f_bfree = 0,
f_bavail = 0, f_files = 0, f_ffree = 0, f_syncwrites = 0, f_asyncwrites = 0,
f_syncreads = 0, f_asyncreads = 0, f_nvnodelistsize = 2,
    f_spare0 = 0, f_spare = {0, 0, 0, 0, 0, 0, 0, 0, 0}, f_namemax = 255,
f_owner = 0, f_fsid = {val = {-822018296, 207}}, f_charspare = '\000' <repeats
79 times>,
    f_fstypename = "autofs\000\000\000\000\000\000\000\000\000", f_mntfromname
= "map -hosts", '\000' <repeats 1013 times>, f_mntonname = "/net", '\000'
<repeats 1019 times>}, mnt_cred = 0xfffff80001c1cc00,
  mnt_data = 0xfffffe00f7a97000, mnt_time = 0, mnt_iosize_max = 65536,
mnt_export = 0x0, mnt_label = 0x0, mnt_hashseed = 1962805827, mnt_lockref = 1,
mnt_secondary_writes = 0, mnt_secondary_accwrites = 0,
  mnt_susp_owner = 0x0, mnt_exjail = 0x0, mnt_gjprovider = 0x0, mnt_listmtx =
{lock_object = {lo_name = 0xffffffff811d93f1 "struct mount vlist mtx", lo_flags
= 16973824, lo_data = 0,
      lo_witness = 0xfffff8042e586280}, mtx_lock = 0}, mnt_lazyvnodelist =
{tqh_first = 0x0, tqh_last = 0xfffffe00f73ada50}, mnt_lazyvnodelistsize = 0,
mnt_upper_pending = 0, mnt_explock = {lock_object = {
      lo_name = 0xffffffff8126d967 "explock", lo_flags = 108199936, lo_data =
0, lo_witness = 0xfffff8042e586080}, lk_lock = 1, lk_exslpfail = 0, lk_pri =
64, lk_timo = 0}, mnt_uppers = {tqh_first = 0x0,
    tqh_last = 0xfffffe00f73ada90}, mnt_notify = {tqh_first = 0x0, tqh_last =
0xfffffe00f73adaa0}, mnt_taskqueue_link = {stqe_next = 0x0},
mnt_taskqueue_flags = 0, mnt_unmount_retries = 0}

-- 
You are receiving this mail because:
You are the assignee for the bug.