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(ffffffff821d307a) at panic+0x15c sys/kern/subr_prf.c:207 pool_do_put(ffffffff825a8878,fffffd8052000000) at pool_do_put+0x36a pool_put(ffffffff825a8878,fffffd8052000000) at pool_put+0x4b sys/kern/subr_pool.c:794 m_free(fffffd8052000000) at m_free+0x119 sys/kern/uipc_mbuf.c:459 ml_purge(ffff80001d441ed8) at ml_purge+0x50 m_freem sys/kern/uipc_mbuf.c:538 [inline] ml_purge(ffff80001d441ed8) at ml_purge+0x50 sys/kern/uipc_mbuf.c:1628 ifq_purge(ffff800000a03278) 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(ffff80001d442000) at spec_close+0x311 sys/kern/spec_vnops.c:555 VOP_CLOSE(fffffd805d8915b0,7,fffffd806c3bfc60,ffff80001d339758) at VOP_CLOSE+0xc0 sys/kern/vfs_vops.c:174 vn_closefile(fffffd8056669da8,ffff80001d339758) at vn_closefile+0xd2 vn_close sys/kern/vfs_vnops.c:298 [inline] vn_closefile(fffffd8056669da8,ffff80001d339758) at vn_closefile+0xd2 sys/kern/vfs_vnops.c:614 fdrop(fffffd8056669da8,ffff80001d339758) at fdrop+0xc2 sys/kern/kern_descrip.c:1276 closef(fffffd8056669da8,ffff80001d339758) at closef+0x117 sys/kern/kern_descrip.c:1260 fdfree(ffff80001d339758) at fdfree+0x100 sys/kern/kern_descrip.c:1192 end trace frame: 0xffff80001d442250, 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(ffffffff821d307a) at panic+0x15c sys/kern/subr_prf.c:207 pool_do_put(ffffffff825a8878,fffffd8052000000) at pool_do_put+0x36a pool_put(ffffffff825a8878,fffffd8052000000) at pool_put+0x4b sys/kern/subr_pool.c:794 m_free(fffffd8052000000) at m_free+0x119 sys/kern/uipc_mbuf.c:459 ml_purge(ffff80001d441ed8) at ml_purge+0x50 m_freem sys/kern/uipc_mbuf.c:538 [inline] ml_purge(ffff80001d441ed8) at ml_purge+0x50 sys/kern/uipc_mbuf.c:1628 ifq_purge(ffff800000a03278) 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(ffff80001d442000) at spec_close+0x311 sys/kern/spec_vnops.c:555 VOP_CLOSE(fffffd805d8915b0,7,fffffd806c3bfc60,ffff80001d339758) at VOP_CLOSE+0xc0 sys/kern/vfs_vops.c:174 vn_closefile(fffffd8056669da8,ffff80001d339758) at vn_closefile+0xd2 vn_close sys/kern/vfs_vnops.c:298 [inline] vn_closefile(fffffd8056669da8,ffff80001d339758) at vn_closefile+0xd2 sys/kern/vfs_vnops.c:614 fdrop(fffffd8056669da8,ffff80001d339758) at fdrop+0xc2 sys/kern/kern_descrip.c:1276 closef(fffffd8056669da8,ffff80001d339758) at closef+0x117 sys/kern/kern_descrip.c:1260 fdfree(ffff80001d339758) at fdfree+0x100 sys/kern/kern_descrip.c:1192 exit1(ffff80001d339758,0,19,1) at exit1+0x334 sys/kern/kern_exit.c:196 postsig(ffff80001d339758,19) at postsig+0x4a8 sigexit sys/kern/kern_sig.c:1444 [inline] postsig(ffff80001d339758,19) at postsig+0x4a8 sys/kern/kern_sig.c:1376 userret(ffff80001d339758) at userret+0x159 sys/kern/kern_sig.c:1828 syscall(ffff80001d442480) at syscall+0x42e mi_syscall_return sys/sys/syscall_mi.h:129 [inline] syscall(ffff80001d442480) at syscall+0x42e sys/arch/amd64/amd64/trap.c:592 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7fffff75e0, count: -19 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80001d441c80 rbx 0xffff80001d441d30 rdx 0x2 rcx 0 rax 0 r8 0xffff80001d441c40 r9 0x1 r10 0 r11 0x1c184e80e77d7746 r12 0x3000000008 r13 0xffff80001d441c90 r14 0x100 r15 0x1 rip 0xffffffff81c099e8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80001d441c70 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.0) pid=223453 stat=onproc flags process=a proc=2000 pri=17, usrpri=70, nice=20 forw=0xffffffffffffffff, list=0xffff80001d339ea8,0xffff80001d3a8d60 process=0xffff80001d38e380 user=0xffff80001d43d000, vmspace=0xfffffd806bc09000 estcpu=36, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 21557 286771 2146 0 2 0x2 syz-executor.1 6132 87728 0 0 3 0x14200 acct acct 38473 165333 0 0 3 0x14200 bored sosplice 2146 115698 27407 0 3 0x82 thrsleep syz-fuzzer 2146 504489 27407 0 3 0x4000082 nanosleep syz-fuzzer 2146 214966 27407 0 3 0x4000082 thrsleep syz-fuzzer 2146 272318 27407 0 3 0x4000082 thrsleep syz-fuzzer 2146 169708 27407 0 2 0x4000082 syz-fuzzer 2146 227621 27407 0 3 0x4000082 thrsleep syz-fuzzer 2146 31313 27407 0 3 0x4000082 thrsleep syz-fuzzer 2146 245116 27407 0 3 0x4000082 thrsleep syz-fuzzer 27407 301175 95648 0 3 0x10008a pause ksh 95648 282535 17158 0 3 0x92 select sshd 91122 51450 1 0 3 0x100083 ttyin getty 17158 285411 1 0 3 0x80 select sshd 12564 363177 28486 73 3 0x100090 kqread syslogd 28486 54145 1 0 3 0x100082 netio syslogd 13118 487340 1 77 3 0x100090 poll dhclient 66579 6302 1 0 3 0x80 poll dhclient 59891 227497 0 0 3 0x14200 bored smr 35069 46055 0 0 2 0x14200 zerothread 64190 161897 0 0 3 0x14200 aiodoned aiodoned 62029 157149 0 0 3 0x14200 syncer update 27753 273500 0 0 3 0x14200 cleaner cleaner 58801 337009 0 0 3 0x14200 reaper reaper 20782 123641 0 0 3 0x14200 pgdaemon pagedaemon 10137 59584 0 0 3 0x14200 bored crynlk 32129 320641 0 0 3 0x14200 bored crypto 6079 253521 0 0 3 0x40014200 acpi0 acpi0 22423 281664 0 0 3 0x14200 bored softnet 63139 290635 0 0 3 0x14200 bored systqmp 16690 213067 0 0 3 0x14200 bored systq 47745 399033 0 0 2 0x40014200 softclock 72477 203265 0 0 3 0x40014200 idle0 1 500690 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 9498 6341K 6849K 78643K 10898 0 pcb 13 8K 8K 78643K 67 0 rtable 104 3K 4K 78643K 329 0 ifaddr 67 13K 14K 78643K 122 0 counters 21 16K 16K 78643K 30 0 ioctlops 0 0K 2K 78643K 22 0 iov 0 0K 16K 78643K 46 0 mount 1 1K 1K 78643K 1 0 vnodes 1220 77K 77K 78643K 1338 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 5K 78643K 4 0 VM map 2 0K 0K 78643K 2 0 sem 12 0K 0K 78643K 44 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1794 195K 288K 78643K 12646 0 file desc 4 9K 25K 78643K 212 0 sigio 0 0K 0K 78643K 6 0 proc 49 38K 63K 78643K 410 0 subproc 23 1K 2K 78643K 51 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 31 0 in_multi 42 2K 2K 78643K 90 0 ether_multi 1 0K 0K 78643K 7 0 ISOFS mount 1 32K 32K 78643K 1 0 MSDOSFS mount 1 16K 16K 78643K 1 0 ttys 67 307K 307K 78643K 67 0 exec 0 0K 1K 78643K 204 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 103 21K 22K 78643K 1349 0 UVM aobj 8 4K 4K 78643K 10 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 47 0 NDP 11 0K 0K 78643K 28 0 temp 104 3016K 3080K 78643K 20950 0 kqueue 3 4K 24K 78643K 177 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 10 0 4 1 0 1 1 0 8 0 rtpcb 80 31 0 29 1 0 1 1 0 8 0 rtentry 112 71 0 29 2 0 2 2 0 8 0 unpcb 120 167 0 159 1 0 1 1 0 8 0 syncache 264 8 0 8 2 1 1 1 0 8 1 tcpqe 32 211 0 211 1 1 0 1 0 8 0 tcpcb 544 108 0 104 1 0 1 1 0 8 0 inpcb 280 271 0 264 2 0 2 2 0 8 1 nd6 48 12 0 7 1 0 1 1 0 8 0 pkpcb 40 2 0 2 1 0 1 1 0 8 1 ppxss 1128 3 0 3 1 1 0 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 298 0 122 13 0 13 13 0 8 2 art_table 32 299 0 122 2 0 2 2 0 8 0 art_node 16 70 0 31 1 0 1 1 0 8 0 sysvmsgpl 40 10 0 3 1 0 1 1 0 8 0 semapl 112 42 0 32 1 0 1 1 0 8 0 shmpl 112 8 0 2 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 1681 0 281 46 0 46 46 0 8 0 ffsino 240 1681 0 281 83 0 83 83 0 8 0 nchpl 144 2147 0 550 60 0 60 60 0 8 0 uvmvnodes 72 1804 0 0 33 0 33 33 0 8 0 vnodes 208 1804 0 0 95 0 95 95 0 8 0 namei 1024 5731 0 5730 1 0 1 1 0 8 0 scxspl 192 6606 0 6606 1 0 1 1 0 8 1 plimitpl 152 37 0 30 1 0 1 1 0 8 0 sigapl 424 397 0 368 4 0 4 4 0 8 0 futexpl 56 5831 0 5831 1 0 1 1 0 8 1 knotepl 112 246 0 227 1 0 1 1 0 8 0 kqueuepl 144 385 0 383 1 0 1 1 0 8 0 pipelkpl 16 424 0 414 1 0 1 1 0 8 0 pipepl 120 848 0 830 2 0 2 2 0 8 1 fdescpl 432 381 0 368 2 0 2 2 0 8 0 filepl 120 3308 0 3223 6 1 5 5 0 8 2 lockfpl 104 102 0 101 1 0 1 1 0 8 0 lockfspl 48 30 0 29 1 0 1 1 0 8 0 sessionpl 112 18 0 8 1 0 1 1 0 8 0 pgrppl 48 32 0 22 1 0 1 1 0 8 0 ucredpl 96 254 0 245 1 0 1 1 0 8 0 zombiepl 144 369 0 368 1 0 1 1 0 8 0 processpl 896 397 0 368 4 0 4 4 0 8 0 procpl 624 628 0 592 4 0 4 4 0 8 1 sosppl 128 6 0 6 1 0 1 1 0 8 1 sockpl 400 474 0 457 4 1 3 4 0 8 1 mcl64k 65536 21 0 21 1 0 1 1 0 8 1 mcl16k 16384 7 0 7 1 1 0 1 0 8 0 mcl12k 12288 7 0 7 1 0 1 1 0 8 1 mcl9k 9216 1 0 1 1 0 1 1 0 8 1 mcl8k 8192 8 0 8 1 0 1 1 0 8 1 mcl4k 4096 40 0 39 2 1 1 1 0 8 0 mcl2k2 2112 1 0 1 1 0 1 1 0 8 1 mcl2k 2048 64793 0 64748 17 10 7 16 0 8 0 mtagpl 80 21 0 16 2 1 1 1 0 8 0 mbufpl 256 103826 0 103746 13 2 11 11 0 8 0 bufpl 280 4534 0 166 312 0 312 312 0 8 0 anonpl 16 51807 0 36180 70 2 68 69 0 107 0 amapchunkpl 152 1665 0 1528 8 1 7 8 0 158 1 amappl16 192 1772 0 868 47 0 47 47 0 8 1 amappl15 184 9 0 7 1 0 1 1 0 8 0 amappl14 176 11 0 10 2 1 1 1 0 8 0 amappl13 168 29 0 28 1 0 1 1 0 8 0 amappl12 160 87 0 82 1 0 1 1 0 8 0 amappl11 152 66 0 54 1 0 1 1 0 8 0 amappl10 144 11 0 9 1 0 1 1 0 8 0 amappl9 136 433 0 429 1 0 1 1 0 8 0 amappl8 128 380 0 359 1 0 1 1 0 8 0 amappl7 120 116 0 103 1 0 1 1 0 8 0 amappl6 112 24 0 17 1 0 1 1 0 8 0 amappl5 104 372 0 361 1 0 1 1 0 8 0 amappl4 96 455 0 425 1 0 1 1 0 8 0 amappl3 88 117 0 110 1 0 1 1 0 8 0 amappl2 80 2253 0 2196 3 1 2 3 0 8 0 amappl1 72 16657 0 16264 24 15 9 20 0 8 0 amappl 80 862 0 821 2 0 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 9 0 2 1 0 1 1 0 8 0 uaddrrnd 24 381 0 368 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 381 0 368 1 0 1 1 0 8 0 vmmpekpl 168 7861 0 7835 2 0 2 2 0 8 0 vmmpepl 168 53129 0 51270 134 13 121 121 0 357 32 vmsppl 272 380 0 368 2 1 1 2 0 8 0 pdppl 4096 768 0 736 6 1 5 6 0 8 0 pvpl 32 170246 0 151711 168 3 165 167 0 265 5 pmappl 200 380 0 368 1 0 1 1 0 8 0 extentpl 40 46 0 29 1 0 1 1 0 8 0 phpool 112 155 0 19 5 0 5 5 0 8 0