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(ffffffff825af3e8,fffffd802e000000) at pool_do_put+0x36a pool_put(ffffffff825af3e8,fffffd802e000000) at pool_put+0x4b sys/kern/subr_pool.c:802 m_free(fffffd802e000000) at m_free+0x119 sys/kern/uipc_mbuf.c:459 ml_purge(ffff800014928878) at ml_purge+0x50 m_freem sys/kern/uipc_mbuf.c:538 [inline] ml_purge(ffff800014928878) at ml_purge+0x50 sys/kern/uipc_mbuf.c:1628 ifq_purge(ffff800000a65a78) at ifq_purge+0x97 sys/net/ifq.c:423 tapclose(5d01,7,2000,ffff8000ffff8008) at tapclose+0xed tun_dev_close sys/net/if_tun.c:454 [inline] tapclose(5d01,7,2000,ffff8000ffff8008) at tapclose+0xed sys/net/if_tun.c:433 spec_close(ffff800014928990) at spec_close+0x311 sys/kern/spec_vnops.c:555 VOP_CLOSE(fffffd80366fda90,7,fffffd803f7c6cc0,ffff8000ffff8008) at VOP_CLOSE+0xc0 sys/kern/vfs_vops.c:175 vn_closefile(fffffd802d6f7bc8,ffff8000ffff8008) at vn_closefile+0xd3 vn_close sys/kern/vfs_vnops.c:298 [inline] vn_closefile(fffffd802d6f7bc8,ffff8000ffff8008) at vn_closefile+0xd3 sys/kern/vfs_vnops.c:610 fdrop(fffffd802d6f7bc8,ffff8000ffff8008) at fdrop+0xc2 sys/kern/kern_descrip.c:1273 closef(fffffd802d6f7bc8,ffff8000ffff8008) at closef+0x118 sys/kern/kern_descrip.c:1257 fdfree(ffff8000ffff8008) at fdfree+0x100 sys/kern/kern_descrip.c:1189 end trace frame: 0xffff800014928be0, 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(ffffffff825af3e8,fffffd802e000000) at pool_do_put+0x36a pool_put(ffffffff825af3e8,fffffd802e000000) at pool_put+0x4b sys/kern/subr_pool.c:802 m_free(fffffd802e000000) at m_free+0x119 sys/kern/uipc_mbuf.c:459 ml_purge(ffff800014928878) at ml_purge+0x50 m_freem sys/kern/uipc_mbuf.c:538 [inline] ml_purge(ffff800014928878) at ml_purge+0x50 sys/kern/uipc_mbuf.c:1628 ifq_purge(ffff800000a65a78) at ifq_purge+0x97 sys/net/ifq.c:423 tapclose(5d01,7,2000,ffff8000ffff8008) at tapclose+0xed tun_dev_close sys/net/if_tun.c:454 [inline] tapclose(5d01,7,2000,ffff8000ffff8008) at tapclose+0xed sys/net/if_tun.c:433 spec_close(ffff800014928990) at spec_close+0x311 sys/kern/spec_vnops.c:555 VOP_CLOSE(fffffd80366fda90,7,fffffd803f7c6cc0,ffff8000ffff8008) at VOP_CLOSE+0xc0 sys/kern/vfs_vops.c:175 vn_closefile(fffffd802d6f7bc8,ffff8000ffff8008) at vn_closefile+0xd3 vn_close sys/kern/vfs_vnops.c:298 [inline] vn_closefile(fffffd802d6f7bc8,ffff8000ffff8008) at vn_closefile+0xd3 sys/kern/vfs_vnops.c:610 fdrop(fffffd802d6f7bc8,ffff8000ffff8008) at fdrop+0xc2 sys/kern/kern_descrip.c:1273 closef(fffffd802d6f7bc8,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 Xsyscall() at Xsyscall+0x156 end of kernel end trace frame: 0x7f7ffffbcbb0, count: -18 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff800014928620 rbx 0xffff8000149286d0 rdx 0x2 rcx 0 rax 0 r8 0xffff8000149285e0 r9 0x1 r10 0 r11 0x9e3d3b93afd14c00 r12 0x3000000008 r13 0xffff800014928630 r14 0x100 r15 0x1 rip 0xffffffff82084ff8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800014928610 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.1) pid=341181 stat=onproc flags process=a proc=2000 pri=17, usrpri=80, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff84f8,0xffff80001491c2a0 process=0xffff8000148a2d98 user=0xffff800014923000, vmspace=0xfffffd803f012770 estcpu=36, cpticks=0, pctcpu=0.1 user=0, sys=0, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 82730 406088 11961 0 2 0 syz-executor.0 82730 78192 11961 0 2 0x4000000 syz-executor.0 11961 515769 36765 0 3 0x82 nanosleep syz-executor.0 87167 107557 0 0 3 0x14200 bored sosplice 36765 80951 10368 0 3 0x82 thrsleep syz-fuzzer 36765 489998 10368 0 3 0x4000082 nanosleep syz-fuzzer 36765 134225 10368 0 3 0x4000082 thrsleep syz-fuzzer 36765 1264 10368 0 3 0x4000082 thrsleep syz-fuzzer 36765 124823 10368 0 3 0x4000082 thrsleep syz-fuzzer 36765 460778 10368 0 2 0x4000082 syz-fuzzer 36765 504202 10368 0 3 0x4000082 thrsleep syz-fuzzer 36765 393175 10368 0 3 0x4000082 thrsleep syz-fuzzer 10368 486894 83720 0 3 0x10008a pause ksh 83720 409430 81938 0 3 0x92 select sshd 71043 150461 1 0 3 0x100083 ttyin getty 81938 151110 1 0 3 0x80 select sshd 10531 496284 59381 73 3 0x100090 kqread syslogd 59381 214489 1 0 3 0x100082 netio syslogd 13264 123699 1 77 3 0x100090 poll dhclient 71720 65462 1 0 3 0x80 poll dhclient 74329 338262 0 0 2 0x14200 zerothread 97850 315496 0 0 3 0x14200 aiodoned aiodoned 74025 174207 0 0 3 0x14200 syncer update 65582 342415 0 0 3 0x14200 cleaner cleaner 25576 424034 0 0 3 0x14200 reaper reaper 68915 181802 0 0 3 0x14200 pgdaemon pagedaemon 45222 36369 0 0 3 0x14200 bored crynlk 31735 367112 0 0 3 0x14200 bored crypto 74586 436278 0 0 3 0x40014200 acpi0 acpi0 69668 161935 0 0 2 0x14200 softnet 35834 257990 0 0 3 0x14200 bored systqmp 77346 113216 0 0 3 0x14200 bored systq 60781 329400 0 0 3 0x40014200 bored softclock 92115 164387 0 0 3 0x40014200 idle0 58438 503918 0 0 3 0x14200 bored smr 1 217079 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 9539 6489K 6874K 78643K 11837 0 0 pcb 13 8K 8K 78643K 149 0 0 rtable 121 8K 8K 78643K 583 0 0 ifaddr 83 15K 15K 78643K 210 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 38 0 0 iov 0 0K 20K 78643K 129 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1212 76K 77K 78643K 1843 0 0 UFS quota 1 32K 32K 78643K 1 0 0 UFS mount 5 36K 36K 78643K 5 0 0 shm 2 1K 5K 78643K 18 0 0 VM map 6 1K 1K 78643K 10 0 0 sem 12 0K 0K 78643K 129 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1794 195K 288K 78643K 12646 0 0 file desc 5 13K 25K 78643K 597 0 0 sigio 0 0K 0K 78643K 10 0 0 proc 49 38K 63K 78643K 548 0 0 subproc 23 1K 2K 78643K 85 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 91 0 0 in_multi 42 2K 2K 78643K 110 0 0 ether_multi 1 0K 0K 78643K 5 0 0 mrt 0 0K 0K 78643K 7 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 120 530K 530K 78643K 120 0 0 exec 0 0K 1K 78643K 319 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 126 55K 64K 78643K 2502 0 0 UVM aobj 34 4K 4K 78643K 42 0 0 memdesc 1 4K 4K 78643K 1 0 0 crypto data 1 1K 1K 78643K 1 0 0 ip6_options 0 0K 0K 78643K 135 0 0 NDP 17 0K 0K 78643K 48 0 0 temp 146 3539K 3617K 78643K 41766 0 0 kqueue 0 0K 0K 78643K 4 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 22 0 13 1 0 1 1 0 8 0 rtpcb 80 71 0 69 1 0 1 1 0 8 0 rtentry 112 100 0 54 2 0 2 2 0 8 0 unpcb 120 750 0 742 2 1 1 2 0 8 0 syncache 264 6 0 6 2 2 0 1 0 8 0 sackhl 24 1 0 1 1 1 0 1 0 8 0 tcpqe 32 142 0 142 1 1 0 1 0 8 0 tcpcb 544 262 0 258 2 1 1 2 0 8 0 ipq 40 5 0 5 2 2 0 1 0 8 0 ipqe 40 54 0 54 2 2 0 1 0 8 0 inpcb 280 1210 0 1196 4 2 2 3 0 8 0 rttmr 72 2 0 2 1 1 0 1 0 8 0 nd6 48 11 0 8 1 0 1 1 0 8 0 ppxss 1128 14 0 14 5 4 1 1 0 8 1 art_heap8 4096 4 0 2 4 2 2 4 0 8 0 art_heap4 256 429 0 200 16 1 15 15 0 8 0 art_table 32 433 0 202 2 0 2 2 0 8 0 art_node 16 99 0 56 1 0 1 1 0 8 0 sysvmsgpl 40 63 0 29 1 0 1 1 0 8 0 semupl 112 3 0 3 1 1 0 1 0 8 0 semapl 112 125 0 115 1 0 1 1 0 8 0 shmpl 112 40 0 8 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 2420 0 1027 46 0 46 46 0 8 0 ffsino 240 2420 0 1027 83 0 83 83 0 8 0 nchpl 144 3484 0 1882 60 0 60 60 0 8 0 uvmvnodes 72 2808 0 0 52 0 52 52 0 8 0 vnodes 208 2808 0 0 148 0 148 148 0 8 0 namei 1024 11665 0 11665 1 0 1 1 0 8 1 vcpupl 1984 4 0 0 1 0 1 1 0 8 0 vmpool 520 8 0 4 1 0 1 1 0 8 0 scxspl 192 10233 0 10233 11 10 1 7 0 8 1 plimitpl 152 59 0 51 1 0 1 1 0 8 0 sigapl 432 758 0 745 2 0 2 2 0 8 0 futexpl 56 21961 0 21961 1 0 1 1 0 8 1 knotepl 112 412 0 393 2 1 1 2 0 8 0 kqueuepl 104 1184 0 1182 3 2 1 2 0 8 0 pipepl 128 880 0 862 6 4 2 2 0 8 1 fdescpl 424 759 0 745 2 0 2 2 0 8 0 filepl 120 8870 0 8782 13 6 7 7 0 8 4 lockfpl 104 458 0 457 1 0 1 1 0 8 0 lockfspl 48 204 0 203 1 0 1 1 0 8 0 sessionpl 112 20 0 10 1 0 1 1 0 8 0 pgrppl 48 28 0 18 1 0 1 1 0 8 0 ucredpl 96 2006 0 1999 1 0 1 1 0 8 0 zombiepl 144 746 0 744 1 0 1 1 0 8 0 processpl 864 774 0 744 4 0 4 4 0 8 0 procpl 632 1636 0 1598 5 1 4 5 0 8 0 sosppl 128 5 0 5 2 2 0 1 0 8 0 sockpl 384 2042 0 2023 10 6 4 6 0 8 1 mcl64k 65536 72 0 71 1 0 1 1 0 8 0 mcl16k 16384 22 0 22 2 1 1 1 0 8 1 mcl12k 12288 45 0 45 2 1 1 1 0 8 1 mcl9k 9216 7 0 7 3 2 1 1 0 8 1 mcl8k 8192 47 0 47 1 0 1 1 0 8 1 mcl4k 4096 74 0 74 2 1 1 1 0 8 1 mcl2k2 2112 6 0 6 3 3 0 1 0 8 0 mcl2k 2048 71356 0 71304 17 9 8 13 0 8 0 mtagpl 80 31 0 29 2 1 1 1 0 8 0 mbufpl 256 119288 0 119067 32 11 21 21 0 8 1 bufpl 256 8908 0 3697 326 0 326 326 0 8 0 anonpl 16 103846 0 87875 109 20 89 98 0 62 6 amapchunkpl 152 4364 0 4218 20 8 12 12 0 158 5 amappl16 192 4125 0 3002 80 19 61 68 0 8 4 amappl15 184 187 0 187 1 1 0 1 0 8 0 amappl14 176 341 0 332 1 0 1 1 0 8 0 amappl13 168 1 0 0 1 0 1 1 0 8 0 amappl12 160 62 0 61 2 1 1 1 0 8 0 amappl11 152 57 0 46 1 0 1 1 0 8 0 amappl10 144 16 0 14 1 0 1 1 0 8 0 amappl9 136 599 0 595 1 0 1 1 0 8 0 amappl8 128 204 0 169 2 0 2 2 0 8 0 amappl7 120 63 0 59 1 0 1 1 0 8 0 amappl6 112 59 0 49 1 0 1 1 0 8 0 amappl5 104 258 0 247 1 0 1 1 0 8 0 amappl4 96 994 0 968 1 0 1 1 0 8 0 amappl3 88 180 0 170 1 0 1 1 0 8 0 amappl2 80 5298 0 5230 3 1 2 3 0 8 0 amappl1 72 24009 0 23602 27 18 9 20 0 8 0 amappl 80 1914 0 1867 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 41 0 8 1 0 1 1 0 8 0 uaddrrnd 24 767 0 745 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 767 0 745 1 0 1 1 0 8 0 vmmpekpl 168 10595 0 10564 2 0 2 2 0 8 0 vmmpepl 168 100243 0 98047 198 57 141 141 0 357 39 vmsppl 272 758 0 745 2 1 1 2 0 8 0 pdppl 4096 1540 0 1502 7 1 6 6 0 8 0 pvpl 32 286462 0 267432 235 28 207 225 0 265 17 pmappl 200 766 0 749 1 0 1 1 0 8 0 extentpl 40 46 0 29 1 0 1 1 0 8 0 phpool 112 501 0 30 14 0 14 14 0 8 0