[Bug 256928] dtrace: stack() cannot resolve kernel module symbols

From: <bugzilla-noreply_at_freebsd.org>
Date: Thu, 01 Jul 2021 20:01:32 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=256928

            Bug ID: 256928
           Summary: dtrace: stack() cannot resolve kernel module symbols
           Product: Base System
           Version: 12.2-RELEASE
          Hardware: amd64
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: bin
          Assignee: bugs@FreeBSD.org
          Reporter: bmueller@panasas.com
                CC: rpokala@FreeBSD.org

dtrace stack() is not resolving kernel module symbols for either FreeBSD 12.1
or 12.2.  The example below exercises autofs.ko.  autofs_readdir is displayed
as linux.ko`0xffffffff82a3b314

dtrace -n 'fbt:autofs::entry { @[stack(), ustack()] = count(); }' -c 'ls -l
/net'
...
              linux.ko`0xffffffff82a3b314
              kernel`VOP_READDIR_APV+0x7b
              kernel`kern_getdirentries+0x201
              kernel`sys_getdirentries+0x29
              kernel`amd64_syscall+0x387
              kernel`0xffffffff8106785e

              libc.so.7`__sys_getdirentries+0xa
              libc.so.7`readdir+0x30
              libc.so.7`0x800389677
              libc.so.7`fts_children+0x14b
              ls`traverse+0x1a7
              ls`main+0x945
              ls`_start+0x100
              `0x800235000
                1
...
# kgdb /boot/kernel/kernel /dev/mem
...
(kgdb) l* 0xffffffff82a3b314
Reading in symbols for /usr/src/sys/fs/autofs/autofs_vnops.c...done.
0xffffffff82a3b314 is in autofs_readdir
(/usr/src/sys/fs/autofs/autofs_vnops.c:411).
406             uio = ap->a_uio;
407             initial_resid = ap->a_uio->uio_resid;
408
409             KASSERT(vp->v_type == VDIR, ("!VDIR"));
410
411             if (autofs_cached(anp, NULL, 0) == false &&
412                 autofs_ignore_thread(curthread) == false) {
413                     error = autofs_trigger_vn(vp, "", 0, &newvp);
414                     if (error != 0)
415                             return (error);

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