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(ffffffff825b4d28,fffffd8038000000) at pool_do_put+0x36a pool_put(ffffffff825b4d28,fffffd8038000000) at pool_put+0x4b sys/kern/subr_pool.c:802 m_free(fffffd8038000000) at m_free+0x119 sys/kern/uipc_mbuf.c:459 ml_purge(ffff80001491a848) at ml_purge+0x50 m_freem sys/kern/uipc_mbuf.c:538 [inline] ml_purge(ffff80001491a848) at ml_purge+0x50 sys/kern/uipc_mbuf.c:1628 ifq_purge(ffff800000ad6278) at ifq_purge+0x97 sys/net/ifq.c:423 tapclose(5d00,7,2000,ffff8000ffff2ee8) at tapclose+0xed tun_dev_close sys/net/if_tun.c:454 [inline] tapclose(5d00,7,2000,ffff8000ffff2ee8) at tapclose+0xed sys/net/if_tun.c:433 spec_close(ffff80001491a960) at spec_close+0x311 sys/kern/spec_vnops.c:555 VOP_CLOSE(fffffd8035f6f750,7,fffffd803f7c6a20,ffff8000ffff2ee8) at VOP_CLOSE+0xc0 sys/kern/vfs_vops.c:175 vn_closefile(fffffd8029600878,ffff8000ffff2ee8) at vn_closefile+0xd3 vn_close sys/kern/vfs_vnops.c:298 [inline] vn_closefile(fffffd8029600878,ffff8000ffff2ee8) at vn_closefile+0xd3 sys/kern/vfs_vnops.c:610 fdrop(fffffd8029600878,ffff8000ffff2ee8) at fdrop+0xc2 sys/kern/kern_descrip.c:1273 closef(fffffd8029600878,ffff8000ffff2ee8) at closef+0x118 sys/kern/kern_descrip.c:1257 fdfree(ffff8000ffff2ee8) at fdfree+0x100 sys/kern/kern_descrip.c:1189 end trace frame: 0xffff80001491abb0, 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(ffffffff825b4d28,fffffd8038000000) at pool_do_put+0x36a pool_put(ffffffff825b4d28,fffffd8038000000) at pool_put+0x4b sys/kern/subr_pool.c:802 m_free(fffffd8038000000) at m_free+0x119 sys/kern/uipc_mbuf.c:459 ml_purge(ffff80001491a848) at ml_purge+0x50 m_freem sys/kern/uipc_mbuf.c:538 [inline] ml_purge(ffff80001491a848) at ml_purge+0x50 sys/kern/uipc_mbuf.c:1628 ifq_purge(ffff800000ad6278) at ifq_purge+0x97 sys/net/ifq.c:423 tapclose(5d00,7,2000,ffff8000ffff2ee8) at tapclose+0xed tun_dev_close sys/net/if_tun.c:454 [inline] tapclose(5d00,7,2000,ffff8000ffff2ee8) at tapclose+0xed sys/net/if_tun.c:433 spec_close(ffff80001491a960) at spec_close+0x311 sys/kern/spec_vnops.c:555 VOP_CLOSE(fffffd8035f6f750,7,fffffd803f7c6a20,ffff8000ffff2ee8) at VOP_CLOSE+0xc0 sys/kern/vfs_vops.c:175 vn_closefile(fffffd8029600878,ffff8000ffff2ee8) at vn_closefile+0xd3 vn_close sys/kern/vfs_vnops.c:298 [inline] vn_closefile(fffffd8029600878,ffff8000ffff2ee8) at vn_closefile+0xd3 sys/kern/vfs_vnops.c:610 fdrop(fffffd8029600878,ffff8000ffff2ee8) at fdrop+0xc2 sys/kern/kern_descrip.c:1273 closef(fffffd8029600878,ffff8000ffff2ee8) at closef+0x118 sys/kern/kern_descrip.c:1257 fdfree(ffff8000ffff2ee8) at fdfree+0x100 sys/kern/kern_descrip.c:1189 exit1(ffff8000ffff2ee8,0,1) at exit1+0x32f sys/kern/kern_exit.c:196 sys_exit(ffff8000ffff2ee8,ffff80001491abf0,ffff80001491ac40) at sys_exit+0x17 sys/kern/kern_exit.c:94 syscall(ffff80001491acc0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:555 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffd2460, count: -18 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80001491a5f0 rbx 0xffff80001491a6a0 rdx 0x2 rcx 0 rax 0 r8 0xffff80001491a5b0 r9 0x1 r10 0 r11 0x78422aeda09003b r12 0x3000000008 r13 0xffff80001491a600 r14 0x100 r15 0x1 rip 0xffffffff81339268 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80001491a5e0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.0) pid=185631 stat=onproc flags process=1008 proc=2000 pri=32, usrpri=84, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff2508,0xffffffff82583be0 process=0xffff8000148a30f8 user=0xffff800014915000, vmspace=0xfffffd803f012cc0 estcpu=34, cpticks=11, pctcpu=0.7 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 86211 110949 88131 0 3 0x82 piperd syz-executor.1 26670 495559 1 0 3 0x100083 ttyin getty 45030 79090 0 0 3 0x14200 acct acct 34659 391009 0 0 3 0x14200 bored sosplice 88131 370398 79220 0 3 0x82 thrsleep syz-fuzzer 88131 465760 79220 0 3 0x4000082 thrsleep syz-fuzzer 88131 358076 79220 0 3 0x4000082 thrsleep syz-fuzzer 88131 346622 79220 0 3 0x4000082 thrsleep syz-fuzzer 88131 31366 79220 0 3 0x4000082 thrsleep syz-fuzzer 88131 380018 79220 0 2 0x4000082 syz-fuzzer 88131 185736 79220 0 3 0x4000082 thrsleep syz-fuzzer 88131 93327 79220 0 3 0x4000082 thrsleep syz-fuzzer 79220 471873 69992 0 3 0x10008a pause ksh 69992 321873 52144 0 2 0x92 sshd 52144 179849 1 0 2 0x80 sshd 10143 116070 12155 73 3 0x100090 kqread syslogd 12155 154379 1 0 3 0x100082 netio syslogd 26190 324045 1 77 2 0x100090 dhclient 12439 245858 1 0 2 0x80 dhclient 36520 231605 0 0 2 0x14200 zerothread 29595 134772 0 0 3 0x14200 aiodoned aiodoned 24741 56715 0 0 3 0x14200 syncer update 96051 469563 0 0 3 0x14200 cleaner cleaner 35600 622 0 0 3 0x14200 reaper reaper 87782 70005 0 0 3 0x14200 pgdaemon pagedaemon 67988 330902 0 0 3 0x14200 bored crynlk 23113 92697 0 0 3 0x14200 bored crypto 8466 237251 0 0 3 0x40014200 acpi0 acpi0 51387 155281 0 0 2 0x14200 softnet 96461 367895 0 0 3 0x14200 bored systqmp 39964 283735 0 0 2 0x14200 systq 80838 520783 0 0 3 0x40014200 bored softclock 59427 514450 0 0 3 0x40014200 idle0 85203 46629 0 0 3 0x14200 bored smr 1 427864 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 Kern Lim devbuf 9568 6573K 8017K 78643K 19743 0 0 pcb 13 8K 8K 78643K 620 0 0 rtable 107 12K 12K 78643K 1221 0 0 ifaddr 105 20K 20K 78643K 498 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 117 0 0 iov 0 0K 24K 78643K 354 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1229 77K 77K 78643K 3830 0 0 UFS quota 1 32K 32K 78643K 1 0 0 UFS mount 5 36K 36K 78643K 5 0 0 shm 2 1K 9K 78643K 25 0 0 VM map 19 4K 4K 78643K 24 0 0 sem 12 1K 1K 78643K 283 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1794 195K 288K 78643K 12646 0 0 file desc 4 9K 25K 78643K 1828 0 0 sigio 0 0K 0K 78643K 45 0 0 proc 49 38K 63K 78643K 775 0 0 subproc 23 1K 2K 78643K 121 0 0 NFS srvsock 1 0K 0K 78643K 1 0 0 NFS daemon 1 16K 16K 78643K 1 0 0 ip_moptions 0 0K 0K 78643K 168 0 0 in_multi 113 5K 5K 78643K 295 0 0 ether_multi 1 0K 0K 78643K 14 0 0 mrt 0 0K 0K 78643K 10 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 114 503K 503K 78643K 114 0 0 exec 0 0K 1K 78643K 413 0 0 pfkey data 0 0K 0K 78643K 18 0 0 pagedep 1 8K 8K 78643K 1 0 0 inodedep 1 32K 32K 78643K 1 0 0 newblk 1 0K 0K 78643K 1 0 0 VM swap 7 26K 26K 78643K 7 0 0 UVM amap 148 153K 153K 78643K 5251 0 0 UVM aobj 130 5K 5K 78643K 134 0 0 memdesc 1 4K 4K 78643K 1 0 0 crypto data 1 1K 1K 78643K 1 0 0 ip6_options 0 0K 1K 78643K 343 0 0 NDP 17 0K 0K 78643K 109 0 0 temp 154 3539K 3609K 78643K 42706 0 0 kqueue 0 0K 0K 78643K 3 0 0 SYN cache 2 16K 16K 78643K 2 0 0 ddb> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle arp 64 33 0 26 1 0 1 1 0 8 0 rtpcb 80 371 0 369 1 0 1 1 0 8 0 rtentry 112 175 0 136 2 0 2 2 0 8 0 unpcb 120 1536 0 1528 2 1 1 2 0 8 0 syncache 264 8 0 8 4 4 0 1 0 8 0 sackhl 24 1 0 1 1 1 0 1 0 8 0 tcpqe 32 291 0 291 2 2 0 1 0 8 0 tcpcb 544 618 0 614 3 2 1 2 0 8 0 ipq 40 21 0 21 8 7 1 1 0 8 1 ipqe 40 686 0 686 8 7 1 1 0 8 1 inpcb 280 2528 0 2521 6 5 1 3 0 8 0 rttmr 72 3 0 3 2 2 0 1 0 8 0 nd6 48 27 0 25 1 0 1 1 0 8 0 pkpcb 40 22 0 22 2 2 0 1 0 8 0 ppxss 1128 41 0 41 7 7 0 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 849 0 643 25 10 15 16 0 8 0 art_table 32 850 0 643 3 0 3 3 0 8 0 art_node 16 174 0 137 1 0 1 1 0 8 0 sysvmsgpl 40 19 0 13 1 0 1 1 0 8 0 semupl 112 2 0 2 1 1 0 1 0 8 0 semapl 112 281 0 271 1 0 1 1 0 8 0 shmpl 112 132 0 4 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 4111 0 2711 46 0 46 46 0 8 0 ffsino 240 4111 0 2711 83 0 83 83 0 8 0 nchpl 144 7050 0 6577 61 39 22 61 0 8 0 uvmvnodes 72 6367 0 0 116 0 116 116 0 8 0 vnodes 208 6367 0 0 336 0 336 336 0 8 0 namei 1024 24763 0 24763 3 2 1 1 0 8 1 vcpupl 1984 17 0 0 3 0 3 3 0 8 0 vmpool 520 22 0 5 2 0 2 2 0 8 0 scsiplug 64 2 0 2 2 2 0 1 0 8 0 scxspl 192 20967 0 20967 12 10 2 7 0 8 2 plimitpl 152 130 0 123 1 0 1 1 0 8 0 sigapl 432 1986 0 1974 2 0 2 2 0 8 0 futexpl 56 52358 0 52358 3 2 1 1 0 8 1 knotepl 112 311 0 292 1 0 1 1 0 8 0 kqueuepl 104 372 0 370 1 0 1 1 0 8 0 pipepl 128 1004 0 988 6 4 2 2 0 8 1 fdescpl 424 1987 0 1974 2 0 2 2 0 8 0 filepl 120 17471 0 17388 11 7 4 5 0 8 1 lockfpl 104 572 0 571 1 0 1 1 0 8 0 lockfspl 48 188 0 187 1 0 1 1 0 8 0 sessionpl 112 25 0 15 1 0 1 1 0 8 0 pgrppl 48 45 0 35 1 0 1 1 0 8 0 ucredpl 96 1721 0 1714 1 0 1 1 0 8 0 zombiepl 144 1977 0 1975 1 0 1 1 0 8 0 processpl 864 2005 0 1975 4 0 4 4 0 8 0 procpl 632 4206 0 4169 6 2 4 5 0 8 0 sosppl 128 17 0 17 6 6 0 1 0 8 0 sockpl 384 4504 0 4487 17 14 3 6 0 8 1 mcl64k 65536 558 0 556 39 38 1 29 0 8 0 mcl16k 16384 45 0 45 5 5 0 1 0 8 0 mcl12k 12288 65 0 65 5 4 1 1 0 8 1 mcl9k 9216 28 0 28 8 8 0 1 0 8 0 mcl8k 8192 87 0 87 4 3 1 1 0 8 1 mcl4k 4096 228 0 228 4 3 1 1 0 8 1 mcl2k2 2112 13 0 13 7 7 0 1 0 8 0 mcl2k 2048 71812 0 71760 20 12 8 17 0 8 1 mtagpl 80 88 0 65 3 2 1 1 0 8 0 mbufpl 256 135147 0 134839 94 60 34 35 0 8 8 bufpl 256 11895 0 5493 401 0 401 401 0 8 0 anonpl 16 243072 0 221597 163 63 100 117 0 62 7 amapchunkpl 152 10521 0 10360 44 35 9 20 0 158 2 amappl16 192 11227 0 10003 126 59 67 76 0 8 5 amappl15 184 1 0 1 1 1 0 1 0 8 0 amappl14 176 369 0 364 1 0 1 1 0 8 0 amappl12 160 583 0 581 2 1 1 1 0 8 0 amappl11 152 505 0 493 1 0 1 1 0 8 0 amappl10 144 331 0 328 1 0 1 1 0 8 0 amappl9 136 724 0 719 1 0 1 1 0 8 0 amappl8 128 353 0 311 2 0 2 2 0 8 0 amappl7 120 378 0 371 1 0 1 1 0 8 0 amappl6 112 491 0 480 1 0 1 1 0 8 0 amappl5 104 885 0 874 1 0 1 1 0 8 0 amappl4 96 1698 0 1673 1 0 1 1 0 8 0 amappl3 88 812 0 805 1 0 1 1 0 8 0 amappl2 80 14725 0 14659 3 1 2 3 0 8 0 amappl1 72 44091 0 43670 26 16 10 20 0 8 0 amappl 80 4553 0 4495 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 133 0 4 3 0 3 3 0 8 0 uaddrrnd 24 2009 0 1974 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 2009 0 1974 1 0 1 1 0 8 0 vmmpekpl 168 16758 0 16725 2 0 2 2 0 8 0 vmmpepl 168 242248 0 239932 231 95 136 149 0 357 26 vmsppl 272 1986 0 1974 3 2 1 2 0 8 0 pdppl 4096 4024 0 3975 10 3 7 7 0 8 0 pvpl 32 627663 0 603620 373 89 284 310 0 265 87 pmappl 200 2008 0 1979 2 0 2 2 0 8 0 extentpl 40 46 0 29 1 0 1 1 0 8 0 phpool 112 700 0 142 17 0 17 17 0 8 0