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() at panic+0x15c sys/kern/subr_prf.c:207 pool_do_put(ffffffff825b2d80,fffffd802f5e0000) at pool_do_put+0x36a pool_put(ffffffff825b2d80,fffffd802f5e0000) at pool_put+0x4b sys/kern/subr_pool.c:802 m_free(fffffd802f5e0000) at m_free+0x119 sys/kern/uipc_mbuf.c:459 ml_purge(ffff800014f3fe78) at ml_purge+0x50 m_freem sys/kern/uipc_mbuf.c:538 [inline] ml_purge(ffff800014f3fe78) at ml_purge+0x50 sys/kern/uipc_mbuf.c:1628 ifq_purge(ffff800000a6ca88) at ifq_purge+0x97 sys/net/ifq.c:423 tapclose(5d00,7,2000,ffff8000ffff8008) at tapclose+0xed tun_dev_close sys/net/if_tun.c:454 [inline] tapclose(5d00,7,2000,ffff8000ffff8008) at tapclose+0xed sys/net/if_tun.c:433 spec_close(ffff800014f3ff90) at spec_close+0x311 sys/kern/spec_vnops.c:555 VOP_CLOSE(fffffd803bbe4a90,7,fffffd803f7c6ae0,ffff8000ffff8008) at VOP_CLOSE+0xc0 sys/kern/vfs_vops.c:175 vn_closefile(fffffd802d656da8,ffff8000ffff8008) at vn_closefile+0xd3 vn_close sys/kern/vfs_vnops.c:298 [inline] vn_closefile(fffffd802d656da8,ffff8000ffff8008) at vn_closefile+0xd3 sys/kern/vfs_vnops.c:610 fdrop(fffffd802d656da8,ffff8000ffff8008) at fdrop+0xc2 sys/kern/kern_descrip.c:1273 closef(fffffd802d656da8,ffff8000ffff8008) at closef+0x118 sys/kern/kern_descrip.c:1257 fdfree(ffff8000ffff8008) at fdfree+0x100 sys/kern/kern_descrip.c:1189 end trace frame: 0xffff800014f401e0, 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() at panic+0x15c sys/kern/subr_prf.c:207 pool_do_put(ffffffff825b2d80,fffffd802f5e0000) at pool_do_put+0x36a pool_put(ffffffff825b2d80,fffffd802f5e0000) at pool_put+0x4b sys/kern/subr_pool.c:802 m_free(fffffd802f5e0000) at m_free+0x119 sys/kern/uipc_mbuf.c:459 ml_purge(ffff800014f3fe78) at ml_purge+0x50 m_freem sys/kern/uipc_mbuf.c:538 [inline] ml_purge(ffff800014f3fe78) at ml_purge+0x50 sys/kern/uipc_mbuf.c:1628 ifq_purge(ffff800000a6ca88) at ifq_purge+0x97 sys/net/ifq.c:423 tapclose(5d00,7,2000,ffff8000ffff8008) at tapclose+0xed tun_dev_close sys/net/if_tun.c:454 [inline] tapclose(5d00,7,2000,ffff8000ffff8008) at tapclose+0xed sys/net/if_tun.c:433 spec_close(ffff800014f3ff90) at spec_close+0x311 sys/kern/spec_vnops.c:555 VOP_CLOSE(fffffd803bbe4a90,7,fffffd803f7c6ae0,ffff8000ffff8008) at VOP_CLOSE+0xc0 sys/kern/vfs_vops.c:175 vn_closefile(fffffd802d656da8,ffff8000ffff8008) at vn_closefile+0xd3 vn_close sys/kern/vfs_vnops.c:298 [inline] vn_closefile(fffffd802d656da8,ffff8000ffff8008) at vn_closefile+0xd3 sys/kern/vfs_vnops.c:610 fdrop(fffffd802d656da8,ffff8000ffff8008) at fdrop+0xc2 sys/kern/kern_descrip.c:1273 closef(fffffd802d656da8,ffff8000ffff8008) at closef+0x118 sys/kern/kern_descrip.c:1257 fdfree(ffff8000ffff8008) at fdfree+0x100 sys/kern/kern_descrip.c:1189 exit1(ffff8000ffff8008,19,1) at exit1+0x32f sys/kern/kern_exit.c:196 postsig(ffff8000ffff8008,19) at postsig+0x4a6 sigexit sys/kern/kern_sig.c:1499 [inline] postsig(ffff8000ffff8008,19) at postsig+0x4a6 sys/kern/kern_sig.c:1431 userret(ffff8000ffff8008) at userret+0x159 sys/kern/kern_sig.c:1889 syscall(ffff800014f40410) at syscall+0x42e mi_syscall_return sys/sys/syscall_mi.h:115 [inline] syscall(ffff800014f40410) at syscall+0x42e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7fffff74e0, count: -19 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff800014f3fc20 rbx 0xffff800014f3fcd0 rdx 0x2 rcx 0 rax 0 r8 0xffff800014f3fbe0 r9 0x1 r10 0 r11 0x359fdeae70d3c6c7 r12 0x3000000008 r13 0xffff800014f3fc30 r14 0x100 r15 0x1 rip 0xffffffff819e8e48 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800014f3fc10 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.0) pid=478323 stat=onproc flags process=a proc=2000 pri=17, usrpri=75, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff8290,0xffff800014f35978 process=0xffff8000148a2380 user=0xffff800014f3b000, vmspace=0xfffffd803f012330 estcpu=36, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 49312 460522 67768 0 2 0 syz-executor.1 62239 84618 0 0 3 0x14200 bored sosplice 67768 80173 75886 0 3 0x82 nanosleep syz-executor.1 75886 121466 13040 0 3 0x82 thrsleep syz-fuzzer 75886 216765 13040 0 3 0x4000082 nanosleep syz-fuzzer 75886 429555 13040 0 3 0x4000082 thrsleep syz-fuzzer 75886 264860 13040 0 3 0x4000082 thrsleep syz-fuzzer 75886 188417 13040 0 3 0x4000082 thrsleep syz-fuzzer 75886 231612 13040 0 2 0x4000082 syz-fuzzer 75886 515313 13040 0 3 0x4000082 thrsleep syz-fuzzer 75886 224738 13040 0 3 0x4000082 thrsleep syz-fuzzer 13040 353774 47587 0 3 0x10008a pause ksh 47587 45348 83339 0 3 0x92 select sshd 50195 164788 1 0 3 0x100083 ttyin getty 83339 70011 1 0 3 0x80 select sshd 63825 69312 73569 73 3 0x100090 kqread syslogd 73569 493108 1 0 3 0x100082 netio syslogd 61152 170679 1 77 3 0x100090 poll dhclient 13495 457982 1 0 3 0x80 poll dhclient 44626 94215 0 0 2 0x14200 zerothread 50684 437798 0 0 3 0x14200 aiodoned aiodoned 68492 492847 0 0 3 0x14200 syncer update 44971 464641 0 0 3 0x14200 cleaner cleaner 75528 449894 0 0 3 0x14200 reaper reaper 6835 272587 0 0 3 0x14200 pgdaemon pagedaemon 83629 391464 0 0 3 0x14200 bored crynlk 65308 237976 0 0 3 0x14200 bored crypto 40783 39814 0 0 3 0x40014200 acpi0 acpi0 93015 374300 0 0 2 0x14200 softnet 68814 452715 0 0 3 0x14200 bored systqmp 48075 39488 0 0 3 0x14200 bored systq 59548 51437 0 0 3 0x40014200 bored softclock 52675 87087 0 0 3 0x40014200 idle0 28967 19977 0 0 3 0x14200 bored smr 1 133754 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 9496 7101K 7937K 78643K 11391 0 pcb 13 8K 8K 78643K 52 0 rtable 105 3K 3K 78643K 242 0 ifaddr 59 12K 12K 78643K 69 0 counters 19 16K 16K 78643K 19 0 ioctlops 0 0K 2K 78643K 17 0 iov 0 0K 12K 78643K 22 0 mount 1 1K 1K 78643K 1 0 vnodes 1229 77K 77K 78643K 1415 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 5K 78643K 3 0 VM map 2 0K 0K 78643K 2 0 sem 12 0K 0K 78643K 21 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1794 195K 288K 78643K 12646 0 file desc 5 13K 25K 78643K 133 0 sigio 0 0K 0K 78643K 2 0 proc 48 38K 54K 78643K 386 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 8 0 in_multi 40 2K 2K 78643K 44 0 ether_multi 1 0K 0K 78643K 1 0 ISOFS mount 1 32K 32K 78643K 1 0 MSDOSFS mount 1 16K 16K 78643K 1 0 ttys 48 212K 212K 78643K 48 0 exec 0 0K 1K 78643K 189 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 114 22K 22K 78643K 1182 0 UVM aobj 4 4K 4K 78643K 4 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 25 0 NDP 9 0K 0K 78643K 14 0 temp 97 3552K 4189K 78643K 18330 0 kqueue 0 0K 0K 78643K 5 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 8 0 4 1 0 1 1 0 8 0 rtpcb 96 27 0 25 1 0 1 1 0 8 0 rtentry 112 58 0 14 2 0 2 2 0 8 0 unpcb 120 63 0 55 1 0 1 1 0 8 0 syncache 280 6 0 6 2 2 0 1 0 8 0 tcpqe 32 306 0 306 1 1 0 1 0 8 0 tcpcb 640 56 0 52 1 0 1 1 0 8 0 ipq 40 6 0 6 1 0 1 1 0 8 1 ipqe 40 143 0 143 1 0 1 1 0 8 1 inpcb 280 169 0 162 2 1 1 2 0 8 0 nd6 48 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 248 0 21 15 0 15 15 0 8 0 art_table 32 250 0 21 2 0 2 2 0 8 0 art_node 16 57 0 17 1 0 1 1 0 8 0 sysvmsgpl 40 29 0 14 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 17 0 7 1 0 1 1 0 8 0 shmpl 112 2 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 1572 0 177 46 0 46 46 0 8 0 ffsino 240 1572 0 177 83 0 83 83 0 8 0 nchpl 144 1958 0 345 60 0 60 60 0 8 0 uvmvnodes 72 1790 0 0 33 0 33 33 0 8 0 vnodes 208 1790 0 0 95 0 95 95 0 8 0 namei 1024 5278 0 5278 1 0 1 1 0 8 1 scsiplug 64 2 0 2 1 0 1 1 0 8 1 scxspl 208 5890 0 5890 8 5 3 7 0 8 3 plimitpl 152 16 0 9 1 0 1 1 0 8 0 sigapl 432 303 0 290 2 0 2 2 0 8 0 futexpl 56 3169 0 3169 1 0 1 1 0 8 1 knotepl 112 72 0 53 1 0 1 1 0 8 0 kqueuepl 104 52 0 50 1 0 1 1 0 8 0 pipepl 128 348 0 330 3 1 2 2 0 8 1 fdescpl 424 304 0 290 2 0 2 2 0 8 0 filepl 120 2075 0 1990 6 1 5 5 0 8 2 lockfpl 104 105 0 104 1 0 1 1 0 8 0 lockfspl 48 44 0 43 1 0 1 1 0 8 0 sessionpl 128 17 0 7 1 0 1 1 0 8 0 pgrppl 48 17 0 7 1 0 1 1 0 8 0 ucredpl 96 174 0 167 1 0 1 1 0 8 0 zombiepl 144 291 0 290 1 0 1 1 0 8 0 processpl 896 319 0 290 4 0 4 4 0 8 0 procpl 648 485 0 449 5 0 5 5 0 8 1 sosppl 144 3 0 3 1 0 1 1 0 8 1 sockpl 384 259 0 242 3 0 3 3 0 8 1 mcl64k 65536 270 0 270 32 10 22 32 0 8 22 mcl16k 16384 3 0 3 2 1 1 1 0 8 1 mcl12k 12288 4 0 4 1 0 1 1 0 8 1 mcl8k 8192 3 0 3 1 0 1 1 0 8 1 mcl4k 4096 22 0 22 2 1 1 1 0 8 1 mcl2k2 2112 1 0 1 1 0 1 1 0 8 1 mcl2k 2048 68289 0 68258 14 7 7 13 0 8 2 mtagpl 80 9 0 4 2 1 1 1 0 8 0 mbufpl 256 110076 0 109996 26 10 16 21 0 8 8 bufpl 280 6690 0 1812 349 0 349 349 0 8 0 anonpl 16 51510 0 31636 97 1 96 96 0 62 15 amapchunkpl 152 1443 0 1293 9 2 7 9 0 158 1 amappl16 192 1975 0 866 67 3 64 67 0 8 8 amappl15 184 1 0 0 1 0 1 1 0 8 0 amappl14 176 47 0 41 1 0 1 1 0 8 0 amappl12 160 7 0 5 1 0 1 1 0 8 0 amappl11 152 110 0 97 1 0 1 1 0 8 0 amappl10 144 9 0 9 1 1 0 1 0 8 0 amappl9 136 557 0 554 1 0 1 1 0 8 0 amappl8 128 157 0 126 1 0 1 1 0 8 0 amappl7 120 34 0 31 1 0 1 1 0 8 0 amappl6 112 115 0 103 1 0 1 1 0 8 0 amappl5 104 144 0 134 1 0 1 1 0 8 0 amappl4 96 516 0 491 1 0 1 1 0 8 0 amappl3 88 114 0 109 1 0 1 1 0 8 0 amappl2 80 1640 0 1580 3 1 2 3 0 8 0 amappl1 72 14983 0 14584 25 16 9 20 0 8 0 amappl 80 718 0 675 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 3 0 0 1 0 1 1 0 8 0 uaddrrnd 24 304 0 290 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 304 0 290 1 0 1 1 0 8 0 vmmpekpl 168 6582 0 6553 2 0 2 2 0 8 0 vmmpepl 168 44194 0 42053 134 10 124 129 0 357 25 vmsppl 272 303 0 290 2 1 1 2 0 8 0 pdppl 4096 614 0 580 6 1 5 6 0 8 0 pvpl 32 156068 0 133176 221 0 221 221 0 265 34 pmappl 200 303 0 290 1 0 1 1 0 8 0 extentpl 40 46 0 29 1 0 1 1 0 8 0 phpool 112 191 0 33 6 0 6 6 0 8 0