# kgdb /boot/kernel/kernel /var/crash/vmcore.1
GNU gdb (GDB) 12.1 [GDB v12.1 for FreeBSD]
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-portbld-freebsd13.1".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /boot/kernel/kernel...
Reading symbols from /usr/lib/debug//boot/kernel/kernel.debug...

Unread portion of the kernel message buffer:


Fatal trap 12: page fault while in kernel mode
cpuid = 0; apic id = 00
fault virtual address	= 0x388
fault code		= supervisor read data, page not present
instruction pointer	= 0x20:0xffffffff823745d8
stack pointer	        = 0x28:0xfffffe0001d7dd40
frame pointer	        = 0x28:0xfffffe0001d7dda0
code segment		= base 0x0, limit 0xfffff, type 0x1b
			= DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags	= interrupt enabled, resume, IOPL = 0
current process		= 12 (swi4: clock (0))
trap number		= 12
panic: page fault
cpuid = 0
time = 1675427109
KDB: stack backtrace:
db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe0001d7d910
kdb_backtrace() at kdb_backtrace+0x37/frame 0xfffffe0001d7d9c0
vpanic() at vpanic+0x184/frame 0xfffffe0001d7da20
panic() at panic+0x43/frame 0xfffffe0001d7da80
trap_fatal() at trap_fatal+0x377/frame 0xfffffe0001d7dae0
trap_pfault() at trap_pfault+0x4f/frame 0xfffffe0001d7db40
trap() at trap+0x259/frame 0xfffffe0001d7dc50
trap_check() at trap_check+0x29/frame 0xfffffe0001d7dc70
calltrap() at calltrap+0x8/frame 0xfffffe0001d7dc70
--- trap 0xc, rip = 0xffffffff823745d8, rsp = 0xfffffe0001d7dd40, rbp = 0xfffffe0001d7dda0 ---
pfsync_defer_tmo() at pfsync_defer_tmo+0x78/frame 0xfffffe0001d7dda0
softclock_call_cc() at softclock_call_cc+0x13d/frame 0xfffffe0001d7de40
softclock() at softclock+0x79/frame 0xfffffe0001d7de60
ithread_loop() at ithread_loop+0x241/frame 0xfffffe0001d7def0
fork_exit() at fork_exit+0x7e/frame 0xfffffe0001d7df30
fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe0001d7df30
--- trap 0x80c54c8a, rip = 0xffffffff80b7f9ec, rsp = 0, rbp = 0xfffff80003482800 ---
mi_startup() at mi_startup+0xcc/frame 0xfffff80003482800
??() at 0xfffff800033bd500/frame 0xfffff80003483e00
??() at 0xfffff80003482800/frame 0xfffff80003483b00
??() at 0xfffff80003483e00/frame 0xfffff80003484a00
??() at 0xfffff80003483b00/frame 0xfffff80003484900
??() at 0xfffff80003484a00/frame 0xfffff80003484800
??() at 0xfffff80003484900/frame 0xfffff80003484700
??() at 0xfffff80003484800/frame 0xfffff80003484600
??() at 0xfffff80003484700/frame 0xfffff80003484500
??() at 0xfffff80003484600/frame 0xfffff80003484400
??() at 0xfffff80003484500/frame 0xfffff80003484300
??() at 0xfffff80003484400/frame 0xfffff80003484200
??() at 0xfffff80003484300/frame 0xfffff80003484100
??() at 0xfffff80003484200/frame 0xfffff80003484000
??() at 0xfffff80003484100/frame 0xfffff800033c1e00
??() at 0xfffff80003484000/frame 0xfffff800033c1a00
??() at 0xfffff800033c1e00/frame 0xfffff800033c1800
??() at 0xfffff800033c1a00/frame 0xfffff800033c1700
??() at 0xfffff800033c1800/frame 0xfffff800033c1500
??() at 0xfffff800033c1700/frame 0xfffff800033c1300
??() at 0xfffff800033c1500/frame 0xfffff8000371a300
??() at 0xfffff800033c1300/frame 0xfffff800037a7200
??() at 0xfffff8000371a300/frame 0xfffff800037a7100
??() at 0xfffff800037a7200/frame 0xfffff800037a8e00
??() at 0xfffff800037a7100/frame 0xfffff800037a8a00
??() at 0xfffff800037a8e00/frame 0xfffff800037a8900
??() at 0xfffff800037a8a00/frame 0xfffff80003982d00
??() at 0xfffff800037a8900/frame 0xfffff80003982900
??() at 0xfffff80003982d00/frame 0xfffff80003982500
??() at 0xfffff80003982900/frame 0xfffff80003982100
??() at 0xfffff80003982500/frame 0xfffff80003983c00
??() at 0xfffff80003982100/frame 0xfffff80003983800
??() at 0xfffff80003983c00/frame 0xfffff80003983400
??() at 0xfffff80003983800/frame 0xfffff80003983000
??() at 0xfffff80003983400/frame 0xfffff80003984b00
??() at 0xfffff80003983000/frame 0xfffff80003984700
??() at 0xfffff80003984b00/frame 0xfffff80003984300
??() at 0xfffff80003984700/frame 0xfffff8000397be00
??() at 0xfffff80003984300/frame 0xfffff8000397ba00
??() at 0xfffff8000397be00/frame 0xfffff800037a9300
??() at 0xfffff8000397ba00/frame 0xfffff800037aae00
??() at 0xfffff800037a9300/frame 0xfffff800037aaa00
??() at 0xfffff800037aae00/frame 0xfffff800037aa600
??() at 0xfffff800037aaa00/frame 0xfffff8000397b600
??() at 0xfffff800037aa600/frame 0xfffff8000397b200
??() at 0xfffff8000397b600/frame 0xfffff80004c30200
??() at 0xfffff8000397b200/frame 0xfffff80004c31d00
??() at 0xfffff80004c30200/frame 0xfffff800037aa000
??() at 0xfffff80004c31d00/frame 0xfffff8001ac36700
??() at 0xfffff800037aa000
Uptime: 9m3s
Dumping 260 out of 986 MB:..7%..13%..25%..31%..44%..56%..62%..74%..87%..93%

__curthread () at /usr/src/sys/amd64/include/pcpu_aux.h:55
55		__asm("movq %%gs:%P1,%0" : "=r" (td) : "n" (offsetof(struct pcpu,
(kgdb) frame 10
#10 0xffffffff823745d8 in pfsync_defer_tmo (arg=0xfffff80037370900) at /usr/src/sys/netpfil/pf/if_pfsync.c:1842
warning: Source file is more recent than executable.
1842		CURVNET_SET(m->m_pkthdr.rcvif->if_vnet);
(kgdb) print *m
$1 = {{m_next = 0x0, m_slist = {sle_next = 0x0}, m_stailq = {stqe_next = 0x0}}, {m_nextpkt = 0x0, m_slistpkt = {sle_next = 0x0},
    m_stailqpkt = {stqe_next = 0x0}}, m_data = 0xfffff800046d2968 "`", m_len = 64, m_type = 1, m_flags = 32770, {{{m_pkthdr = {{
            snd_tag = 0x0, rcvif = 0x0}, tags = {slh_first = 0x0}, len = 64, flowid = 0, csum_flags = 0, fibnum = 0,
          numa_domain = 255 '\377', rsstype = 0 '\000', {rcv_tstmp = 0, {l2hlen = 0 '\000', l3hlen = 0 '\000',
              l4hlen = 0 '\000', l5hlen = 0 '\000', inner_l2hlen = 0 '\000', inner_l3hlen = 0 '\000', inner_l4hlen = 0 '\000',
              inner_l5hlen = 0 '\000'}}, PH_per = {eight = "\000\000\000\000\000\000\000", sixteen = {0, 0, 0, 0}, thirtytwo = {
              0, 0}, sixtyfour = {0}, unintptr = {0}, ptr = 0x0}, PH_loc = {eight = "\000\000\000\000\000\000\000", sixteen = {
              0, 0, 0, 0}, thirtytwo = {0, 0}, sixtyfour = {0}, unintptr = {0}, ptr = 0x0}}, {m_epg_npgs = 0 '\000',
          m_epg_nrdy = 0 '\000', m_epg_hdrlen = 0 '\000', m_epg_trllen = 0 '\000', m_epg_1st_off = 0, m_epg_last_len = 0,
          m_epg_flags = 0 '\000', m_epg_record_type = 0 '\000', __spare = "\000", m_epg_enc_cnt = 0, m_epg_tls = 0x40,
          m_epg_so = 0xff000000000000, m_epg_seqno = 0, m_epg_stailq = {stqe_next = 0x0}}}, {m_ext = {{ext_count = 96,
            ext_cnt = 0x403a100000000060}, ext_size = 8979242, ext_type = 0, ext_flags = 16711424, {{
              ext_buf = 0xff3a180000000060 <error: Cannot access memory at address 0xff3a180000000060>,
              ext_arg2 = 0xfeff00000089032a}, {extpg_pa = {18391038416599908448, 18374405004703892266, 504403158265495552,
                18374405004703892266, 432345564227567616},
              extpg_trail = "\210\000\236\220\300\000\000\000*\003\211\000\000\000\377\376\000\000\000\000\000\000\000\a\000\001\000\000\000\000\000\000\tmgmt-fw02\003net\003ibn\002ie\000\000\034\000\001\000\000\000\000\000",
              extpg_hdr = '\000' <repeats 22 times>}}, ext_free = 0x0, ext_arg1 = 0x0}, m_pktdat = 0xfffff800046d2958 "`"}},
    m_dat = 0xfffff800046d2920 ""}}
(kgdb) print m->m_pkthdr
$2 = {{snd_tag = 0x0, rcvif = 0x0}, tags = {slh_first = 0x0}, len = 64, flowid = 0, csum_flags = 0, fibnum = 0, numa_domain = 255 '\377',
  rsstype = 0 '\000', {rcv_tstmp = 0, {l2hlen = 0 '\000', l3hlen = 0 '\000', l4hlen = 0 '\000', l5hlen = 0 '\000',
      inner_l2hlen = 0 '\000', inner_l3hlen = 0 '\000', inner_l4hlen = 0 '\000', inner_l5hlen = 0 '\000'}}, PH_per = {
    eight = "\000\000\000\000\000\000\000", sixteen = {0, 0, 0, 0}, thirtytwo = {0, 0}, sixtyfour = {0}, unintptr = {0}, ptr = 0x0},
  PH_loc = {eight = "\000\000\000\000\000\000\000", sixteen = {0, 0, 0, 0}, thirtytwo = {0, 0}, sixtyfour = {0}, unintptr = {0},
    ptr = 0x0}}
(kgdb) bt
#0  __curthread () at /usr/src/sys/amd64/include/pcpu_aux.h:55
#1  doadump (textdump=textdump@entry=1) at ../../../kern/kern_shutdown.c:399
#2  0xffffffff80bf0fba in kern_reboot (howto=260) at ../../../kern/kern_shutdown.c:487
#3  0xffffffff80bf1443 in vpanic (fmt=0xffffffff81180777 "%s", ap=0xfffffe0001d7da60) at ../../../kern/kern_shutdown.c:920
#4  0xffffffff80bf1243 in panic (fmt=<unavailable>) at ../../../kern/kern_shutdown.c:844
#5  0xffffffff8107d4c7 in trap_fatal (frame=0xfffffe0001d7dc80, eva=904) at ../../../amd64/amd64/trap.c:944
#6  0xffffffff8107d51f in trap_pfault (frame=frame@entry=0xfffffe0001d7dc80, usermode=false, signo=<optimized out>, signo@entry=0x0,
    ucode=<optimized out>, ucode@entry=0x0) at ../../../amd64/amd64/trap.c:763
#7  0xffffffff8107cc19 in trap (frame=frame@entry=0xfffffe0001d7dc80) at ../../../amd64/amd64/trap.c:441
#8  0xffffffff8107d869 in trap_check (frame=0xfffffe0001d7dc80) at ../../../amd64/amd64/trap.c:667
#9  <signal handler called>
#10 0xffffffff823745d8 in pfsync_defer_tmo (arg=0xfffff80037370900) at /usr/src/sys/netpfil/pf/if_pfsync.c:1842
#11 0xffffffff80c0ec0d in softclock_call_cc (c=0xfffff80037370920, cc=cc@entry=0xffffffff81cbb100 <cc_cpu>, direct=direct@entry=0)
    at ../../../kern/kern_timeout.c:695
#12 0xffffffff80c0f099 in softclock (arg=0xffffffff81cbb100 <cc_cpu>) at ../../../kern/kern_timeout.c:815
#13 0xffffffff80bb1c61 in intr_event_execute_handlers (ie=0xfffff800033c1500, p=<optimized out>) at ../../../kern/kern_intr.c:1168
#14 ithread_execute_handlers (ie=<optimized out>, p=<optimized out>) at ../../../kern/kern_intr.c:1181
#15 ithread_loop (arg=<optimized out>, arg@entry=0xfffff8000343d200) at ../../../kern/kern_intr.c:1269
#16 0xffffffff80bae75e in fork_exit (callout=0xffffffff80bb1a20 <ithread_loop>, arg=0xfffff8000343d200, frame=0xfffffe0001d7df40)
    at ../../../kern/kern_fork.c:1093
#17 <signal handler called>
#18 mi_startup () at ../../../kern/init_main.c:322
#19 0xfffff800033bd500 in ?? ()
#20 0xfffff8000347dd00 in ?? ()
#21 0x0000003a35697773 in ?? ()
#22 0x0000000000000000 in ?? ()
(kgdb)