Kernel panic in ieee80211_chan2mode <- SIOCS80211 ioctl

From: Marcin Cieslak <saper_at_saper.info>
Date: Tue, 08 Sep 2026 01:58:46 UTC
This is amd64 current as of 067ae9850f05a27239c28ae5819e4016e997cff2

brcmfmac0@pci0:2:0:0:	class=0x028000 rev=0x05 hdr=0x00 vendor=0x14e4 device=0x43a3 subvendor=0x106b subdevice=0x0159


(running the vibe coded driver as of 9adbe774d3be91827d628fbd811daf63512acb6d)

This was working very stable with an old Cisco ISO router.

Now I try to attach to Mikrotik hap ac2, the network
is configured very similarly (no authentication whatsoever),
but now the kernel panics trying to attach to the network.

I have a full core dump of this.

Some random poking, text crash information further below:

(kgdb) frame 18
#18 ieee80211_chan2mode (chan=0x33443836)
     at /usr/src/sys/net80211/ieee80211.c:2340
2340		if (IEEE80211_IS_CHAN_VHT_2GHZ(chan))
(kgdb) p chan
$1 = (const struct ieee80211_channel *) 0x33443836
(kgdb) p *chan
Cannot access memory at address 0x33443836

#25 0xffffffff80e53c38 in ieee80211_ioctl (
     ifp=0xfffff80001141000, cmd=2149607914,
     data=0xfffffe00f8af1d50 "wlan0")
     at /usr/src/sys/net80211/ieee80211_ioctl.c:3777
3777				error = ieee80211_ioctl_set80211(vap, cmd,
(kgdb) p *(struct ieee80211req *)data
$5 = {i_name = "wlan0\000\000\000\000\000\000\000\000\000\000",
   i_type = 21, i_val = 0, i_len = 42, i_data = 0xe8af1c06d66}


radziecki dumped core - see /var/crash/vmcore.6

Tue Sep  8 02:41:03 CEST 2026

FreeBSD radziecki 16.0-CURRENT FreeBSD 16.0-CURRENT #7 nvme-D59156-n288557-479aa27358b1: Wed Aug 26 01:34:46 CEST 2026     saper@radziecki:/big/obj/usr/src/amd64.amd64/sys/VAIO  amd64

panic: page fault

(No debugging symbols found in /boot/modules/if_brcmfmac.ko)

__curthread () at /usr/src/sys/amd64/include/pcpu_aux.h:57
57		__asm("movq %%gs:%c1,%0" : "=r" (td)
(kgdb) #0  __curthread () at /usr/src/sys/amd64/include/pcpu_aux.h:57
         td = <optimized out>
#1  doadump (textdump=32) at /usr/src/sys/kern/kern_shutdown.c:399
         error = 0
         coredump = <optimized out>
#2  0xffffffff804f7e78 in db_fncall_generic (args=0xfffffe00f8af0fe0,
     addr=<optimized out>, rv=<optimized out>, nargs=<optimized out>)
     at /usr/src/sys/ddb/db_command.c:631
         f = <optimized out>
#3  db_fncall (dummy1=<optimized out>, dummy2=<optimized out>,
     dummy3=<optimized out>, dummy4=<optimized out>)
     at /usr/src/sys/ddb/db_command.c:679
         fn_addr = -2134200320
         args = {32, 22, -2194851032896, 0, -2195742183424, 4,
           -6108595435829095688, 0, 4, -2116172124}
         nargs = <optimized out>
         t = <optimized out>
         retval = <optimized out>
#4  0xffffffff804f798a in db_command (last_cmdp=<optimized out>,
     cmd_table=<optimized out>, dopager=false)
     at /usr/src/sys/ddb/db_command.c:508
         modif = " \021\257\370\000\376\377\377\243\306݁\377\377\377\377\020\022\257\370\000\376\377\377\000\000\000\000\000\000\000\000\000\021\257\370\000\376\377\377\347\262O\200\377\377\377\377\220nЀ\377\377\377\377\000\000\000\000\000\000\000\000\340\301݁\377\377\377\377\243\306݁\377\377\377\377;\000\000\000\000\000\000\000\210;8\201\377\377\377\377`\020\257\370\000\376\377\377\370\222\325\332\320\3509\253\360\020\257\370\000\376\377\377"
         addr = 4294977024
         count = -6108595435829095688
         cmd = 0xffffffff81c17d08 <db_cmds+1736>
         have_addr = <optimized out>
         t = <optimized out>
         result = <optimized out>
#5  0xffffffff804f7a16 in db_command_script (
     command=command@entry=0xffffffff81ddc6a4 <db_recursion_data+68> "call doadump()") at /usr/src/sys/ddb/db_command.c:573
No locals.
#6  0xffffffff804fda68 in db_script_exec (
     scriptname=scriptname@entry=0xfffffe00f8af11c0 "kdb.enter.panic",
     warnifnotfound=warnifnotfound@entry=0) at /usr/src/sys/ddb/db_script.c:301
         buffer = 0xffffffff81ddc6b3 <db_recursion_data+83> " reset"
         jb = {{_jb = {4294977024, -2194851032824, -2194851032656,
               -2194851032800, -2116172124, -2194851032560, 0, -2142250205,
               -2120633232, -2126436755, -2126680830, 0}}}
         dsp = 0xffffffff81ddc1e0 <db_script_table+160>
         drd = <optimized out>
         command = 0xffffffff81ddc6a4 <db_recursion_data+68> "call doadump()"
         prev_jb = 0xfffffe00f8af1210
#7  0xffffffff804fd952 in db_script_kdbenter (eventname=<optimized out>)
     at /usr/src/sys/ddb/db_script.c:323
         scriptname = "kdb.enter.panic\000\b\000\000\0000\000\000\0003\000\000\000\000\000\000"
#8  0xffffffff804fb12b in db_trap (type=<optimized out>, code=<optimized out>)
     at /usr/src/sys/ddb/db_main.c:266
         jb = {{_jb = {0, -2194851032584, -2194851032432, -8795427747968,
               -2118024192, -2194851032560, -2194851031888, -2142261064,
               -2194851032464, -2136174129, -2113228960, 3}}}
         bkpt = false
         watchpt = false
         prev_jb = 0x0
         why = <unavailable>
#9  0xffffffff80cfd5c5 in kdb_trap (type=type@entry=3, code=code@entry=0,
     tf=tf@entry=0xfffffe00f8af14b0) at /usr/src/sys/kern/subr_kdb.c:790
         __pc = 0x0
         __pc = 0x0
         other_cpus = {__bits = {18446744071582504964, 4294967282,
             18446741878858519872, 18446744071582504962, 18446741874686296064,
             5, 18446744071582870786, 1698193766, 18446744071575724912, 0,
             18446741874686296096, 12, 18446741878858519600, 0,
             18446741878858522432, 15989924195560}}
         be = 0xffffffff81c18400 <ddb_dbbe>
         intr = 70
         did_stop_cpus = <optimized out>
         handled = <optimized out>
#10 0xffffffff8120cfd1 in trap (frame=<optimized out>)
     at /usr/src/sys/amd64/amd64/trap.c:702
         __pc = 0x0
         __pc = 0x0
         __pc = 0x0
         ksi = {ksi_link = {tqe_next = 0x1, tqe_prev = 0xfffffe00f9409448},
           ksi_info = {si_signo = 5, si_errno = 0, si_code = -1, si_pid = 0,
             si_uid = 4172223744, si_status = -512,
             si_addr = 0xffffffff80d06a4b <_vprintf+139>, si_value = {
               sival_int = 5, sival_ptr = 0xffffffff00000005, sigval_int = 5,
               sigval_ptr = 0xffffffff00000005}, _reason = {_fault = {
                 _trapno = 0}, _timer = {_timerid = 0, _overrun = 0}, _mesgq = {
                 _mqd = 0}, _poll = {_band = 0}, _capsicum = {_syscall = 0},
               __spare__ = {__spare1__ = 0, __spare2__ = {-122743712, -512,
                   128, 0, -122743712, -512, 128}}}}, ksi_flags = 977421312,
           ksi_sigq = 0x696e6170203a7265}
         signo = 0
         ucode = 256
         td = <optimized out>
         p = 0xfffffe00c3919b08
         dr6 = 0
         type = 3
         addr = <optimized out>
         pf = <optimized out>
         i = <optimized out>
#11 <signal handler called>
No locals.
#12 kdb_enter (why=<optimized out>, msg=<optimized out>)
     at /usr/src/sys/kern/subr_kdb.c:556
No locals.
#13 0xffffffff80cab279 in vpanic (fmt=<optimized out>,
     ap=ap@entry=0xfffffe00f8af16e0) at /usr/src/sys/kern/kern_shutdown.c:962
         buf = "page fault", '\000' <repeats 245 times>
         __pc = 0x0
         __pc = 0x0
         __pc = 0x0
         other_cpus = {__bits = {2, 0 <repeats 15 times>}}
         td = 0xfffff80027a74780
         bootopt = <optimized out>
         newpanic = <optimized out>
#14 0xffffffff80cab0f3 in panic (fmt=0x0)
     at /usr/src/sys/kern/kern_shutdown.c:887
         ap = {{gp_offset = 16, fp_offset = 48,
             overflow_arg_area = 0xfffffe00f8af1710,
             reg_save_area = 0xfffffe00f8af16b0}}
#15 0xffffffff8120d6b8 in trap_fatal (frame=<optimized out>,
     eva=<optimized out>) at /usr/src/sys/amd64/amd64/trap.c:1031
         type = <optimized out>
         handled = <optimized out>
#16 0xffffffff8120d6b8 in trap_pfault (frame=0xfffffe00f8af1770,
     usermode=false, signo=<optimized out>, ucode=<optimized out>)
         __pc = 0x0
         __pc = 0x0
         __pc = 0x0
         td = <optimized out>
         p = <optimized out>
         eva = <optimized out>
         map = <optimized out>
         ftype = <optimized out>
         rv = <optimized out>
#17 <signal handler called>
No locals.
#18 ieee80211_chan2mode (chan=0x33443836)
     at /usr/src/sys/net80211/ieee80211.c:2340
No locals.
#19 0xffffffff80e7014f in ieee80211_fix_rate (ni=0xfffffe00fa139000,
     nrs=0xfffffe00fa1392a5, flags=1)
     at /usr/src/sys/net80211/ieee80211_proto.c:650
         vap = 0xfffff80025bdd000
         ic = 0xfffffe00f9409448
         error = 0
         badrate = 0
         okrate = 0
         ucastrate = <optimized out>
         fixedrate = <optimized out>
         srs = <optimized out>
         i = <optimized out>
         r = <optimized out>
         j = <optimized out>
         rix = <optimized out>
#20 0xffffffff80e525f2 in ieee80211_setup_rates (ni=0x33443836,
     ni@entry=0xfffffe00fa139000, rates=<optimized out>,
     xrates=xrates@entry=0xfffffe00f8af19e7 "3", flags=-2048, flags@entry=1)
     at /usr/src/sys/net80211/ieee80211_input.c:450
         vap = 0xfffff80001927000
         rs = <optimized out>
#21 0xffffffff80e63ca6 in ieee80211_sta_join (
     vap=vap@entry=0xfffff80025bdd000, chan=<optimized out>,
     se=se@entry=0xfffffe00f8af19a8)
     at /usr/src/sys/net80211/ieee80211_node.c:1006
         ni = 0xfffffe00fa139000
         do_ht = <optimized out>
         ic = <optimized out>
#22 0xffffffff80e576dc in setmlme_assoc_sta (vap=0xfffff80025bdd000,
     mac=0xfffffe00f8af1962 "\324\001Íh\323lower-deck",
     ssid_len=<optimized out>, ssid=<optimized out>)
     at /usr/src/sys/net80211/ieee80211_ioctl.c:1693
         lookup = {mac = 0xfffffe00f8af1962 "\324\001Íh\323lower-deck",
           esslen = 0, essid = 0xfffff80025bdd50c "", found = true, se = {
             se_macaddr = "\324\001Í", <incomplete sequence \323>,
             se_bssid = "\324\001Í", <incomplete sequence \323>,
             se_ssid = "\000\nlower-deck", '\000' <repeats 21 times>,
             se_rates = "\001\036\000\020\000\000\025f1\006\000\000D401C",
             se_xrates = "3\000D68D3\000\000\000\000\000\000\000\000\000",
             se_tstamp = {data = "\000\000\000\000\000\000\000", tsf = 0},
             se_intval = 100, se_capinfo = 1057, se_chan = 0xfffffe00f9409a40,
             se_timoff = 0, se_fhdwell = 0, se_fhindex = 0 '\000',
             se_dtimperiod = 0 '\000', se_erp = 0, se_rssi = 50 '2',
             se_noise = -95 '\241', se_cc = "\000",
             se_meshid = '\000' <repeats 33 times>, se_ies = {wpa_ie = 0x0,
               rsn_ie = 0x0, wme_ie = 0x0, ath_ie = 0x0, htcap_ie = 0x0,
               htinfo_ie = 0x0, tdma_ie = 0x0, meshid_ie = 0x0,
               vhtcap_ie = 0x0, vhtopmode_ie = 0x0, vhtpwrenv_ie = 0x0,
               apchanrep_ie = 0x0, bssload_ie = 0x0, spare = {0x0, 0x0, 0x0,
                 0x0}, data = 0xfffff800016d4800 "", len = 126}, se_age = 2063}}
         rv = <optimized out>
#23 ieee80211_ioctl_setmlme (vap=vap@entry=0xfffff80025bdd000,
     ireq=ireq@entry=0xfffffe00f8af1d50)
     at /usr/src/sys/net80211/ieee80211_ioctl.c:1752
         mlme = {im_op = 1 '\001', im_ssid_len = 10 '\n', im_reason = 0,
           im_macaddr = "\324\001Í", <incomplete sequence \323>,
           im_ssid = "lower-deck", '\000' <repeats 21 times>}
         error = <optimized out>
#24 0xffffffff80e55407 in ieee80211_ioctl_set80211 (
     vap=vap@entry=0xfffff80025bdd000, cmd=<optimized out>,
     ireq=ireq@entry=0xfffffe00f8af1d50)
     at /usr/src/sys/net80211/ieee80211_ioctl.c:3093
         tmpkey = "P\035\257\370\000\376\377\377P\035\257\370\000\376\377\377"
         tmpssid = "P\035\257\370\000\376\377\377P\035\257\370\000\376\377\377\000\000\000\000\000\000\000\000\000н%\000\370\377\377"
         tmpbssid = "P\035\257\370\000\376"
         ic = 0x11
         error = 0
         auth = <optimized out>
         kid = <optimized out>
         k = <optimized out>
         flags = <optimized out>
#25 0xffffffff80e53c38 in ieee80211_ioctl (ifp=0xfffff80001141000,
     cmd=2149607914, data=0xfffffe00f8af1d50 "wlan0")
     at /usr/src/sys/net80211/ieee80211_ioctl.c:3777
         vap = 0xfffff80025bdd000
         ic = 0xfffffe00f9409448
         error = -99380540
         wait = 0
         ic_used = 1
         ifr = <optimized out>
         ifa = <optimized out>
#26 0xffffffff80def98d in ifioctl (so=0xfffff8000d718c00, cmd=2149607914,
     data=0xfffffe00f8af1d50 "wlan0", td=0xfffff80027a74780)
     at /usr/src/sys/net/if.c:2978
         thunk = {ifc = {ifc_len = -122741632, ifc_ifcu = {
               ifcu_buf = 0xffffffff80d6fbd9 <uipc_detach+985> "H\201\303\370\001", ifcu_req = 0xffffffff80d6fbd9 <uipc_detach+985>}}, ifd = {
             ifd_name = "\200\034\257\370\000\376\377\377\331\373ր\377\377\377\377", ifd_cmd = 0, ifd_len = 18446744071579357908,
             ifd_data = 0xfffffe00f8af1c80}, ifgr = {
             ifgr_name = "\200\034\257\370\000\376\377\377\331\373ր\377\377\377\377", ifgr_len = 0, ifgr_ifgru = {
               ifgru_group = "\324\322\a\201\377\377\377\377\200\034\257\370\000\376\377\377", ifgru_groups = 0xffffffff8107d2d4 <uma_zfree_arg+100>}}, ifmr = {
             ifm_name = "\200\034\257\370\000\376\377\377\331\373ր\377\377\377\377", ifm_current = 0, ifm_mask = 0, ifm_status = -2130193708, ifm_active = -1,
             ifm_count = -122741632,
             ifm_ulist = 0xffffffff80c6d99e <khelp_destroy_osd+46>}}
         saved_vnet = 0x0
         saved_cmd = 2149607914
         ifmr32 = 0xfffffe00f8af1d50
         ifc32 = 0xfffffe00f8af1d50
         ifgr32 = 0xfffffe00f8af1d50
         ifd32 = <optimized out>
         error = <optimized out>
         ifp = 0xfffff80001141000
         oif_flags = 34819
         ifr = <optimized out>
         shutdown = <optimized out>
#27 0xffffffff80d233e2 in fo_ioctl (fp=0xfffff80005456370,
     com=18446741878881882789, data=0xfffffe00f8af1d50, active_cred=0x11,
     td=0xfffff80027a74780) at /usr/src/sys/sys/file.h:391
No locals.
#28 kern_ioctl (td=td@entry=0xfffff80027a74780, fd=<optimized out>,
     com=18446741878881882789, com@entry=2149607914,
     data=data@entry=0xfffffe00f8af1d50 "wlan0")
     at /usr/src/sys/kern/sys_generic.c:834
         tmp = -1
         fdp = 0xfffffe00f59b74f0
         locked = 0
         fp = 0xfffff80005456370
         error = <optimized out>
         f_flag = 0
#29 0xffffffff80d230e1 in sys_ioctl (td=<optimized out>,
     uap=0xfffff80027a74ba8) at /usr/src/sys/kern/sys_generic.c:739
         smalldata = "wlan0", '\000' <repeats 11 times>, "\025\000\000\000*\000\000\000fm\300\361\212\016\000\0000", '\000' <repeats 15 times>, "\b\233\221\303\000\376\377\377\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\0005́\377\377\377\377\000\036\257\370\000\376\377\3778\240ր\377\377\377\377\240eE\005\000\370\377\377 I\300\361\212\016\000\000\233", '\000' <repeats 14 times>
         arg = 1851878519
         com = 2149607914
         size = 32
         data = 0xfffffe00f8af1d50 "wlan0"
         error = <optimized out>
#30 0xffffffff8120df16 in syscallenter (td=0xfffff80027a74780)
     at /usr/src/sys/amd64/amd64/../../kern/subr_syscall.c:193
         se = 0xffffffff81cc2b20 <sysent+1728>
         p = 0xfffffe00c3919b08
         sa = <optimized out>
         error = <optimized out>
         sy_thr_static = <optimized out>
         traced = <optimized out>
#31 amd64_syscall (td=0xfffff80027a74780, traced=0)
     at /usr/src/sys/amd64/amd64/trap.c:1278
         ksi = {ksi_link = {tqe_next = 0xfffff80027a74780,
             tqe_prev = 0xf0982170}, ksi_info = {si_signo = -122741136,
             si_errno = -512, si_code = -2134737162, si_pid = -1,
             si_uid = 3671429880, si_status = -1422268208,
             si_addr = 0xfffff80027a74780, si_value = {sival_int = -782787728,
               sival_ptr = 0xe82d1579b70, sigval_int = -782787728,
               sigval_ptr = 0xe82d1579b70}, _reason = {_fault = {
                 _trapno = -1013867768}, _timer = {_timerid = -1013867768,
                 _overrun = -512}, _mesgq = {_mqd = -1013867768}, _poll = {
                 _band = -2195742156024}, _capsicum = {_syscall = -1013867768},
               __spare__ = {__spare1__ = -2195742156024, __spare2__ = {
                   -623537416, -1422268208, 665274240, -2048, -122740944, -512,
                   -2128556536}}}}, ksi_flags = -256317941,
           ksi_sigq = 0x44f0982170}
#32 <signal handler called>
No locals.
#33 0x00000e8af89db48a in ?? ()
No symbol table info available.
Backtrace stopped: Cannot access memory at address 0xe8af1c06ce8
(kgdb) Tracing command "wpa_supplicant\000\000\000\000\000" pid 547 tid 101303 (CPU 0)
#0  __curthread () at /usr/src/sys/amd64/include/pcpu_aux.h:57
#1  doadump (textdump=32) at /usr/src/sys/kern/kern_shutdown.c:399
#2  0xffffffff804f7e78 in db_fncall_generic (args=0xfffffe00f8af0fe0,
     addr=<optimized out>, rv=<optimized out>, nargs=<optimized out>)
     at /usr/src/sys/ddb/db_command.c:631
#3  db_fncall (dummy1=<optimized out>, dummy2=<optimized out>,
     dummy3=<optimized out>, dummy4=<optimized out>)
     at /usr/src/sys/ddb/db_command.c:679
#4  0xffffffff804f798a in db_command (last_cmdp=<optimized out>,
     cmd_table=<optimized out>, dopager=false)
     at /usr/src/sys/ddb/db_command.c:508
#5  0xffffffff804f7a16 in db_command_script (
     command=command@entry=0xffffffff81ddc6a4 <db_recursion_data+68> "call doadump()") at /usr/src/sys/ddb/db_command.c:573
#6  0xffffffff804fda68 in db_script_exec (
     scriptname=scriptname@entry=0xfffffe00f8af11c0 "kdb.enter.panic",
     warnifnotfound=warnifnotfound@entry=0) at /usr/src/sys/ddb/db_script.c:301
#7  0xffffffff804fd952 in db_script_kdbenter (eventname=<optimized out>)
     at /usr/src/sys/ddb/db_script.c:323
#8  0xffffffff804fb12b in db_trap (type=<optimized out>, code=<optimized out>)
     at /usr/src/sys/ddb/db_main.c:266
#9  0xffffffff80cfd5c5 in kdb_trap (type=type@entry=3, code=code@entry=0,
     tf=tf@entry=0xfffffe00f8af14b0) at /usr/src/sys/kern/subr_kdb.c:790
#10 0xffffffff8120cfd1 in trap (frame=<optimized out>)
     at /usr/src/sys/amd64/amd64/trap.c:702
#11 <signal handler called>
#12 kdb_enter (why=<optimized out>, msg=<optimized out>)
     at /usr/src/sys/kern/subr_kdb.c:556
#13 0xffffffff80cab279 in vpanic (fmt=<optimized out>,
     ap=ap@entry=0xfffffe00f8af16e0) at /usr/src/sys/kern/kern_shutdown.c:962
#14 0xffffffff80cab0f3 in panic (fmt=0x0)
     at /usr/src/sys/kern/kern_shutdown.c:887
#15 0xffffffff8120d6b8 in trap_fatal (frame=<optimized out>,
     eva=<optimized out>) at /usr/src/sys/amd64/amd64/trap.c:1031
#16 0xffffffff8120d6b8 in trap_pfault (frame=0xfffffe00f8af1770,
     usermode=false, signo=<optimized out>, ucode=<optimized out>)
#17 <signal handler called>
#18 ieee80211_chan2mode (chan=0x33443836)
     at /usr/src/sys/net80211/ieee80211.c:2340
#19 0xffffffff80e7014f in ieee80211_fix_rate (ni=0xfffffe00fa139000,
     nrs=0xfffffe00fa1392a5, flags=1)
     at /usr/src/sys/net80211/ieee80211_proto.c:650
#20 0xffffffff80e525f2 in ieee80211_setup_rates (ni=0x33443836,
     ni@entry=0xfffffe00fa139000, rates=<optimized out>,
     xrates=xrates@entry=0xfffffe00f8af19e7 "3", flags=-2048, flags@entry=1)
     at /usr/src/sys/net80211/ieee80211_input.c:450
#21 0xffffffff80e63ca6 in ieee80211_sta_join (
     vap=vap@entry=0xfffff80025bdd000, chan=<optimized out>,
     se=se@entry=0xfffffe00f8af19a8)
     at /usr/src/sys/net80211/ieee80211_node.c:1006
#22 0xffffffff80e576dc in setmlme_assoc_sta (vap=0xfffff80025bdd000,
     mac=0xfffffe00f8af1962 "\324\001Íh\323lower-deck",
     ssid_len=<optimized out>, ssid=<optimized out>)
     at /usr/src/sys/net80211/ieee80211_ioctl.c:1693
#23 ieee80211_ioctl_setmlme (vap=vap@entry=0xfffff80025bdd000,
     ireq=ireq@entry=0xfffffe00f8af1d50)
     at /usr/src/sys/net80211/ieee80211_ioctl.c:1752
#24 0xffffffff80e55407 in ieee80211_ioctl_set80211 (
     vap=vap@entry=0xfffff80025bdd000, cmd=<optimized out>,
     ireq=ireq@entry=0xfffffe00f8af1d50)
     at /usr/src/sys/net80211/ieee80211_ioctl.c:3093
#25 0xffffffff80e53c38 in ieee80211_ioctl (ifp=0xfffff80001141000,
     cmd=2149607914, data=0xfffffe00f8af1d50 "wlan0")
     at /usr/src/sys/net80211/ieee80211_ioctl.c:3777
#26 0xffffffff80def98d in ifioctl (so=0xfffff8000d718c00, cmd=2149607914,
     data=0xfffffe00f8af1d50 "wlan0", td=0xfffff80027a74780)
     at /usr/src/sys/net/if.c:2978
#27 0xffffffff80d233e2 in fo_ioctl (fp=0xfffff80005456370,
     com=18446741878881882789, data=0xfffffe00f8af1d50, active_cred=0x11,
     td=0xfffff80027a74780) at /usr/src/sys/sys/file.h:391
#28 kern_ioctl (td=td@entry=0xfffff80027a74780, fd=<optimized out>,
     com=18446741878881882789, com@entry=2149607914,
     data=data@entry=0xfffffe00f8af1d50 "wlan0")
     at /usr/src/sys/kern/sys_generic.c:834
#29 0xffffffff80d230e1 in sys_ioctl (td=<optimized out>,
     uap=0xfffff80027a74ba8) at /usr/src/sys/kern/sys_generic.c:739
#30 0xffffffff8120df16 in syscallenter (td=0xfffff80027a74780)
     at /usr/src/sys/amd64/amd64/../../kern/subr_syscall.c:193
#31 amd64_syscall (td=0xfffff80027a74780, traced=0)
     at /usr/src/sys/amd64/amd64/trap.c:1278
#32 <signal handler called>
#33 0x00000e8af89db48a in ?? ()
Backtrace stopped: Cannot access memory at address 0xe8af1c06ce8

Tracing command "idle\000l", '\000' <repeats 13 times> pid 11 tid 100004 (CPU 1)
#0  cpustop_handler () at /usr/src/sys/x86/x86/mp_x86.c:1537
#1  0xffffffff811d31f8 in ipi_nmi_handler ()
     at /usr/src/sys/x86/x86/mp_x86.c:1494
#2  0xffffffff811c7aaf in nmi_handle_intr (frame=<unavailable>)
     at /usr/src/sys/x86/x86/cpu_machdep.c:1086
#3  <signal handler called>
#4  acpi_cpu_idle_mwait (mwait_hint=0)
     at /usr/src/sys/x86/x86/cpu_machdep.c:411
#5  0xffffffff80525561 in acpi_cpu_idle (sbt=<optimized out>)
     at /usr/src/sys/dev/acpica/acpi_cpu.c:1166
#6  0xffffffff811c7706 in cpu_idle_acpi (sbt=92553493)
     at /usr/src/sys/x86/x86/cpu_machdep.c:712
#7  0xffffffff811c77bd in cpu_idle (busy=0)
     at /usr/src/sys/x86/x86/cpu_machdep.c:801
#8  0xffffffff80ce27b6 in sched_ule_idletd (dummy=<optimized out>)
     at /usr/src/sys/kern/sched_ule.c:3195
#9  0xffffffff80c5c17b in fork_exit (
     callout=0xffffffff80ce2270 <sched_ule_idletd>, arg=0x0,
     frame=0xfffffe00d4e1cf40) at /usr/src/sys/kern/kern_fork.c:1220
#10 <signal handler called>
#11 0x2b1510cb07f79c1c in ?? ()
Backtrace stopped: Cannot access memory at address 0x3314184b0eccaf29

(kgdb)

------------------------------------------------------------------------
ps -axlww

ps: _nprocs: no such symbol

------------------------------------------------------------------------
vmstat -s

Segmentation fault (core dumped)

------------------------------------------------------------------------
vmstat -m

Segmentation fault (core dumped)

------------------------------------------------------------------------
vmstat -z

Segmentation fault (core dumped)

------------------------------------------------------------------------
vmstat -i

Segmentation fault (core dumped)

------------------------------------------------------------------------
pstat -T

pstat: undefined symbol: _constty
pstat: undefined symbol: _maxfiles
pstat: undefined symbol: _openfiles
pstat: undefined symbol: _tty_list

------------------------------------------------------------------------
pstat -s

pstat: undefined symbol: _constty
pstat: undefined symbol: _maxfiles
pstat: undefined symbol: _openfiles
pstat: undefined symbol: _tty_list

------------------------------------------------------------------------
iostat

iostat: readkmem: error reading value (kvm_read): invalid address (0x0)
devstat_checkversion: userland devstat version 6 is not the same as the kernel
devstat_checkversion: devstat version -1
devstat_checkversion: libdevstat newer than kernel


------------------------------------------------------------------------
ipcs -a

Message Queues:
T           ID          KEY MODE        OWNER    GROUP    CREATOR  CGROUP                 CBYTES                 QNUM               QBYTES        LSPID        LRPID STIME    RTIME    CTIME

Shared Memory:
T           ID          KEY MODE        OWNER    GROUP    CREATOR  CGROUP         NATTCH        SEGSZ         CPID         LPID ATIME    DTIME    CTIME

Semaphores:
T           ID          KEY MODE        OWNER    GROUP    CREATOR  CGROUP          NSEMS OTIME    CTIME


------------------------------------------------------------------------
ipcs -T

msginfo:
 	msgmax:        16384	(max characters in a message)
 	msgmni:           40	(# of message queues)
 	msgmnb:         2048	(max characters in a message queue)
 	msgtql:           40	(max # of messages in system)
 	msgssz:            8	(size of a message segment)
 	msgseg:         2048	(# of message segments in system)

shminfo:
 	shmmax:    536870912	(max shared memory segment size)
 	shmmin:            1	(min shared memory segment size)
 	shmmni:          192	(max number of shared memory identifiers)
 	shmseg:          128	(max shared memory segments per process)
 	shmall:       131072	(max amount of shared memory in pages)

seminfo:
 	semmni:           50	(# of semaphore identifiers)
 	semmns:          340	(# of semaphores in system)
 	semmnu:          150	(# of undo structures in system)
 	semmsl:          340	(max # of semaphores per id)
 	semopm:          100	(max # of operations per semop call)
 	semume:           50	(max # of undo entries per process)
 	semusz:          632	(size in bytes of undo structure)
 	semvmx:        32767	(semaphore maximum value)
 	semaem:        16384	(adjust on exit max value)


------------------------------------------------------------------------
netstat -s

tcp:
 	0 packets sent
 		0 data packets (0 bytes)
 		0 data packets (0 bytes) retransmitted
 		0 data packets unnecessarily retransmitted
 		0 resends initiated by MTU discovery
 		0 ack-only packets (0 delayed)
 		0 URG only packets
 		0 window probe packets
 		0 window update packets
 		0 control packets
 	0 packets received
 		0 acks (for 0 bytes)
 		0 duplicate acks
 		0 UDP tunneled pkts
 		0 UDP tunneled pkt cnt with errors
 		0 acks for data not yet sent
 		0 acks for data never been sent (ghost acks)
 		0 acks for data being too old
 		0 packets (0 bytes) received in-sequence
 		0 completely duplicate packets (0 bytes)
 		0 old duplicate packets
 		0 packets with some dup. data (0 bytes duped)
 		0 out-of-order packets (0 bytes)
 		0 packets (0 bytes) of data after window
 		0 window probes
 		0 window update packets
 		0 packets received with dsack
 		0 dsack bytes received (no TLP involved)
 		0 dsack bytes received (TLP responsible)
 		0 packets received after close
 		0 discarded for bad checksums
 		0 discarded for bad header offset fields
 		0 discarded because packet too short
 		0 discarded due to full reassembly queue
 	0 connection requests
 	0 connection accepts
 	0 bad connection attempts
 	0 listen queue overflows
 	0 ignored RSTs in the windows
 	0 connections established (including accepts)
 		0 times used RTT from hostcache
 		0 times used RTT variance from hostcache
 		0 times used slow-start threshold from hostcache
 	0 connections closed (including 0 drops)
 		0 connections updated cached RTT on close
 		0 connections updated cached RTT variance on close
 		0 connections updated cached ssthresh on close
 	0 embryonic connections dropped
 	0 segments updated rtt (of 0 attempts)
 	0 retransmit timeouts
 		0 connections dropped by rexmit timeout
 	0 persist timeouts
 		0 connections dropped by persist timeout
 	0 Connections (fin_wait_2) dropped because of timeout
 	0 keepalive timeouts
 		0 keepalive probes sent
 		0 connections dropped by keepalive
 	0 connections dropped due to exceeding progress time
 	0 correct ACK header predictions
 	0 correct data packet header predictions
 	0 syncache entries added
 		0 retransmitted
 		0 dupsyn
 		0 dropped
 		0 completed
 		0 bucket overflow
 		0 cache overflow
 		0 reset
 		0 stale
 		0 aborted
 		0 badack
 		0 unreach
 		0 zone failures
 	0 cookies sent
 		0 cookies received
 		0 spurious cookies rejected
 		0 failed cookies rejected
 	0 hostcache entries added
 		0 bucket overflow
 	0 SACK recovery episodes
 	0 segment rexmits in SACK recovery episodes
 	0 tso chunk rexmits in SACK recovery episodes
 	0 byte rexmits in SACK recovery episodes
 	0 SACK options (SACK blocks) received
 	0 SACK options (SACK blocks) sent
 	0 SACK retransmissions lost
 	0 SACK scoreboard overflow
 	0 packets received with ECN CE bit set
 	0 packets received with ECN ECT(0) bit set
 	0 packets received with ECN ECT(1) bit set
 	0 packets sent with ECN ECT(0) bit set
 	0 packets sent with ECN ECT(1) bit set
 	0 successful ECN handshakes
 	0 times ECN reduced the congestion window
 	0 ACE SYN packets with Non-ECT
 	0 ACE SYN packets with ECT0
 	0 ACE SYN packets with ECT1
 	0 ACE SYN packets with CE
 	0 packets with matching signature received
 	0 packets with bad signature received
 	0 times failed to make signature due to no SA
 	0 times unexpected signature received
 	0 times no signature provided by segment
 	0 Path MTU discovery black hole detection activations
 	0 Path MTU discovery black hole detection min MSS activations
 	0 Path MTU discovery black hole detection failures
 	0 times connection in TIME-WAIT responded with ACK
 	0 times connection in TIME-WAIT was actively recycled
 	0 times connection in TIME-WAIT responded with RST
TCP connection count by state:
 	0 connections in CLOSED state
 	0 connections in LISTEN state
 	0 connections in SYN_SENT state
 	0 connections in SYN_RCVD state
 	0 connections in ESTABLISHED state
 	0 connections in CLOSE_WAIT state
 	0 connections in FIN_WAIT_1 state
 	0 connections in CLOSING state
 	0 connections in LAST_ACK state
 	0 connections in FIN_WAIT_2 state
 	0 connections in TIME_WAIT state
udp:
 	0 datagrams received
 	0 with incomplete header
 	0 with bad data length field
 	0 with bad checksum
 	0 with no checksum
 	0 dropped due to no socket
 	0 broadcast/multicast datagrams undelivered
 	0 dropped due to full socket buffers
 	0 not for hashed pcb
 	0 delivered
 	0 datagrams output
 	0 times multicast source filter matched
ip:
 	0 total packets received
 	0 bad header checksums
 	0 with size smaller than minimum
 	0 with data size < data length
 	0 with ip length > max ip packet size
 	0 with header length < data size
 	0 with data length < header length
 	0 with bad options
 	0 with incorrect version number
 	0 fragments received
 	0 fragments dropped (dup or out of space)
 	0 fragments dropped after timeout
 	0 packets reassembled ok
 	0 packets for this host
 	0 packets for unknown/unsupported protocol
 	0 packets forwarded (0 packets fast forwarded)
 	0 packets not forwardable
 	0 packets received for unknown multicast group
 	0 redirects sent
 	0 packets sent from this host
 	0 packets sent with fabricated ip header
 	0 output packets dropped due to no bufs, etc.
 	0 output packets discarded due to no route
 	0 output datagrams fragmented
 	0 fragments created
 	0 datagrams that can't be fragmented
 	0 tunneling packets that can't find gif
 	0 datagrams with bad address in header
icmp:
 	0 calls to icmp_error
 	0 errors not generated in response to an icmp message
 	0 messages with bad code fields
 	0 messages less than the minimum length
 	0 messages with bad checksum
 	0 messages with bad length
 	0 multicast echo requests ignored
 	0 multicast timestamp requests ignored
 	0 message responses generated
 	0 invalid return addresses
 	0 no return routes
arp:
 	0 ARP requests sent
 	0 ARP requests failed to sent
 	0 ARP replies sent
 	0 ARP requests received
 	0 ARP replies received
 	0 ARP packets received
 	0 total packets dropped due to no ARP entry
 	0 ARP entrys timed out
 	0 Duplicate IPs seen
ip6:
 	0 total packets received
 	0 with size smaller than minimum
 	0 with data size < data length
 	0 with bad options
 	0 with incorrect version number
 	0 fragments received
 	0 fragments dropped (dup or out of space)
 	0 fragments dropped after timeout
 	0 fragments that exceeded limit
 	0 atomic fragments
 	0 packets reassembled ok
 	0 packets for this host
 	0 packets forwarded
 	0 packets not forwardable
 	0 redirects sent
 	0 packets sent from this host
 	0 packets sent with fabricated ip header
 	0 output packets dropped due to no bufs, etc.
 	0 output packets discarded due to no route
 	0 output datagrams fragmented
 	0 fragments created
 	0 datagrams that can't be fragmented
 	0 packets that violated scope rules
 	0 multicast packets which we don't join
 	Mbuf statistics:
 		0 one mbuf
 		0 one ext mbuf
 		0 two or more ext mbuf
 	0 packets whose headers are not contiguous
 	0 tunneling packets that can't find gif
 	0 packets discarded because of too many headers
 	0 failures of source address selection
icmp6:
 	0 calls to icmp6_error
 	0 errors not generated in response to an icmp6 message
 	0 errors not generated because of rate limitation
 	0 messages with bad code fields
 	0 messages < minimum length
 	0 bad checksums
 	0 messages with bad length
 	0 total packets dropped due to failed NDP resolution
 	Histogram of error messages to be generated:
 		0 no route
 		0 administratively prohibited
 		0 beyond scope
 		0 address unreachable
 		0 port unreachable
 		0 packet too big
 		0 time exceed transit
 		0 time exceed reassembly
 		0 erroneous header field
 		0 unrecognized next header
 		0 unrecognized option
 		0 redirect
 		0 unknown
 	0 message responses generated
 	0 messages with too many ND options
 	0 messages with bad ND options
 	0 bad neighbor solicitation messages
 	0 bad neighbor advertisement messages
 	0 bad router solicitation messages
 	0 bad router advertisement messages
 	0 bad redirect messages
 	0 default routers overflows
 	0 prefix overflows
 	0 neighbour entries overflows
 	0 redirect overflows
 	0 messages with invalid hop limit
 	0 path MTU changes
rip6:
 	0 messages received
 	0 checksum calculations on inbound
 	0 messages with bad checksum
 	0 messages dropped due to no socket
 	0 multicast messages dropped due to no socket
 	0 messages dropped due to full socket buffers
 	0 delivered
 	0 datagrams output
pfkey:
 	0 requests sent from userland
 	0 bytes sent from userland
 	0 messages with invalid length field
 	0 messages with invalid version field
 	0 messages with invalid message type field
 	0 messages too short
 	0 messages with memory allocation failure
 	0 messages with duplicate extension
 	0 messages with invalid extension type
 	0 messages with invalid sa type
 	0 messages with invalid address extension
 	0 requests sent to userland
 	0 bytes sent to userland
 	0 messages toward single socket
 	0 messages toward all sockets
 	0 messages toward registered sockets
 	0 messages with memory allocation failure

------------------------------------------------------------------------
netstat -m

netstat: memstat_kvm_all:

------------------------------------------------------------------------
netstat -anA


------------------------------------------------------------------------
netstat -aL


------------------------------------------------------------------------
fstat

fstat: procstat_getprocs()

------------------------------------------------------------------------
dmesg

dmesg: /boot/kernel/kernel: msgbufp not found

------------------------------------------------------------------------
kernel config

options	CONFIG_AUTOGENERATED
ident	GENERIC
machine	amd64
cpu	HAMMER
makeoptions	WITH_CTF=1
makeoptions	DEBUG=-g
options	THUNDERBOLT_DEBUG
options	ALT_BREAK_TO_DEBUGGER
options	IICHID_SAMPLING
options	HID_DEBUG
options	EVDEV_SUPPORT
options	XENHVM
options	USB_DEBUG
options	IWN_DEBUG
options	AH_AR5416_INTERRUPT_MITIGATION
options	IEEE80211_SUPPORT_MESH
options	IEEE80211_DEBUG
options	SC_PIXEL_MODE
options	PPS_SYNC
options	COMPAT_LINUXKPI
options	PCI_IOV
options	PCI_HP
options	IOMMU
options	ACPI_DEBUG
options	SMP
options	NETGDB
options	NETDUMP
options	DEBUGNET
options	ZSTDIO
options	GZIO
options	EKCD
options	VERBOSE_SYSINIT=0
options	MALLOC_DEBUG_MAXZONES=8
options	QUEUE_MACRO_DEBUG_TRASH
options	DEADLKRES
options	GDB
options	FULL_BUF_TRACKING
options	DDB
options	BUF_TRACKING
options	KDB_TRACE
options	KDB
options	RCTL
options	RACCT_DEFAULT_TO_DISABLED
options	RACCT
options	INCLUDE_CONFIG_FILE
options	DDB_CTF
options	KDTRACE_HOOKS
options	KDTRACE_FRAME
options	MAC
options	CAPABILITIES
options	CAPABILITY_MODE
options	AUDIT
options	HWPMC_HOOKS
options	KBD_INSTALL_CDEV
options	PRINTF_BUFR_SIZE=128
options	_KPOSIX_PRIORITY_SCHEDULING
options	SYSVSEM
options	SYSVMSG
options	SYSVSHM
options	STACK
options	KTRACE
options	SCSI_DELAY=5000
options	COMPAT_FREEBSD14
options	COMPAT_FREEBSD13
options	COMPAT_FREEBSD12
options	COMPAT_FREEBSD11
options	COMPAT_FREEBSD10
options	COMPAT_FREEBSD9
options	COMPAT_FREEBSD7
options	COMPAT_FREEBSD6
options	COMPAT_FREEBSD5
options	COMPAT_FREEBSD4
options	COMPAT_FREEBSD32
options	EFIRT
options	GEOM_LABEL
options	GEOM_RAID
options	TMPFS
options	PSEUDOFS
options	PROCFS
options	CD9660
options	MSDOSFS
options	NFS_ROOT
options	NFSLOCKD
options	NFSD
options	NFSCL
options	MD_ROOT
options	QUOTA
options	UFS_GJOURNAL
options	UFS_DIRHASH
options	UFS_ACL
options	SOFTUPDATES
options	FFS
options	KERN_TLS
options	SCTP_SUPPORT
options	TCP_RFC7413
options	TCP_HHOOK
options	TCP_BLACKBOX
options	TCP_OFFLOAD
options	FIB_ALGO
options	IPSEC_SUPPORT
options	INET6
options	INET
options	VIMAGE
options	PREEMPTION
options	NUMA
options	SCHED_ULE
options	NETLINK
options	CC_CUBIC
options	GEOM_PART_GPT
options	GEOM_PART_MBR
options	GEOM_PART_EBR
options	GEOM_PART_BSD
options	EARLY_AP_STARTUP
options	EARLY_AP_STARTUP
device	isa
device	mem
device	io
device	uart_ns8250
device	cpufreq
device	acpi
device	smbios
device	pci
device	fdc
device	ahci
device	ata
device	mvs
device	siis
device	ahc
device	ahd
device	hptiop
device	isp
device	mpt
device	mps
device	mpr
device	sym
device	isci
device	ocs_fc
device	pvscsi
device	scbus
device	ch
device	da
device	sa
device	cd
device	pass
device	ses
device	arcmsr
device	ciss
device	ips
device	smartpqi
device	tws
device	aac
device	aacp
device	aacraid
device	ida
device	mfi
device	mlx
device	mrsas
device	pmspcv
device	nvme
device	nvd
device	vmd
device	atkbdc
device	atkbd
device	psm
device	kbdmux
device	vga
device	splash
device	sc
device	vt
device	vt_vga
device	vt_efifb
device	vt_vbefb
device	agp
device	cbb
device	cardbus
device	uart
device	ppc
device	ppbus
device	lpt
device	ppi
device	puc
device	iflib
device	em
device	igc
device	ix
device	ixv
device	ixl
device	iavf
device	ice
device	vmx
device	axp
device	bxe
device	ti
device	mlx5
device	mlxfw
device	mlx5en
device	mdio
device	miibus
device	ae
device	age
device	alc
device	ale
device	bce
device	bfe
device	bge
device	cas
device	dc
device	et
device	fxp
device	gem
device	jme
device	lge
device	msk
device	nfe
device	nge
device	re
device	rl
device	sge
device	sis
device	sk
device	ste
device	stge
device	vge
device	vr
device	xl
device	wlan
device	wlan_wep
device	wlan_ccmp
device	wlan_tkip
device	wlan_amrr
device	ath
device	ath_hal
device	ath_rate_sample
device	ipw
device	iwi
device	iwn
device	malo
device	mwl
device	ral
device	wpi
device	crypto
device	aesni
device	loop
device	rdrand_rng
device	ether
device	vlan
device	tuntap
device	md
device	gif
device	firmware
device	xz
device	bpf
device	uhci
device	ohci
device	ehci
device	xhci
device	usb
device	ukbd
device	umass
device	sound
device	snd_cmi
device	snd_csa
device	snd_emu10kx
device	snd_es137x
device	snd_hda
device	snd_ich
device	snd_via8233
device	mmc
device	mmcsd
device	sdhci
device	rtsx
device	virtio
device	virtio_pci
device	vtnet
device	virtio_blk
device	virtio_scsi
device	virtio_balloon
device	kvm_clock
device	hyperv
device	xenpci
device	xentimer
device	netmap
device	evdev
device	uinput
device	hid
device	firewire
device	dcons
device	dcons_crom
device	thunderbolt

------------------------------------------------------------------------
ddb capture buffer

ddb: ddb_capture: kvm_nlist