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(ffffffff821cd2fb) at panic+0x15c sys/kern/subr_prf.c:207 pool_do_put(ffffffff825b3618,fffffd806b760000) at pool_do_put+0x36a pool_put(ffffffff825b3618,fffffd806b760000) at pool_put+0x4b sys/kern/subr_pool.c:794 m_free(fffffd806b760000) at m_free+0x119 sys/kern/uipc_mbuf.c:459 ml_purge(ffff80001e43a1b8) at ml_purge+0x50 m_freem sys/kern/uipc_mbuf.c:538 [inline] ml_purge(ffff80001e43a1b8) at ml_purge+0x50 sys/kern/uipc_mbuf.c:1628 ifq_purge(ffff8000009fda78) at ifq_purge+0x97 sys/net/ifq.c:462 tun_dev_close(5d00,7) at tun_dev_close+0xc8 sys/net/if_tun.c:460 spec_close(ffff80001e43a2e0) at spec_close+0x311 sys/kern/spec_vnops.c:555 VOP_CLOSE(fffffd805da829c0,7,fffffd806c3beae0,ffff80001d339008) at VOP_CLOSE+0xc0 sys/kern/vfs_vops.c:174 vn_closefile(fffffd8056468cb8,ffff80001d339008) at vn_closefile+0xd2 vn_close sys/kern/vfs_vnops.c:298 [inline] vn_closefile(fffffd8056468cb8,ffff80001d339008) at vn_closefile+0xd2 sys/kern/vfs_vnops.c:610 fdrop(fffffd8056468cb8,ffff80001d339008) at fdrop+0xc2 sys/kern/kern_descrip.c:1264 closef(fffffd8056468cb8,ffff80001d339008) at closef+0x117 sys/kern/kern_descrip.c:1248 fdfree(ffff80001d339008) at fdfree+0x100 sys/kern/kern_descrip.c:1180 end trace frame: 0xffff80001e43a530, 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(ffffffff821cd2fb) at panic+0x15c sys/kern/subr_prf.c:207 pool_do_put(ffffffff825b3618,fffffd806b760000) at pool_do_put+0x36a pool_put(ffffffff825b3618,fffffd806b760000) at pool_put+0x4b sys/kern/subr_pool.c:794 m_free(fffffd806b760000) at m_free+0x119 sys/kern/uipc_mbuf.c:459 ml_purge(ffff80001e43a1b8) at ml_purge+0x50 m_freem sys/kern/uipc_mbuf.c:538 [inline] ml_purge(ffff80001e43a1b8) at ml_purge+0x50 sys/kern/uipc_mbuf.c:1628 ifq_purge(ffff8000009fda78) at ifq_purge+0x97 sys/net/ifq.c:462 tun_dev_close(5d00,7) at tun_dev_close+0xc8 sys/net/if_tun.c:460 spec_close(ffff80001e43a2e0) at spec_close+0x311 sys/kern/spec_vnops.c:555 VOP_CLOSE(fffffd805da829c0,7,fffffd806c3beae0,ffff80001d339008) at VOP_CLOSE+0xc0 sys/kern/vfs_vops.c:174 vn_closefile(fffffd8056468cb8,ffff80001d339008) at vn_closefile+0xd2 vn_close sys/kern/vfs_vnops.c:298 [inline] vn_closefile(fffffd8056468cb8,ffff80001d339008) at vn_closefile+0xd2 sys/kern/vfs_vnops.c:610 fdrop(fffffd8056468cb8,ffff80001d339008) at fdrop+0xc2 sys/kern/kern_descrip.c:1264 closef(fffffd8056468cb8,ffff80001d339008) at closef+0x117 sys/kern/kern_descrip.c:1248 fdfree(ffff80001d339008) at fdfree+0x100 sys/kern/kern_descrip.c:1180 exit1(ffff80001d339008,0,19,1) at exit1+0x334 sys/kern/kern_exit.c:196 postsig(ffff80001d339008,19) at postsig+0x4a8 sigexit sys/kern/kern_sig.c:1478 [inline] postsig(ffff80001d339008,19) at postsig+0x4a8 sys/kern/kern_sig.c:1410 userret(ffff80001d339008) at userret+0x159 sys/kern/kern_sig.c:1862 Xsyscall() at Xsyscall+0x156 end of kernel end trace frame: 0x7f7ffffbd720, count: -18 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80001e439f60 rbx 0xffff80001e43a010 rdx 0x2 rcx 0 rax 0 r8 0xffff80001e439f20 r9 0x1 r10 0 r11 0x1203c29d54e341dc r12 0x3000000008 r13 0xffff80001e439f70 r14 0x100 r15 0x1 rip 0xffffffff819bd578 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80001e439f50 ss 0 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.0) pid=134244 stat=onproc flags process=a proc=2000 pri=17, usrpri=78, nice=20 forw=0xffffffffffffffff, list=0xffff80001d339ea8,0xffff80001d3a79e0 process=0xffff80001d38f180 user=0xffff80001e435000, vmspace=0xfffffd806bc09990 estcpu=36, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 26719 305819 51806 0 2 0 syz-executor.1 26719 464119 51806 0 3 0x4000080 fsleep syz-executor.1 59725 35777 0 0 3 0x14200 acct acct 51806 211074 73430 0 3 0x82 nanosleep syz-executor.1 81169 338313 0 0 3 0x14200 bored sosplice 73430 338843 17898 0 3 0x82 thrsleep syz-fuzzer 73430 186894 17898 0 3 0x4000082 nanosleep syz-fuzzer 73430 457184 17898 0 3 0x4000082 thrsleep syz-fuzzer 73430 78946 17898 0 3 0x4000082 thrsleep syz-fuzzer 73430 59558 17898 0 3 0x4000082 thrsleep syz-fuzzer 73430 86469 17898 0 3 0x4000082 thrsleep syz-fuzzer 73430 244319 17898 0 3 0x4000082 thrsleep syz-fuzzer 73430 368528 17898 0 2 0x4000082 syz-fuzzer 17898 335145 77677 0 3 0x10008a pause ksh 77677 391908 72850 0 3 0x92 select sshd 43987 22193 1 0 3 0x100083 ttyin getty 72850 84871 1 0 3 0x80 select sshd 56530 288310 85822 73 3 0x100090 kqread syslogd 85822 455866 1 0 3 0x100082 netio syslogd 37149 279692 1 77 3 0x100090 poll dhclient 58017 102909 1 0 3 0x80 poll dhclient 84205 207629 0 0 2 0x14200 zerothread 78455 134910 0 0 3 0x14200 aiodoned aiodoned 7899 308693 0 0 3 0x14200 syncer update 82804 492380 0 0 3 0x14200 cleaner cleaner 82071 417179 0 0 3 0x14200 reaper reaper 90305 76589 0 0 3 0x14200 pgdaemon pagedaemon 51135 401098 0 0 3 0x14200 bored crynlk 21814 522831 0 0 3 0x14200 bored crypto 95372 236345 0 0 3 0x40014200 acpi0 acpi0 85576 211383 0 0 3 0x14200 bored softnet 77715 417559 0 0 3 0x14200 bored systqmp 35116 26935 0 0 3 0x14200 bored systq 99609 435110 0 0 3 0x40014200 bored softclock 22739 20982 0 0 3 0x40014200 idle0 55794 206426 0 0 3 0x14200 bored smr 1 311698 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 9557 6693K 7399K 78643K 11819 0 pcb 13 10K 12K 78643K 138 0 rtable 119 4K 4K 78643K 505 0 ifaddr 96 18K 18K 78643K 217 0 counters 21 16K 16K 78643K 40 0 ioctlops 0 0K 2K 78643K 46 0 iov 0 0K 16K 78643K 154 0 mount 1 1K 1K 78643K 1 0 vnodes 1222 77K 77K 78643K 1707 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 5K 78643K 18 0 VM map 2 0K 0K 78643K 2 0 sem 12 0K 0K 78643K 172 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1794 195K 288K 78643K 12646 0 file desc 5 13K 25K 78643K 652 0 sigio 0 0K 0K 78643K 15 0 proc 49 38K 55K 78643K 478 0 subproc 23 1K 2K 78643K 55 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 96 0 in_multi 92 4K 4K 78643K 188 0 ether_multi 1 0K 0K 78643K 22 0 mrt 0 0K 0K 78643K 3 0 ISOFS mount 1 32K 32K 78643K 1 0 MSDOSFS mount 1 16K 16K 78643K 1 0 ttys 61 281K 281K 78643K 61 0 exec 0 0K 1K 78643K 261 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 121 87K 91K 78643K 2443 0 UVM aobj 37 4K 5K 78643K 56 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 116 0 NDP 15 0K 0K 78643K 45 0 temp 141 3026K 3091K 78643K 17007 0 kqueue 3 4K 20K 78643K 85 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 15 0 7 1 0 1 1 0 8 0 rtpcb 80 67 0 65 1 0 1 1 0 8 0 rtentry 112 101 0 53 2 0 2 2 0 8 0 unpcb 120 410 0 401 2 1 1 2 0 8 0 syncache 264 22 0 22 2 1 1 1 0 8 1 tcpqe 32 104 0 104 3 3 0 1 0 8 0 tcpcb 544 798 0 791 15 14 1 13 0 8 0 ipq 40 3 0 3 1 1 0 1 0 8 0 ipqe 40 49 0 49 1 1 0 1 0 8 0 inpcb 280 1588 0 1574 9 7 2 9 0 8 1 ip6q 72 1 0 1 1 1 0 1 0 8 0 ip6af 40 2 0 2 1 1 0 1 0 8 0 nd6 48 17 0 11 1 0 1 1 0 8 0 pkpcb 40 8 0 8 2 2 0 1 0 8 0 ppxss 1128 3 0 3 2 1 1 1 0 8 1 art_heap8 4096 2 0 0 2 0 2 2 0 8 0 art_heap4 256 441 0 221 16 1 15 15 0 8 0 art_table 32 443 0 221 2 0 2 2 0 8 0 art_node 16 100 0 57 1 0 1 1 0 8 0 sysvmsgpl 40 24 0 17 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 170 0 160 1 0 1 1 0 8 0 shmpl 112 54 0 19 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 2393 0 1002 46 0 46 46 0 8 0 ffsino 240 2393 0 1002 83 0 83 83 0 8 0 nchpl 144 3579 0 1982 60 0 60 60 0 8 0 uvmvnodes 72 2750 0 0 50 0 50 50 0 8 0 vnodes 208 2750 0 0 145 0 145 145 0 8 0 namei 1024 10608 0 10608 1 0 1 1 0 8 1 vcpupl 1984 10 0 0 2 0 2 2 0 8 0 vmpool 528 12 0 2 1 0 1 1 0 8 0 scxspl 192 12228 0 12228 1 0 1 1 0 8 1 plimitpl 152 65 0 57 1 0 1 1 0 8 0 sigapl 432 820 0 807 2 0 2 2 0 8 0 futexpl 56 18107 0 18106 1 0 1 1 0 8 0 knotepl 112 168 0 149 1 0 1 1 0 8 0 kqueuepl 144 426 0 424 5 4 1 5 0 8 0 pipelkpl 16 220 0 210 1 0 1 1 0 8 0 pipepl 120 440 0 422 2 1 1 2 0 8 0 fdescpl 432 821 0 807 2 0 2 2 0 8 0 filepl 120 6684 0 6596 12 8 4 11 0 8 0 lockfpl 104 215 0 214 1 0 1 1 0 8 0 lockfspl 48 68 0 67 1 0 1 1 0 8 0 sessionpl 112 18 0 8 1 0 1 1 0 8 0 pgrppl 48 26 0 16 1 0 1 1 0 8 0 ucredpl 96 1011 0 1004 1 0 1 1 0 8 0 zombiepl 144 808 0 807 1 0 1 1 0 8 0 processpl 896 837 0 807 4 0 4 4 0 8 0 procpl 624 1635 0 1597 4 0 4 4 0 8 0 sosppl 128 13 0 13 4 4 0 1 0 8 0 sockpl 400 2105 0 2084 14 10 4 14 0 8 1 mcl64k 65536 105 0 105 2 1 1 2 0 8 1 mcl16k 16384 8 0 8 2 2 0 1 0 8 0 mcl12k 12288 11 0 11 2 1 1 1 0 8 1 mcl9k 9216 18 0 18 1 0 1 1 0 8 1 mcl8k 8192 28 0 28 1 0 1 1 0 8 1 mcl4k 4096 86 0 85 2 1 1 1 0 8 0 mcl2k2 2112 5 0 5 1 1 0 1 0 8 0 mcl2k 2048 65615 0 65568 16 9 7 13 0 8 0 mtagpl 80 63 0 31 2 1 1 1 0 8 0 mbufpl 256 108905 0 108735 26 12 14 24 0 8 0 bufpl 280 6133 0 749 385 0 385 385 0 8 0 anonpl 16 97566 0 80505 99 13 86 86 0 107 16 amapchunkpl 152 5328 0 5171 29 11 18 20 0 158 11 amappl16 192 4521 0 3578 71 11 60 60 0 8 12 amappl15 184 1 0 0 1 0 1 1 0 8 0 amappl14 176 14 0 11 2 1 1 1 0 8 0 amappl13 168 540 0 538 1 0 1 1 0 8 0 amappl12 160 6 0 6 1 1 0 1 0 8 0 amappl11 152 64 0 52 1 0 1 1 0 8 0 amappl10 144 13 0 9 1 0 1 1 0 8 0 amappl9 136 480 0 474 1 0 1 1 0 8 0 amappl8 128 390 0 366 1 0 1 1 0 8 0 amappl7 120 112 0 101 1 0 1 1 0 8 0 amappl6 112 21 0 18 1 0 1 1 0 8 0 amappl5 104 154 0 143 1 0 1 1 0 8 0 amappl4 96 1354 0 1323 1 0 1 1 0 8 0 amappl3 88 125 0 118 1 0 1 1 0 8 0 amappl2 80 5954 0 5887 3 1 2 3 0 8 0 amappl1 72 23944 0 23539 27 18 9 20 0 8 0 amappl 80 1923 0 1873 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 55 0 19 1 0 1 1 0 8 0 uaddrrnd 24 833 0 809 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 833 0 809 1 0 1 1 0 8 0 vmmpekpl 168 8965 0 8930 2 0 2 2 0 8 0 vmmpepl 168 105889 0 103857 151 31 120 124 0 357 29 vmsppl 272 832 0 809 3 1 2 2 0 8 0 pdppl 4096 1672 0 1628 7 1 6 6 0 8 0 pvpl 32 287293 0 267495 215 17 198 198 0 265 37 pmappl 200 832 0 809 2 0 2 2 0 8 0 extentpl 40 46 0 29 1 0 1 1 0 8 0 phpool 112 199 0 54 5 0 5 5 0 8 0