panic: pr_find_pagehead: mbufpl: incorrect page Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic(ffffffff821df130) at panic+0x15c sys/kern/subr_prf.c:207 pool_do_put(ffffffff82584878,fffffd8053000000) at pool_do_put+0x36a pool_put(ffffffff82584878,fffffd8053000000) at pool_put+0x4b sys/kern/subr_pool.c:794 m_free(fffffd8053000000) at m_free+0x119 sys/kern/uipc_mbuf.c:459 ml_purge(ffff80002086bde8) at ml_purge+0x50 m_freem sys/kern/uipc_mbuf.c:538 [inline] ml_purge(ffff80002086bde8) at ml_purge+0x50 sys/kern/uipc_mbuf.c:1628 ifq_purge(ffff800000a56a78) at ifq_purge+0x97 sys/net/ifq.c:462 tun_dev_close(5d00,7) at tun_dev_close+0xc8 sys/net/if_tun.c:460 spec_close(ffff80002086bf10) at spec_close+0x311 sys/kern/spec_vnops.c:555 VOP_CLOSE(fffffd805f8425b0,7,fffffd806c3bfa80,ffff80001d75d9d8) at VOP_CLOSE+0xc0 sys/kern/vfs_vops.c:174 vn_closefile(fffffd8057196798,ffff80001d75d9d8) at vn_closefile+0xd2 vn_close sys/kern/vfs_vnops.c:298 [inline] vn_closefile(fffffd8057196798,ffff80001d75d9d8) at vn_closefile+0xd2 sys/kern/vfs_vnops.c:614 fdrop(fffffd8057196798,ffff80001d75d9d8) at fdrop+0xc2 sys/kern/kern_descrip.c:1276 closef(fffffd8057196798,ffff80001d75d9d8) at closef+0x117 sys/kern/kern_descrip.c:1260 fdfree(ffff80001d75d9d8) at fdfree+0x100 sys/kern/kern_descrip.c:1192 end trace frame: 0xffff80002086c160, count: 0 https://www.openbsd.org/ddb.html describes the minimum info required in bug reports. Insufficient info makes it difficult to find and fix bugs. ddb> ddb> set $lines = 0 ddb> set $maxwidth = 0 ddb> show panic pr_find_pagehead: mbufpl: incorrect page ddb> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic(ffffffff821df130) at panic+0x15c sys/kern/subr_prf.c:207 pool_do_put(ffffffff82584878,fffffd8053000000) at pool_do_put+0x36a pool_put(ffffffff82584878,fffffd8053000000) at pool_put+0x4b sys/kern/subr_pool.c:794 m_free(fffffd8053000000) at m_free+0x119 sys/kern/uipc_mbuf.c:459 ml_purge(ffff80002086bde8) at ml_purge+0x50 m_freem sys/kern/uipc_mbuf.c:538 [inline] ml_purge(ffff80002086bde8) at ml_purge+0x50 sys/kern/uipc_mbuf.c:1628 ifq_purge(ffff800000a56a78) at ifq_purge+0x97 sys/net/ifq.c:462 tun_dev_close(5d00,7) at tun_dev_close+0xc8 sys/net/if_tun.c:460 spec_close(ffff80002086bf10) at spec_close+0x311 sys/kern/spec_vnops.c:555 VOP_CLOSE(fffffd805f8425b0,7,fffffd806c3bfa80,ffff80001d75d9d8) at VOP_CLOSE+0xc0 sys/kern/vfs_vops.c:174 vn_closefile(fffffd8057196798,ffff80001d75d9d8) at vn_closefile+0xd2 vn_close sys/kern/vfs_vnops.c:298 [inline] vn_closefile(fffffd8057196798,ffff80001d75d9d8) at vn_closefile+0xd2 sys/kern/vfs_vnops.c:614 fdrop(fffffd8057196798,ffff80001d75d9d8) at fdrop+0xc2 sys/kern/kern_descrip.c:1276 closef(fffffd8057196798,ffff80001d75d9d8) at closef+0x117 sys/kern/kern_descrip.c:1260 fdfree(ffff80001d75d9d8) at fdfree+0x100 sys/kern/kern_descrip.c:1192 exit1(ffff80001d75d9d8,0,d,1) at exit1+0x32c sys/kern/kern_exit.c:197 postsig(ffff80001d75d9d8,d) at postsig+0x4b2 sigexit sys/kern/kern_sig.c:1483 [inline] postsig(ffff80001d75d9d8,d) at postsig+0x4b2 sys/kern/kern_sig.c:1415 userret(ffff80001d75d9d8) at userret+0x159 sys/kern/kern_sig.c:1867 syscall(ffff80002086c390) at syscall+0x42e mi_syscall_return sys/sys/syscall_mi.h:129 [inline] syscall(ffff80002086c390) at syscall+0x42e sys/arch/amd64/amd64/trap.c:592 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7fffff79b0, count: -19 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80002086bb90 rbx 0xffff80002086bc40 rdx 0x2 rcx 0 rax 0 r8 0xffff80002086bb50 r9 0x1 r10 0 r11 0xd60796f977506376 r12 0x3000000008 r13 0xffff80002086bba0 r14 0x100 r15 0x1 rip 0xffffffff813bf1f8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80002086bb80 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.0) pid=227165 stat=onproc flags process=a proc=2000 pri=16, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff80001d75d018,0xffff80001d75dc58 process=0xffff8000ffff8ae0 user=0xffff800020867000, vmspace=0xfffffd805d399bb8 estcpu=0, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 68523 169144 0 0 3 0x14200 acct acct 79001 131921 1 0 3 0x100083 ttyin getty 25888 315738 0 0 3 0x14200 bored sosplice 37450 516276 25213 0 2 0x10008a ksh 25213 400250 82904 0 2 0x12 sshd 82904 375596 1 0 3 0x80 select sshd 97708 38589 60965 73 3 0x100090 kqread syslogd 60965 320132 1 0 3 0x100082 netio syslogd 76672 257505 1 77 3 0x100090 poll dhclient 25410 432070 1 0 3 0x80 poll dhclient 80209 393300 0 0 3 0x14200 bored smr 92917 48345 0 0 2 0x14200 zerothread 18835 351877 0 0 3 0x14200 aiodoned aiodoned 21079 24318 0 0 3 0x14200 syncer update 48668 365333 0 0 3 0x14200 cleaner cleaner 62922 191571 0 0 3 0x14200 reaper reaper 52720 403104 0 0 3 0x14200 pgdaemon pagedaemon 96692 298985 0 0 3 0x14200 bored crynlk 86068 384699 0 0 3 0x14200 bored crypto 82315 433600 0 0 3 0x40014200 acpi0 acpi0 41667 331645 0 0 2 0x14200 softnet 62291 46942 0 0 3 0x14200 bored systqmp 39542 412196 0 0 3 0x14200 bored systq 73187 260725 0 0 3 0x40014200 bored softclock 49094 365311 0 0 3 0x40014200 idle0 1 517062 0 0 2 0x82 init 0 0 -1 0 3 0x10200 scheduler swapper ddb> show all locks No such command ddb> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 9507 6471K 7248K 78643K 11965 0 pcb 13 8K 8K 78643K 93 0 rtable 101 2K 3K 78643K 353 0 ifaddr 70 14K 14K 78643K 131 0 counters 21 16K 16K 78643K 27 0 ioctlops 0 0K 2K 78643K 35 0 iov 0 0K 12K 78643K 50 0 mount 1 1K 1K 78643K 1 0 vnodes 1244 78K 78K 78643K 1833 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 9K 78643K 12 0 VM map 2 0K 0K 78643K 2 0 sem 12 0K 0K 78643K 31 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1794 195K 288K 78643K 12646 0 file desc 3 8K 25K 78643K 437 0 sigio 0 0K 0K 78643K 6 0 proc 50 38K 63K 78643K 599 0 subproc 22 1K 3K 78643K 255 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 35 0 in_multi 66 3K 3K 78643K 138 0 ether_multi 1 0K 0K 78643K 11 0 mrt 0 0K 0K 78643K 3 0 ISOFS mount 1 32K 32K 78643K 1 0 MSDOSFS mount 1 16K 16K 78643K 1 0 ttys 49 228K 228K 78643K 49 0 exec 0 0K 1K 78643K 278 0 pagedep 1 8K 8K 78643K 1 0 inodedep 1 32K 32K 78643K 1 0 newblk 1 0K 0K 78643K 1 0 VM swap 7 26K 26K 78643K 7 0 UVM amap 72 68K 90K 78643K 1902 0 UVM aobj 28 3K 3K 78643K 30 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 53 0 NDP 11 0K 0K 78643K 29 0 temp 100 3036K 3100K 78643K 14271 0 kqueue 5 8K 14K 78643K 40 0 SYN cache 2 16K 16K 78643K 2 0 ddb> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle arp 64 11 0 5 1 0 1 1 0 8 0 rtpcb 80 37 0 35 1 0 1 1 0 8 0 rtentry 112 86 0 44 2 0 2 2 0 8 0 unpcb 120 330 0 321 1 0 1 1 0 8 0 syncache 264 6 0 6 2 2 0 1 0 8 0 sackhl 24 1 0 1 1 1 0 1 0 8 0 tcpqe 32 87 0 87 1 1 0 1 0 8 0 tcpcb 544 346 0 342 1 0 1 1 0 8 0 ipq 40 3 0 3 2 2 0 1 0 8 0 ipqe 40 7 0 7 2 2 0 1 0 8 0 inpcb 280 657 0 650 4 3 1 2 0 8 0 rttmr 72 1 0 1 1 1 0 1 0 8 0 nd6 48 16 0 12 1 0 1 1 0 8 0 pkpcb 40 5 0 5 1 1 0 1 0 8 0 swfcl 56 4 0 0 1 0 1 1 0 8 0 art_heap8 4096 2 0 0 2 0 2 2 0 8 0 art_heap4 256 388 0 207 13 1 12 13 0 8 0 art_table 32 390 0 207 2 0 2 2 0 8 0 art_node 16 85 0 46 1 0 1 1 0 8 0 sysvmsgpl 40 14 0 12 2 1 1 1 0 8 0 semapl 112 29 0 19 1 0 1 1 0 8 0 shmpl 112 28 0 2 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 1931 0 536 46 0 46 46 0 8 0 ffsino 240 1931 0 536 83 0 83 83 0 8 0 nchpl 144 2682 0 1094 60 0 60 60 0 8 0 uvmvnodes 72 2514 0 0 46 0 46 46 0 8 0 vnodes 208 2514 0 0 133 0 133 133 0 8 0 namei 1024 7810 0 7810 3 2 1 1 0 8 1 vcpupl 1984 5 0 0 1 0 1 1 0 8 0 vmpool 528 6 0 1 1 0 1 1 0 8 0 scsiplug 64 1 0 1 1 1 0 1 0 8 0 scxspl 192 12554 0 12554 1 0 1 1 0 8 1 plimitpl 152 64 0 57 1 0 1 1 0 8 0 sigapl 424 587 0 559 4 0 4 4 0 8 0 futexpl 56 7506 0 7506 5 5 0 1 0 8 0 knotepl 112 250 0 245 1 0 1 1 0 8 0 kqueuepl 144 88 0 77 1 0 1 1 0 8 0 pipelkpl 16 180 0 174 1 0 1 1 0 8 0 pipepl 120 360 0 351 1 0 1 1 0 8 0 fdescpl 432 571 0 559 2 0 2 2 0 8 0 filepl 120 3872 0 3792 4 0 4 4 0 8 0 lockfpl 104 89 0 88 1 0 1 1 0 8 0 lockfspl 48 29 0 28 1 0 1 1 0 8 0 sessionpl 112 31 0 21 1 0 1 1 0 8 0 pgrppl 48 31 0 21 1 0 1 1 0 8 0 ucredpl 96 276 0 269 1 0 1 1 0 8 0 zombiepl 144 561 0 558 1 0 1 1 0 8 0 processpl 920 587 0 558 6 1 5 5 0 8 1 procpl 624 1007 0 978 4 0 4 4 0 8 0 sosppl 128 6 0 6 2 2 0 1 0 8 0 sockpl 400 1029 0 1011 6 3 3 4 0 8 0 mcl64k 65536 41 0 41 3 3 0 1 0 8 0 mcl16k 16384 2 0 2 2 2 0 1 0 8 0 mcl12k 12288 7 0 7 3 3 0 1 0 8 0 mcl9k 9216 5 0 5 2 2 0 1 0 8 0 mcl8k 8192 9 0 9 3 3 0 1 0 8 0 mcl4k 4096 43 0 43 3 3 0 1 0 8 0 mcl2k2 2112 1 0 1 1 1 0 1 0 8 0 mcl2k 2048 62236 0 62175 19 10 9 15 0 8 0 mtagpl 80 224 0 134 4 2 2 3 0 8 0 mbufpl 256 101470 0 101165 29 8 21 25 0 8 0 bufpl 280 6326 0 915 387 0 387 387 0 8 0 anonpl 16 76470 0 74937 80 19 61 77 0 107 40 amapchunkpl 152 3666 0 3621 20 13 7 20 0 158 2 amappl16 192 2973 0 2944 57 16 41 53 0 8 34 amappl15 184 11 0 10 1 0 1 1 0 8 0 amappl14 176 81 0 80 3 2 1 1 0 8 0 amappl13 168 58 0 57 1 0 1 1 0 8 0 amappl12 160 17 0 17 2 1 1 1 0 8 1 amappl11 152 75 0 63 1 0 1 1 0 8 0 amappl10 144 103 0 101 1 0 1 1 0 8 0 amappl9 136 466 0 461 1 0 1 1 0 8 0 amappl8 128 430 0 427 1 0 1 1 0 8 0 amappl7 120 225 0 217 1 0 1 1 0 8 0 amappl6 112 26 0 26 1 0 1 1 0 8 1 amappl5 104 473 0 459 1 0 1 1 0 8 0 amappl4 96 496 0 468 2 1 1 2 0 8 0 amappl3 88 192 0 186 1 0 1 1 0 8 0 amappl2 80 3435 0 3374 3 1 2 3 0 8 0 amappl1 72 20627 0 20219 26 16 10 20 0 8 0 amappl 80 1315 0 1289 3 1 2 2 0 84 0 dma4096 4096 1 0 1 1 1 0 1 0 8 0 dma256 256 6 0 6 1 1 0 1 0 8 0 dma128 128 253 0 253 1 1 0 1 0 8 0 dma64 64 6 0 6 1 1 0 1 0 8 0 dma32 32 7 0 7 1 1 0 1 0 8 0 dma16 16 18 0 17 1 0 1 1 0 8 0 aobjpl 64 29 0 2 1 0 1 1 0 8 0 uaddrrnd 24 577 0 560 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 577 0 560 1 0 1 1 0 8 0 vmmpekpl 168 8103 0 8075 2 0 2 2 0 8 0 vmmpepl 168 83586 0 82634 186 70 116 128 0 357 58 vmsppl 272 576 0 560 2 0 2 2 0 8 0 pdppl 4096 1160 0 1125 6 0 6 6 0 8 0 pvpl 32 297699 0 294685 288 96 192 288 0 265 128 pmappl 200 576 0 560 3 1 2 2 0 8 0 extentpl 40 46 0 29 1 0 1 1 0 8 0 phpool 112 184 0 37 5 0 5 5 0 8 0