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(ffffffff821ac204) at panic+0x15c sys/kern/subr_prf.c:207 pool_do_put(ffffffff82575d60,fffffd8062000000) at pool_do_put+0x36a pool_put(ffffffff82575d60,fffffd8062000000) at pool_put+0x4b sys/kern/subr_pool.c:802 m_free(fffffd8062000000) at m_free+0x119 sys/kern/uipc_mbuf.c:459 ml_purge(ffff80001e422978) at ml_purge+0x50 m_freem sys/kern/uipc_mbuf.c:538 [inline] ml_purge(ffff80001e422978) at ml_purge+0x50 sys/kern/uipc_mbuf.c:1628 ifq_purge(ffff8000009e6a78) at ifq_purge+0x97 sys/net/ifq.c:423 tapclose(5d01,7,2000,ffff800020638ee8) at tapclose+0xed tun_dev_close sys/net/if_tun.c:454 [inline] tapclose(5d01,7,2000,ffff800020638ee8) at tapclose+0xed sys/net/if_tun.c:433 spec_close(ffff80001e422a90) at spec_close+0x311 sys/kern/spec_vnops.c:555 VOP_CLOSE(fffffd806a376dd0,7,fffffd806c3c6cc0,ffff800020638ee8) at VOP_CLOSE+0xc0 sys/kern/vfs_vops.c:175 vn_closefile(fffffd80697f6bb8,ffff800020638ee8) at vn_closefile+0xd3 vn_close sys/kern/vfs_vnops.c:298 [inline] vn_closefile(fffffd80697f6bb8,ffff800020638ee8) at vn_closefile+0xd3 sys/kern/vfs_vnops.c:610 fdrop(fffffd80697f6bb8,ffff800020638ee8) at fdrop+0xc2 sys/kern/kern_descrip.c:1273 closef(fffffd80697f6bb8,ffff800020638ee8) at closef+0x118 sys/kern/kern_descrip.c:1257 fdfree(ffff800020638ee8) at fdfree+0x100 sys/kern/kern_descrip.c:1189 end trace frame: 0xffff80001e422ce0, 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(ffffffff821ac204) at panic+0x15c sys/kern/subr_prf.c:207 pool_do_put(ffffffff82575d60,fffffd8062000000) at pool_do_put+0x36a pool_put(ffffffff82575d60,fffffd8062000000) at pool_put+0x4b sys/kern/subr_pool.c:802 m_free(fffffd8062000000) at m_free+0x119 sys/kern/uipc_mbuf.c:459 ml_purge(ffff80001e422978) at ml_purge+0x50 m_freem sys/kern/uipc_mbuf.c:538 [inline] ml_purge(ffff80001e422978) at ml_purge+0x50 sys/kern/uipc_mbuf.c:1628 ifq_purge(ffff8000009e6a78) at ifq_purge+0x97 sys/net/ifq.c:423 tapclose(5d01,7,2000,ffff800020638ee8) at tapclose+0xed tun_dev_close sys/net/if_tun.c:454 [inline] tapclose(5d01,7,2000,ffff800020638ee8) at tapclose+0xed sys/net/if_tun.c:433 spec_close(ffff80001e422a90) at spec_close+0x311 sys/kern/spec_vnops.c:555 VOP_CLOSE(fffffd806a376dd0,7,fffffd806c3c6cc0,ffff800020638ee8) at VOP_CLOSE+0xc0 sys/kern/vfs_vops.c:175 vn_closefile(fffffd80697f6bb8,ffff800020638ee8) at vn_closefile+0xd3 vn_close sys/kern/vfs_vnops.c:298 [inline] vn_closefile(fffffd80697f6bb8,ffff800020638ee8) at vn_closefile+0xd3 sys/kern/vfs_vnops.c:610 fdrop(fffffd80697f6bb8,ffff800020638ee8) at fdrop+0xc2 sys/kern/kern_descrip.c:1273 closef(fffffd80697f6bb8,ffff800020638ee8) at closef+0x118 sys/kern/kern_descrip.c:1257 fdfree(ffff800020638ee8) at fdfree+0x100 sys/kern/kern_descrip.c:1189 exit1(ffff800020638ee8,0,19,1) at exit1+0x334 sys/kern/kern_exit.c:196 postsig(ffff800020638ee8,19) at postsig+0x4a8 sigexit sys/kern/kern_sig.c:1498 [inline] postsig(ffff800020638ee8,19) at postsig+0x4a8 sys/kern/kern_sig.c:1430 userret(ffff800020638ee8) at userret+0x159 sys/kern/kern_sig.c:1888 syscall(ffff80001e422f10) at syscall+0x42e mi_syscall_return sys/sys/syscall_mi.h:115 [inline] syscall(ffff80001e422f10) at syscall+0x42e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffddcb0, count: -19 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80001e422720 rbx 0xffff80001e4227d0 rdx 0x2 rcx 0 rax 0 r8 0xffff80001e4226e0 r9 0x1 r10 0 r11 0x985b44aa1441e8cc r12 0x3000000008 r13 0xffff80001e422730 r14 0x100 r15 0x1 rip 0xffffffff82063a78 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80001e422710 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.1) pid=156618 stat=onproc flags process=a proc=2000 pri=17, usrpri=75, nice=20 forw=0xffffffffffffffff, list=0xffff8000206389f8,0xffff800020639b50 process=0xffff8000ffff7118 user=0xffff80001e41d000, vmspace=0xfffffd806bc11110 estcpu=36, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 3830 191296 10238 0 2 0x10 syz-executor.0 3830 384190 10238 0 2 0x4000010 syz-executor.0 10238 374930 50873 0 3 0x82 nanosleep syz-executor.0 78348 495311 1 0 3 0x100083 ttyin getty 90191 189522 0 0 3 0x14200 bored sosplice 50873 479434 46579 0 3 0x82 thrsleep syz-fuzzer 50873 226727 46579 0 3 0x4000082 nanosleep syz-fuzzer 50873 463196 46579 0 3 0x4000082 thrsleep syz-fuzzer 50873 505939 46579 0 3 0x4000082 thrsleep syz-fuzzer 50873 166590 46579 0 3 0x4000082 thrsleep syz-fuzzer 50873 285897 46579 0 2 0x4000082 syz-fuzzer 50873 456999 46579 0 3 0x4000082 thrsleep syz-fuzzer 50873 448443 46579 0 3 0x4000082 thrsleep syz-fuzzer 46579 263340 80813 0 3 0x10008a pause ksh 80813 520446 18923 0 3 0x92 select sshd 18923 511909 1 0 3 0x80 select sshd 43078 239449 48158 73 3 0x100090 kqread syslogd 48158 236196 1 0 3 0x100082 netio syslogd 86567 470930 1 77 3 0x100090 poll dhclient 58771 54013 1 0 3 0x80 poll dhclient 40442 47164 0 0 2 0x14200 zerothread 31081 187363 0 0 3 0x14200 aiodoned aiodoned 87256 125925 0 0 3 0x14200 syncer update 80266 311828 0 0 3 0x14200 cleaner cleaner 65725 140009 0 0 3 0x14200 reaper reaper 7684 465475 0 0 3 0x14200 pgdaemon pagedaemon 97183 441135 0 0 3 0x14200 bored crynlk 60347 502134 0 0 3 0x14200 bored crypto 2471 196237 0 0 3 0x40014200 acpi0 acpi0 69714 33471 0 0 2 0x14200 softnet 31739 309676 0 0 3 0x14200 bored systqmp 93780 52514 0 0 3 0x14200 bored systq 9630 245034 0 0 3 0x40014200 bored softclock 38356 83922 0 0 3 0x40014200 idle0 14494 431171 0 0 3 0x14200 bored smr 1 222056 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 9564 7033K 7675K 78643K 13729 0 pcb 13 11K 12K 78643K 303 0 rtable 109 8K 8K 78643K 840 0 ifaddr 106 18K 19K 78643K 333 0 counters 19 16K 16K 78643K 19 0 ioctlops 0 0K 2K 78643K 104 0 iov 0 0K 32K 78643K 423 0 mount 1 1K 1K 78643K 1 0 vnodes 1221 77K 77K 78643K 2356 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 5K 78643K 129 0 VM map 2 0K 0K 78643K 2 0 sem 12 0K 1K 78643K 1116 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1794 195K 288K 78643K 12646 0 file desc 5 13K 25K 78643K 1386 0 sigio 0 0K 0K 78643K 22 0 proc 48 38K 63K 78643K 799 0 subproc 23 1K 2K 78643K 153 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 106 0 in_multi 81 4K 4K 78643K 225 0 ether_multi 1 0K 0K 78643K 11 0 mrt 0 0K 0K 78643K 11 0 ISOFS mount 1 32K 32K 78643K 1 0 MSDOSFS mount 1 16K 16K 78643K 1 0 ttys 132 583K 583K 78643K 132 0 exec 0 0K 1K 78643K 453 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 155 185K 186K 78643K 4350 0 UVM aobj 130 7K 7K 78643K 136 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 255 0 NDP 19 0K 0K 78643K 80 0 temp 162 3031K 3671K 78643K 39262 0 kqueue 0 0K 0K 78643K 29 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 25 0 18 1 0 1 1 0 8 0 rtpcb 80 111 0 109 1 0 1 1 0 8 0 rtentry 112 164 0 124 2 0 2 2 0 8 0 unpcb 120 810 0 800 1 0 1 1 0 8 0 syncache 264 8 0 8 2 2 0 1 0 8 0 sackhl 24 4 0 4 2 2 0 1 0 8 0 tcpqe 32 275 0 275 2 2 0 1 0 8 0 tcpcb 544 1355 0 1350 17 14 3 12 0 8 2 ipq 40 6 0 6 3 3 0 1 0 8 0 ipqe 40 185 0 185 3 3 0 1 0 8 0 inpcb 280 3639 0 3629 15 10 5 9 0 8 3 rttmr 72 3 0 3 3 2 1 1 0 8 1 nd6 48 26 0 24 2 1 1 1 0 8 0 pkpcb 40 13 0 13 4 3 1 1 0 8 1 swfcl 56 2 0 0 1 0 1 1 0 8 0 ppxss 1128 23 0 23 5 4 1 1 0 8 1 art_heap8 4096 4 0 0 4 0 4 4 0 8 0 art_heap4 256 911 0 715 23 10 13 17 0 8 0 art_table 32 915 0 715 3 0 3 3 0 8 0 art_node 16 163 0 126 1 0 1 1 0 8 0 sysvmsgpl 40 12 0 6 1 0 1 1 0 8 0 semupl 112 3 0 3 1 1 0 1 0 8 0 semapl 112 1114 0 1104 1 0 1 1 0 8 0 shmpl 112 134 0 6 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 3630 0 2230 46 0 46 46 0 8 0 ffsino 240 3631 0 2230 83 0 83 83 0 8 0 nchpl 144 6458 0 4854 60 0 60 60 0 8 0 uvmvnodes 72 4518 0 0 83 0 83 83 0 8 0 vnodes 208 4518 0 0 238 0 238 238 0 8 0 namei 1024 24450 0 24449 1 0 1 1 0 8 0 vcpupl 1984 24 0 0 3 0 3 3 0 8 0 vmpool 528 30 0 6 2 0 2 2 0 8 0 scsiplug 64 3 0 3 2 2 0 1 0 8 0 scxspl 192 18430 0 18430 1 0 1 1 0 8 1 plimitpl 152 128 0 121 1 0 1 1 0 8 0 sigapl 432 1537 0 1524 2 0 2 2 0 8 0 futexpl 56 64798 0 64798 1 0 1 1 0 8 1 knotepl 112 440 0 421 3 2 1 2 0 8 0 kqueuepl 104 604 0 602 4 3 1 4 0 8 0 pipepl 128 2912 0 2894 4 2 2 2 0 8 1 fdescpl 424 1538 0 1524 2 0 2 2 0 8 0 filepl 120 18070 0 17984 14 9 5 11 0 8 1 lockfpl 104 378 0 377 1 0 1 1 0 8 0 lockfspl 48 122 0 121 1 0 1 1 0 8 0 sessionpl 112 25 0 15 1 0 1 1 0 8 0 pgrppl 48 49 0 39 1 0 1 1 0 8 0 ucredpl 96 3183 0 3175 1 0 1 1 0 8 0 zombiepl 144 1525 0 1524 1 0 1 1 0 8 0 processpl 872 1553 0 1524 4 0 4 4 0 8 0 procpl 632 3242 0 3205 4 0 4 4 0 8 0 sosppl 128 17 0 17 4 3 1 1 0 8 1 sockpl 384 4874 0 4854 21 13 8 14 0 8 5 mcl64k 65536 388 0 388 33 32 1 33 0 8 1 mcl16k 16384 56 0 56 7 6 1 1 0 8 1 mcl12k 12288 84 0 84 4 3 1 1 0 8 1 mcl9k 9216 38 0 38 5 4 1 1 0 8 1 mcl8k 8192 52 0 52 3 2 1 1 0 8 1 mcl4k 4096 164 0 164 1 0 1 1 0 8 1 mcl2k2 2112 14 0 14 4 3 1 1 0 8 1 mcl2k 2048 72490 0 72443 18 10 8 16 0 8 1 mtagpl 80 83 0 65 2 1 1 1 0 8 0 mbufpl 256 127651 0 127539 46 34 12 27 0 8 0 bufpl 280 10112 0 3928 443 0 443 443 0 8 0 anonpl 16 206570 0 185742 121 36 85 100 0 107 1 amapchunkpl 152 8201 0 8041 19 11 8 12 0 158 0 amappl16 192 9303 0 8140 98 38 60 70 0 8 1 amappl15 184 73 0 69 1 0 1 1 0 8 0 amappl14 176 163 0 160 1 0 1 1 0 8 0 amappl13 168 8 0 8 1 1 0 1 0 8 0 amappl12 160 243 0 240 3 2 1 1 0 8 0 amappl11 152 349 0 337 1 0 1 1 0 8 0 amappl10 144 639 0 633 1 0 1 1 0 8 0 amappl9 136 710 0 706 1 0 1 1 0 8 0 amappl8 128 270 0 226 2 0 2 2 0 8 0 amappl7 120 733 0 721 1 0 1 1 0 8 0 amappl6 112 313 0 304 1 0 1 1 0 8 0 amappl5 104 477 0 465 1 0 1 1 0 8 0 amappl4 96 1821 0 1792 1 0 1 1 0 8 0 amappl3 88 315 0 306 1 0 1 1 0 8 0 amappl2 80 11076 0 11002 3 1 2 3 0 8 0 amappl1 72 37289 0 36870 27 18 9 20 0 8 0 amappl 80 3598 0 3545 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 135 0 6 3 0 3 3 0 8 0 uaddrrnd 24 1568 0 1530 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1568 0 1530 1 0 1 1 0 8 0 vmmpekpl 168 17127 0 17094 2 0 2 2 0 8 0 vmmpepl 168 194059 0 191675 187 49 138 151 0 357 27 vmsppl 272 1567 0 1530 4 1 3 3 0 8 0 pdppl 4096 3142 0 3084 10 2 8 8 0 8 0 pvpl 32 504453 0 481587 246 55 191 220 0 265 4 pmappl 200 1567 0 1530 3 0 3 3 0 8 1 extentpl 40 46 0 29 1 0 1 1 0 8 0 phpool 112 255 0 113 6 0 6 6 0 8 0