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(ffffffff821e2474) at panic+0x15c sys/kern/subr_prf.c:207 pool_do_put(ffffffff8259f4b8,fffffd8054000000) at pool_do_put+0x36a pool_put(ffffffff8259f4b8,fffffd8054000000) at pool_put+0x4b sys/kern/subr_pool.c:794 m_free(fffffd8054000000) at m_free+0x119 sys/kern/uipc_mbuf.c:459 ml_purge(ffff80001e432018) at ml_purge+0x50 m_freem sys/kern/uipc_mbuf.c:538 [inline] ml_purge(ffff80001e432018) at ml_purge+0x50 sys/kern/uipc_mbuf.c:1628 ifq_purge(ffff800000a02a78) 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(ffff80001e432140) at spec_close+0x311 sys/kern/spec_vnops.c:555 VOP_CLOSE(fffffd806a1668f0,7,fffffd806c3bf840,ffff80001d739278) at VOP_CLOSE+0xc0 sys/kern/vfs_vops.c:174 vn_closefile(fffffd80580cea60,ffff80001d739278) at vn_closefile+0xd2 vn_close sys/kern/vfs_vnops.c:298 [inline] vn_closefile(fffffd80580cea60,ffff80001d739278) at vn_closefile+0xd2 sys/kern/vfs_vnops.c:614 fdrop(fffffd80580cea60,ffff80001d739278) at fdrop+0xc2 sys/kern/kern_descrip.c:1276 closef(fffffd80580cea60,ffff80001d739278) at closef+0x117 sys/kern/kern_descrip.c:1260 fdfree(ffff80001d739278) at fdfree+0x100 sys/kern/kern_descrip.c:1192 end trace frame: 0xffff80001e432390, 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(ffffffff821e2474) at panic+0x15c sys/kern/subr_prf.c:207 pool_do_put(ffffffff8259f4b8,fffffd8054000000) at pool_do_put+0x36a pool_put(ffffffff8259f4b8,fffffd8054000000) at pool_put+0x4b sys/kern/subr_pool.c:794 m_free(fffffd8054000000) at m_free+0x119 sys/kern/uipc_mbuf.c:459 ml_purge(ffff80001e432018) at ml_purge+0x50 m_freem sys/kern/uipc_mbuf.c:538 [inline] ml_purge(ffff80001e432018) at ml_purge+0x50 sys/kern/uipc_mbuf.c:1628 ifq_purge(ffff800000a02a78) 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(ffff80001e432140) at spec_close+0x311 sys/kern/spec_vnops.c:555 VOP_CLOSE(fffffd806a1668f0,7,fffffd806c3bf840,ffff80001d739278) at VOP_CLOSE+0xc0 sys/kern/vfs_vops.c:174 vn_closefile(fffffd80580cea60,ffff80001d739278) at vn_closefile+0xd2 vn_close sys/kern/vfs_vnops.c:298 [inline] vn_closefile(fffffd80580cea60,ffff80001d739278) at vn_closefile+0xd2 sys/kern/vfs_vnops.c:614 fdrop(fffffd80580cea60,ffff80001d739278) at fdrop+0xc2 sys/kern/kern_descrip.c:1276 closef(fffffd80580cea60,ffff80001d739278) at closef+0x117 sys/kern/kern_descrip.c:1260 fdfree(ffff80001d739278) at fdfree+0x100 sys/kern/kern_descrip.c:1192 exit1(ffff80001d739278,0,19,1) at exit1+0x32c sys/kern/kern_exit.c:197 postsig(ffff80001d739278,19) at postsig+0x4b2 sigexit sys/kern/kern_sig.c:1483 [inline] postsig(ffff80001d739278,19) at postsig+0x4b2 sys/kern/kern_sig.c:1415 userret(ffff80001d739278) at userret+0x159 sys/kern/kern_sig.c:1867 syscall(ffff80001e4325c0) at syscall+0x42e mi_syscall_return sys/sys/syscall_mi.h:129 [inline] syscall(ffff80001e4325c0) at syscall+0x42e sys/arch/amd64/amd64/trap.c:592 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffd89b0, count: -19 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80001e431dc0 rbx 0xffff80001e431e70 rdx 0x2 rcx 0 rax 0x1 r8 0xffffffff813da9ef kprintf+0x15f r9 0x1 r10 0x2 r11 0xbfc61e59b618a538 r12 0x3000000008 r13 0xffff80001e431dd0 r14 0x100 r15 0x1 rip 0xffffffff81dde048 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80001e431db0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.1) pid=42549 stat=onproc flags process=a proc=2000 pri=17, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff80001d73a388,0xffff80001d739018 process=0xffff8000ffffae70 user=0xffff80001e42d000, vmspace=0xfffffd806bc09330 estcpu=36, cpticks=5, pctcpu=0.0 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 37303 46802 14264 0 3 0x82 nanosleep syz-executor.0 48856 394033 0 0 3 0x14200 bored sosplice 14264 477770 61206 0 3 0x82 thrsleep syz-fuzzer 14264 99635 61206 0 3 0x4000082 nanosleep syz-fuzzer 14264 347865 61206 0 3 0x4000082 thrsleep syz-fuzzer 14264 28991 61206 0 3 0x4000082 thrsleep syz-fuzzer 14264 297783 61206 0 2 0x4000082 syz-fuzzer 14264 342106 61206 0 3 0x4000082 thrsleep syz-fuzzer 14264 481600 61206 0 3 0x4000082 thrsleep syz-fuzzer 14264 317252 61206 0 3 0x4000082 thrsleep syz-fuzzer 14264 310212 61206 0 3 0x4000082 thrsleep syz-fuzzer 61206 495931 34696 0 3 0x10008a pause ksh 34696 280716 64890 0 3 0x92 select sshd 58318 462492 1 0 3 0x100083 ttyin getty 64890 119417 1 0 3 0x80 select sshd 65402 123387 94831 73 3 0x100090 kqread syslogd 94831 277769 1 0 3 0x100082 netio syslogd 82800 325673 1 77 3 0x100090 poll dhclient 99617 414152 1 0 3 0x80 poll dhclient 42443 197852 0 0 3 0x14200 bored smr 23322 356214 0 0 2 0x14200 zerothread 88277 327132 0 0 3 0x14200 aiodoned aiodoned 20356 281924 0 0 3 0x14200 syncer update 94071 71697 0 0 3 0x14200 cleaner cleaner 69934 17208 0 0 3 0x14200 reaper reaper 82428 138375 0 0 3 0x14200 pgdaemon pagedaemon 16882 91743 0 0 3 0x14200 bored crynlk 55242 332496 0 0 3 0x14200 bored crypto 1759 271706 0 0 3 0x40014200 acpi0 acpi0 17594 382257 0 0 3 0x14200 bored softnet 282 104453 0 0 3 0x14200 bored systqmp 56759 142584 0 0 3 0x14200 bored systq 11733 334856 0 0 3 0x40014200 bored softclock 26248 263226 0 0 3 0x40014200 idle0 1 493955 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 9515 6357K 6995K 78643K 12112 0 pcb 13 8K 8K 78643K 198 0 rtable 106 11K 12K 78643K 628 0 ifaddr 91 18K 19K 78643K 265 0 counters 21 16K 17K 78643K 48 0 ioctlops 0 0K 2K 78643K 87 0 iov 0 0K 16K 78643K 175 0 mount 1 1K 1K 78643K 1 0 vnodes 1234 78K 78K 78643K 1827 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 5K 78643K 15 0 VM map 2 0K 0K 78643K 2 0 sem 12 0K 1K 78643K 126 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1809 195K 288K 78643K 12938 0 file desc 5 13K 25K 78643K 929 0 sigio 0 0K 0K 78643K 12 0 proc 52 38K 55K 78643K 537 0 subproc 23 1K 3K 78643K 102 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 108 0 in_multi 96 4K 4K 78643K 284 0 ether_multi 1 0K 0K 78643K 38 0 mrt 0 0K 0K 78643K 10 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 283 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 148 121K 130K 78643K 3048 0 UVM aobj 41 4K 4K 78643K 55 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 160 0 NDP 14 0K 0K 78643K 61 0 temp 121 3043K 3107K 78643K 18740 0 kqueue 3 4K 12K 78643K 71 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 3 1 0 1 1 0 8 0 rtpcb 80 91 0 89 1 0 1 1 0 8 0 rtentry 112 124 0 84 2 0 2 2 0 8 0 unpcb 120 603 0 595 1 0 1 1 0 8 0 syncache 264 25 0 25 11 11 0 1 0 8 0 tcpqe 32 390 0 390 2 2 0 1 0 8 0 tcpcb 544 679 0 675 1 0 1 1 0 8 0 ipq 40 5 0 5 2 2 0 1 0 8 0 ipqe 40 98 0 98 2 2 0 1 0 8 0 inpcb 280 1399 0 1392 9 8 1 2 0 8 0 rttmr 72 1 0 1 1 1 0 1 0 8 0 nd6 48 26 0 24 1 0 1 1 0 8 0 pkpcb 40 4 0 4 2 2 0 1 0 8 0 ppxss 1128 2 0 2 1 1 0 1 0 8 0 art_heap8 4096 2 0 0 2 0 2 2 0 8 0 art_heap4 256 643 0 470 17 3 14 15 0 8 1 art_table 32 645 0 470 2 0 2 2 0 8 0 art_node 16 123 0 85 1 0 1 1 0 8 0 sysvmsgpl 40 12 0 5 1 0 1 1 0 8 0 semupl 112 4 0 4 1 1 0 1 0 8 0 semapl 112 124 0 114 1 0 1 1 0 8 0 shmpl 112 53 0 14 2 0 2 2 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 2777 0 1383 88 0 88 88 0 8 0 ffsino 240 2777 0 1383 83 0 83 83 0 8 0 nchpl 144 4257 0 2677 60 0 60 60 0 8 0 uvmvnodes 72 3221 0 0 59 0 59 59 0 8 0 vnodes 208 3221 0 0 170 0 170 170 0 8 0 namei 1024 14319 0 14319 1 0 1 1 0 8 1 vcpupl 1984 12 0 0 2 0 2 2 0 8 0 vmpool 528 23 0 11 1 0 1 1 0 8 0 scxspl 192 12664 0 12664 1 0 1 1 0 8 1 plimitpl 152 92 0 85 1 0 1 1 0 8 0 sigapl 424 1104 0 1075 4 0 4 4 0 8 0 futexpl 56 20861 0 20861 2 1 1 1 0 8 1 knotepl 112 200 0 181 1 0 1 1 0 8 0 kqueuepl 144 188 0 185 1 0 1 1 0 8 0 pipelkpl 16 224 0 214 1 0 1 1 0 8 0 pipepl 120 448 0 430 2 1 1 2 0 8 0 fdescpl 432 1089 0 1075 2 0 2 2 0 8 0 filepl 120 8614 0 8526 6 2 4 5 0 8 0 lockfpl 104 273 0 272 1 0 1 1 0 8 0 lockfspl 48 94 0 93 1 0 1 1 0 8 0 sessionpl 112 21 0 11 1 0 1 1 0 8 0 pgrppl 48 35 0 25 1 0 1 1 0 8 0 ucredpl 96 2227 0 2218 1 0 1 1 0 8 0 zombiepl 144 1077 0 1075 2 1 1 1 0 8 0 processpl 920 1104 0 1075 4 0 4 4 0 8 0 procpl 624 2208 0 2171 4 0 4 4 0 8 0 sosppl 128 22 0 22 9 8 1 1 0 8 1 sockpl 400 2100 0 2083 15 12 3 4 0 8 1 mcl64k 65536 79 0 79 13 13 0 1 0 8 0 mcl16k 16384 8 0 8 4 4 0 1 0 8 0 mcl12k 12288 14 0 14 8 7 1 1 0 8 1 mcl9k 9216 15 0 15 9 9 0 1 0 8 0 mcl8k 8192 27 0 27 13 12 1 1 0 8 1 mcl4k 4096 74 0 74 15 14 1 1 0 8 1 mcl2k2 2112 7 0 7 3 3 0 1 0 8 0 mcl2k 2048 66457 0 66400 25 16 9 19 0 8 0 mtagpl 80 93 0 77 3 1 2 2 0 8 0 mbufpl 256 156842 0 156683 68 39 29 37 0 8 2 bufpl 280 5865 0 504 384 0 384 384 0 8 0 anonpl 16 116429 0 102481 109 41 68 73 0 107 9 amapchunkpl 152 5985 0 5841 58 52 6 20 0 158 0 amappl16 192 5728 0 4936 77 34 43 52 0 8 3 amappl15 184 1 0 0 1 0 1 1 0 8 0 amappl14 176 192 0 183 1 0 1 1 0 8 0 amappl13 168 34 0 33 1 0 1 1 0 8 0 amappl12 160 16 0 11 1 0 1 1 0 8 0 amappl11 152 46 0 37 1 0 1 1 0 8 0 amappl10 144 461 0 454 1 0 1 1 0 8 0 amappl9 136 291 0 288 1 0 1 1 0 8 0 amappl8 128 670 0 620 2 0 2 2 0 8 0 amappl7 120 565 0 552 1 0 1 1 0 8 0 amappl6 112 29 0 18 1 0 1 1 0 8 0 amappl5 104 1715 0 1704 1 0 1 1 0 8 0 amappl4 96 441 0 415 1 0 1 1 0 8 0 amappl3 88 274 0 268 1 0 1 1 0 8 0 amappl2 80 7723 0 7653 2 0 2 2 0 8 0 amappl1 72 28041 0 27621 23 14 9 17 0 8 0 amappl 80 2484 0 2434 3 1 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 54 0 14 1 0 1 1 0 8 0 uaddrrnd 24 1112 0 1086 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1112 0 1086 1 0 1 1 0 8 0 vmmpekpl 168 10147 0 10116 2 0 2 2 0 8 0 vmmpepl 168 135636 0 133691 171 75 96 118 0 357 6 vmsppl 272 1111 0 1086 3 1 2 2 0 8 0 pdppl 4096 2230 0 2184 8 1 7 7 0 8 0 pvpl 32 321617 0 304932 253 86 167 173 0 265 26 pmappl 200 1111 0 1086 2 0 2 2 0 8 0 extentpl 40 53 0 36 1 0 1 1 0 8 0 phpool 112 365 0 117 8 0 8 8 0 8 0 ddb> machine ddbcpu 0 No such command ddb> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic(ffffffff821e2474) at panic+0x15c sys/kern/subr_prf.c:207 pool_do_put(ffffffff8259f4b8,fffffd8054000000) at pool_do_put+0x36a pool_put(ffffffff8259f4b8,fffffd8054000000) at pool_put+0x4b sys/kern/subr_pool.c:794 m_free(fffffd8054000000) at m_free+0x119 sys/kern/uipc_mbuf.c:459 ml_purge(ffff80001e432018) at ml_purge+0x50 m_freem sys/kern/uipc_mbuf.c:538 [inline] ml_purge(ffff80001e432018) at ml_purge+0x50 sys/kern/uipc_mbuf.c:1628 ifq_purge(ffff800000a02a78) 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(ffff80001e432140) at spec_close+0x311 sys/kern/spec_vnops.c:555 VOP_CLOSE(fffffd806a1668f0,7,fffffd806c3bf840,ffff80001d739278) at VOP_CLOSE+0xc0 sys/kern/vfs_vops.c:174 vn_closefile(fffffd80580cea60,ffff80001d739278) at vn_closefile+0xd2 vn_close sys/kern/vfs_vnops.c:298 [inline] vn_closefile(fffffd80580cea60,ffff80001d739278) at vn_closefile+0xd2 sys/kern/vfs_vnops.c:614 fdrop(fffffd80580cea60,ffff80001d739278) at fdrop+0xc2 sys/kern/kern_descrip.c:1276 closef(fffffd80580cea60,ffff80001d739278) at closef+0x117 sys/kern/kern_descrip.c:1260 fdfree(ffff80001d739278) at fdfree+0x100 sys/kern/kern_descrip.c:1192 exit1(ffff80001d739278,0,19,1) at exit1+0x32c sys/kern/kern_exit.c:197 postsig(ffff80001d739278,19) at postsig+0x4b2 sigexit sys/kern/kern_sig.c:1483 [inline] postsig(ffff80001d739278,19) at postsig+0x4b2 sys/kern/kern_sig.c:1415 userret(ffff80001d739278) at userret+0x159 sys/kern/kern_sig.c:1867 syscall(ffff80001e4325c0) at syscall+0x42e mi_syscall_return sys/sys/syscall_mi.h:129 [inline] syscall(ffff80001e4325c0) at syscall+0x42e sys/arch/amd64/amd64/trap.c:592 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffd89b0, count: -19 ddb> machine ddbcpu 1 No such command ddb> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic(ffffffff821e2474) at panic+0x15c sys/kern/subr_prf.c:207 pool_do_put(ffffffff8259f4b8,fffffd8054000000) at pool_do_put+0x36a pool_put(ffffffff8259f4b8,fffffd8054000000) at pool_put+0x4b sys/kern/subr_pool.c:794 m_free(fffffd8054000000) at m_free+0x119 sys/kern/uipc_mbuf.c:459 ml_purge(ffff80001e432018) at ml_purge+0x50 m_freem sys/kern/uipc_mbuf.c:538 [inline] ml_purge(ffff80001e432018) at ml_purge+0x50 sys/kern/uipc_mbuf.c:1628 ifq_purge(ffff800000a02a78) 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(ffff80001e432140) at spec_close+0x311 sys/kern/spec_vnops.c:555 VOP_CLOSE(fffffd806a1668f0,7,fffffd806c3bf840,ffff80001d739278) at VOP_CLOSE+0xc0 sys/kern/vfs_vops.c:174 vn_closefile(fffffd80580cea60,ffff80001d739278) at vn_closefile+0xd2 vn_close sys/kern/vfs_vnops.c:298 [inline] vn_closefile(fffffd80580cea60,ffff80001d739278) at vn_closefile+0xd2 sys/kern/vfs_vnops.c:614 fdrop(fffffd80580cea60,ffff80001d739278) at fdrop+0xc2 sys/kern/kern_descrip.c:1276 closef(fffffd80580cea60,ffff80001d739278) at closef+0x117 sys/kern/kern_descrip.c:1260 fdfree(ffff80001d739278) at fdfree+0x100 sys/kern/kern_descrip.c:1192 exit1(ffff80001d739278,0,19,1) at exit1+0x32c sys/kern/kern_exit.c:197 postsig(ffff80001d739278,19) at postsig+0x4b2 sigexit sys/kern/kern_sig.c:1483 [inline] postsig(ffff80001d739278,19) at postsig+0x4b2 sys/kern/kern_sig.c:1415 userret(ffff80001d739278) at userret+0x159 sys/kern/kern_sig.c:1867 syscall(ffff80001e4325c0) at syscall+0x42e mi_syscall_return sys/sys/syscall_mi.h:129 [inline] syscall(ffff80001e4325c0) at syscall+0x42e sys/arch/amd64/amd64/trap.c:592 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffd89b0, count: -19