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(ffffffff821daa34) at panic+0x15c sys/kern/subr_prf.c:207 pool_do_put(ffffffff825bcca8,fffffd80589f0000) at pool_do_put+0x36a pool_put(ffffffff825bcca8,fffffd80589f0000) at pool_put+0x4b sys/kern/subr_pool.c:794 m_free(fffffd80589f0000) at m_free+0x119 sys/kern/uipc_mbuf.c:459 ml_purge(ffff80001ee28358) at ml_purge+0x50 m_freem sys/kern/uipc_mbuf.c:538 [inline] ml_purge(ffff80001ee28358) at ml_purge+0x50 sys/kern/uipc_mbuf.c:1628 ifq_purge(ffff8000009f7a78) at ifq_purge+0x97 sys/net/ifq.c:462 tun_dev_close(5d01,7) at tun_dev_close+0xc8 sys/net/if_tun.c:460 spec_close(ffff80001ee28480) at spec_close+0x311 sys/kern/spec_vnops.c:555 VOP_CLOSE(fffffd805dd0c8f0,7,fffffd806c3bf840,ffff80001d739ea8) at VOP_CLOSE+0xc0 sys/kern/vfs_vops.c:174 vn_closefile(fffffd8056f42e20,ffff80001d739ea8) at vn_closefile+0xd2 vn_close sys/kern/vfs_vnops.c:298 [inline] vn_closefile(fffffd8056f42e20,ffff80001d739ea8) at vn_closefile+0xd2 sys/kern/vfs_vnops.c:614 fdrop(fffffd8056f42e20,ffff80001d739ea8) at fdrop+0xc2 sys/kern/kern_descrip.c:1276 closef(fffffd8056f42e20,ffff80001d739ea8) at closef+0x117 sys/kern/kern_descrip.c:1260 fdfree(ffff80001d739ea8) at fdfree+0x100 sys/kern/kern_descrip.c:1192 end trace frame: 0xffff80001ee286d0, 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(ffffffff821daa34) at panic+0x15c sys/kern/subr_prf.c:207 pool_do_put(ffffffff825bcca8,fffffd80589f0000) at pool_do_put+0x36a pool_put(ffffffff825bcca8,fffffd80589f0000) at pool_put+0x4b sys/kern/subr_pool.c:794 m_free(fffffd80589f0000) at m_free+0x119 sys/kern/uipc_mbuf.c:459 ml_purge(ffff80001ee28358) at ml_purge+0x50 m_freem sys/kern/uipc_mbuf.c:538 [inline] ml_purge(ffff80001ee28358) at ml_purge+0x50 sys/kern/uipc_mbuf.c:1628 ifq_purge(ffff8000009f7a78) at ifq_purge+0x97 sys/net/ifq.c:462 tun_dev_close(5d01,7) at tun_dev_close+0xc8 sys/net/if_tun.c:460 spec_close(ffff80001ee28480) at spec_close+0x311 sys/kern/spec_vnops.c:555 VOP_CLOSE(fffffd805dd0c8f0,7,fffffd806c3bf840,ffff80001d739ea8) at VOP_CLOSE+0xc0 sys/kern/vfs_vops.c:174 vn_closefile(fffffd8056f42e20,ffff80001d739ea8) at vn_closefile+0xd2 vn_close sys/kern/vfs_vnops.c:298 [inline] vn_closefile(fffffd8056f42e20,ffff80001d739ea8) at vn_closefile+0xd2 sys/kern/vfs_vnops.c:614 fdrop(fffffd8056f42e20,ffff80001d739ea8) at fdrop+0xc2 sys/kern/kern_descrip.c:1276 closef(fffffd8056f42e20,ffff80001d739ea8) at closef+0x117 sys/kern/kern_descrip.c:1260 fdfree(ffff80001d739ea8) at fdfree+0x100 sys/kern/kern_descrip.c:1192 exit1(ffff80001d739ea8,0,19,1) at exit1+0x32c sys/kern/kern_exit.c:197 postsig(ffff80001d739ea8,19) at postsig+0x4b2 sigexit sys/kern/kern_sig.c:1483 [inline] postsig(ffff80001d739ea8,19) at postsig+0x4b2 sys/kern/kern_sig.c:1415 userret(ffff80001d739ea8) at userret+0x159 sys/kern/kern_sig.c:1867 syscall(ffff80001ee28900) at syscall+0x42e mi_syscall_return sys/sys/syscall_mi.h:129 [inline] syscall(ffff80001ee28900) at syscall+0x42e sys/arch/amd64/amd64/trap.c:592 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffd1220, count: -19 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80001ee28100 rbx 0xffff80001ee281b0 rdx 0x2 rcx 0 rax 0 r8 0xffff80001ee280c0 r9 0x1 r10 0 r11 0x6d2c74647721d920 r12 0x3000000008 r13 0xffff80001ee28110 r14 0x100 r15 0x1 rip 0xffffffff8113a6b8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80001ee280f0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.1) pid=396999 stat=onproc flags process=a proc=2000 pri=17, usrpri=73, nice=20 forw=0xffffffffffffffff, list=0xffff80001d73a118,0xffff80001d7399d8 process=0xffff8000ffffaad8 user=0xffff80001ee23000, vmspace=0xfffffd806bc0a440 estcpu=36, cpticks=2, pctcpu=0.0 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 79722 309977 40800 0 2 0x3000 syz-executor.0 95844 399091 0 0 3 0x14200 bored sosplice 40800 155259 75745 0 3 0x82 nanosleep syz-executor.0 75745 410724 73160 0 3 0x82 thrsleep syz-fuzzer 75745 310645 73160 0 3 0x4000082 nanosleep syz-fuzzer 75745 490719 73160 0 3 0x4000082 thrsleep syz-fuzzer 75745 120098 73160 0 3 0x4000082 thrsleep syz-fuzzer 75745 338967 73160 0 3 0x4000082 thrsleep syz-fuzzer 75745 480690 73160 0 2 0x4000082 syz-fuzzer 75745 352719 73160 0 3 0x4000082 thrsleep syz-fuzzer 75745 495433 73160 0 3 0x4000082 thrsleep syz-fuzzer 73160 377549 8718 0 3 0x10008a pause ksh 8718 407502 80362 0 3 0x92 select sshd 95851 376185 1 0 3 0x100083 ttyin getty 80362 14048 1 0 3 0x80 select sshd 60867 473743 58775 73 3 0x100090 kqread syslogd 58775 43781 1 0 3 0x100082 netio syslogd 38757 290466 1 77 3 0x100090 poll dhclient 92846 7439 1 0 3 0x80 poll dhclient 31237 505014 0 0 3 0x14200 bored smr 9003 420423 0 0 2 0x14200 zerothread 39538 258032 0 0 3 0x14200 aiodoned aiodoned 9513 486349 0 0 3 0x14200 syncer update 99026 213633 0 0 3 0x14200 cleaner cleaner 17140 29154 0 0 3 0x14200 reaper reaper 55773 339524 0 0 3 0x14200 pgdaemon pagedaemon 51056 436566 0 0 3 0x14200 bored crynlk 59333 27596 0 0 3 0x14200 bored crypto 38555 192709 0 0 3 0x40014200 acpi0 acpi0 14659 353779 0 0 3 0x14200 bored softnet 30526 275677 0 0 3 0x14200 bored systqmp 69298 481034 0 0 3 0x14200 bored systq 82763 273114 0 0 3 0x40014200 bored softclock 12878 339517 0 0 3 0x40014200 idle0 1 35103 0 0 3 0x82 wait 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 9524 6480K 7310K 78643K 11981 0 pcb 13 8K 8K 78643K 106 0 rtable 98 3K 3K 78643K 293 0 ifaddr 88 17K 17K 78643K 128 0 counters 21 16K 16K 78643K 27 0 ioctlops 0 0K 2K 78643K 43 0 iov 0 0K 16K 78643K 74 0 mount 1 1K 1K 78643K 1 0 vnodes 1224 77K 77K 78643K 1577 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 5K 78643K 6 0 VM map 2 0K 0K 78643K 2 0 sem 12 0K 0K 78643K 51 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1794 195K 288K 78643K 12646 0 file desc 5 13K 25K 78643K 327 0 sigio 0 0K 0K 78643K 8 0 proc 49 38K 63K 78643K 404 0 subproc 23 1K 2K 78643K 34 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 55 0 in_multi 72 3K 3K 78643K 120 0 ether_multi 1 0K 0K 78643K 16 0 mrt 0 0K 0K 78643K 5 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 225 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 101 37K 38K 78643K 1585 0 UVM aobj 8 2K 2K 78643K 8 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 87 0 NDP 14 0K 0K 78643K 25 0 temp 106 3034K 3098K 78643K 9984 0 kqueue 3 4K 8K 78643K 14 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 7 0 3 1 0 1 1 0 8 0 rtpcb 80 35 0 33 1 0 1 1 0 8 0 rtentry 112 54 0 15 2 0 2 2 0 8 0 unpcb 120 477 0 469 1 0 1 1 0 8 0 syncache 264 6 0 6 2 2 0 1 0 8 0 tcpqe 32 286 0 286 1 1 0 1 0 8 0 tcpcb 544 193 0 189 1 0 1 1 0 8 0 ipq 40 5 0 5 1 1 0 1 0 8 0 ipqe 40 13 0 13 1 1 0 1 0 8 0 inpcb 280 478 0 471 2 1 1 2 0 8 0 rttmr 72 1 0 1 1 1 0 1 0 8 0 nd6 48 9 0 4 1 0 1 1 0 8 0 pkpcb 40 1 0 1 1 1 0 1 0 8 0 art_heap8 4096 2 0 0 2 0 2 2 0 8 0 art_heap4 256 240 0 46 14 1 13 13 0 8 0 art_table 32 242 0 46 2 0 2 2 0 8 0 art_node 16 53 0 17 1 0 1 1 0 8 0 sysvmsgpl 40 10 0 3 1 0 1 1 0 8 0 semapl 112 49 0 39 1 0 1 1 0 8 0 shmpl 112 6 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 1928 0 534 46 0 46 46 0 8 0 ffsino 240 1928 0 534 83 0 83 83 0 8 0 nchpl 144 2617 0 1007 60 0 60 60 0 8 0 uvmvnodes 72 2267 0 0 42 0 42 42 0 8 0 vnodes 208 2267 0 0 120 0 120 120 0 8 0 namei 1024 7086 0 7086 1 0 1 1 0 8 1 vcpupl 1984 4 0 0 1 0 1 1 0 8 0 vmpool 528 4 0 0 1 0 1 1 0 8 0 scxspl 192 8670 0 8670 1 0 1 1 0 8 1 plimitpl 152 36 0 29 1 0 1 1 0 8 0 sigapl 424 514 0 485 4 0 4 4 0 8 0 futexpl 56 7262 0 7262 1 0 1 1 0 8 1 knotepl 112 67 0 48 1 0 1 1 0 8 0 kqueuepl 144 44 0 42 1 0 1 1 0 8 0 pipelkpl 16 124 0 114 1 0 1 1 0 8 0 pipepl 120 248 0 230 1 0 1 1 0 8 0 fdescpl 432 499 0 485 2 0 2 2 0 8 0 filepl 120 3298 0 3209 4 0 4 4 0 8 0 lockfpl 104 107 0 106 1 0 1 1 0 8 0 lockfspl 48 42 0 41 1 0 1 1 0 8 0 sessionpl 112 17 0 7 1 0 1 1 0 8 0 pgrppl 48 17 0 7 1 0 1 1 0 8 0 ucredpl 96 292 0 285 1 0 1 1 0 8 0 zombiepl 144 487 0 485 1 0 1 1 0 8 0 processpl 920 514 0 485 4 0 4 4 0 8 0 procpl 624 868 0 832 4 0 4 4 0 8 0 sosppl 128 5 0 5 2 1 1 1 0 8 1 sockpl 400 994 0 977 3 0 3 3 0 8 1 mcl64k 65536 55 0 55 1 0 1 1 0 8 1 mcl16k 16384 1 0 1 1 1 0 1 0 8 0 mcl12k 12288 6 0 6 2 1 1 1 0 8 1 mcl9k 9216 8 0 8 1 0 1 1 0 8 1 mcl8k 8192 11 0 11 1 0 1 1 0 8 1 mcl4k 4096 35 0 35 2 1 1 1 0 8 1 mcl2k2 2112 5 0 5 1 0 1 1 0 8 1 mcl2k 2048 62925 0 62869 18 10 8 16 0 8 0 mtagpl 80 177 0 41 4 1 3 3 0 8 0 mbufpl 256 108245 0 107881 42 18 24 34 0 8 0 bufpl 280 5381 0 165 373 0 373 373 0 8 0 anonpl 16 55907 0 41634 60 1 59 59 0 107 0 amapchunkpl 152 2826 0 2683 13 6 7 13 0 158 0 amappl16 192 2184 0 1400 43 2 41 41 0 8 1 amappl15 184 1 0 0 1 0 1 1 0 8 0 amappl14 176 1 0 1 1 1 0 1 0 8 0 amappl13 168 24 0 23 1 0 1 1 0 8 0 amappl12 160 162 0 159 1 0 1 1 0 8 0 amappl11 152 214 0 199 1 0 1 1 0 8 0 amappl10 144 15 0 12 1 0 1 1 0 8 0 amappl9 136 378 0 375 1 0 1 1 0 8 0 amappl8 128 264 0 249 1 0 1 1 0 8 0 amappl7 120 108 0 97 1 0 1 1 0 8 0 amappl6 112 166 0 161 1 0 1 1 0 8 0 amappl5 104 439 0 427 1 0 1 1 0 8 0 amappl4 96 581 0 550 1 0 1 1 0 8 0 amappl3 88 118 0 113 1 0 1 1 0 8 0 amappl2 80 3172 0 3108 3 1 2 3 0 8 0 amappl1 72 18572 0 18166 27 18 9 20 0 8 0 amappl 80 1120 0 1077 1 0 1 1 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 7 0 0 1 0 1 1 0 8 0 uaddrrnd 24 503 0 485 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 503 0 485 1 0 1 1 0 8 0 vmmpekpl 168 6925 0 6896 2 0 2 2 0 8 0 vmmpepl 168 65103 0 63263 108 21 87 100 0 357 5 vmsppl 272 502 0 485 2 0 2 2 0 8 0 pdppl 4096 1012 0 974 7 1 6 6 0 8 1 pvpl 32 183748 0 166502 155 6 149 150 0 265 7 pmappl 200 502 0 485 1 0 1 1 0 8 0 extentpl 40 46 0 29 1 0 1 1 0 8 0 phpool 112 187 0 34 5 0 5 5 0 8 0