panic: kernel diagnostic assertion "pg->wire_count == 1" failed: file "/syzkaller/managers/main/kernel/sys/kern/vfs_biomem.c", line 329 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND * 97192 87794 0 0x2 0 0 syz-executor.0 db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic() at panic+0x15c sys/kern/subr_prf.c:207 __assert(ffffffff821e6502,ffffffff821f7c7d,149,ffffffff821c1003) at __assert+0x2b sys/kern/subr_prf.c:154 buf_free_pages(fffffd8026146500) at buf_free_pages+0x1ee sys/kern/vfs_biomem.c:318 buf_dealloc_mem(fffffd8026146500) at buf_dealloc_mem+0xe1 sys/kern/vfs_biomem.c:194 buf_put(fffffd8026146500) at buf_put+0x16b sys/kern/vfs_bio.c:131 brelse(fffffd8026146500) at brelse+0x257 sys/kern/vfs_bio.c:922 vinvalbuf(fffffd803b30b770,2,ffffffffffffffff,ffff800014914c70,0,ffffffffffffffff) at vinvalbuf+0x3b1 sys/kern/vfs_subr.c:1977 ffs_truncate(fffffd8039d82b40,0,0,ffffffffffffffff) at ffs_truncate+0xeb1 sys/ufs/ffs/ffs_inode.c:326 ufs_inactive(ffff800014922ce8) at ufs_inactive+0x159 sys/ufs/ufs/ufs_inode.c:85 VOP_INACTIVE(fffffd803b30b770,ffff800014914c70) at VOP_INACTIVE+0xaa sys/kern/vfs_vops.c:573 vput(fffffd803b30b770) at vput+0xae sys/kern/vfs_subr.c:768 ufs_remove(ffff800014922de8) at ufs_remove+0x137 sys/ufs/ufs/ufs_vnops.c:620 VOP_REMOVE(fffffd803b30b910,fffffd803b30b770,ffff800014922ee8) at VOP_REMOVE+0x11f sys/kern/vfs_vops.c:379 end trace frame: 0xffff800014922f80, 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 kernel diagnostic assertion "pg->wire_count == 1" failed: file "/syzkaller/managers/main/kernel/sys/kern/vfs_biomem.c", line 329 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 __assert(ffffffff821e6502,ffffffff821f7c7d,149,ffffffff821c1003) at __assert+0x2b sys/kern/subr_prf.c:154 buf_free_pages(fffffd8026146500) at buf_free_pages+0x1ee sys/kern/vfs_biomem.c:318 buf_dealloc_mem(fffffd8026146500) at buf_dealloc_mem+0xe1 sys/kern/vfs_biomem.c:194 buf_put(fffffd8026146500) at buf_put+0x16b sys/kern/vfs_bio.c:131 brelse(fffffd8026146500) at brelse+0x257 sys/kern/vfs_bio.c:922 vinvalbuf(fffffd803b30b770,2,ffffffffffffffff,ffff800014914c70,0,ffffffffffffffff) at vinvalbuf+0x3b1 sys/kern/vfs_subr.c:1977 ffs_truncate(fffffd8039d82b40,0,0,ffffffffffffffff) at ffs_truncate+0xeb1 sys/ufs/ffs/ffs_inode.c:326 ufs_inactive(ffff800014922ce8) at ufs_inactive+0x159 sys/ufs/ufs/ufs_inode.c:85 VOP_INACTIVE(fffffd803b30b770,ffff800014914c70) at VOP_INACTIVE+0xaa sys/kern/vfs_vops.c:573 vput(fffffd803b30b770) at vput+0xae sys/kern/vfs_subr.c:768 ufs_remove(ffff800014922de8) at ufs_remove+0x137 sys/ufs/ufs/ufs_vnops.c:620 VOP_REMOVE(fffffd803b30b910,fffffd803b30b770,ffff800014922ee8) at VOP_REMOVE+0x11f sys/kern/vfs_vops.c:379 dounlinkat(ffff800014914c70,ffffff9c,7f7ffffc3520,0) at dounlinkat+0x195 sys/kern/vfs_syscalls.c:1821 syscall(ffff800014923060) at syscall+0x507 sys/arch/amd64/amd64/trap.c:555 Xsyscall(6,a,7f7ffffc3520,a,af9359c8840,7f7ffffc39e0) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffc39d0, count: -17 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff8000149227d0 rbx 0xffff800014922880 rdx 0x2 rcx 0 rax 0 r8 0xffff800014922790 r9 0x1 r10 0 r11 0x4f1a7837a74fc41c r12 0x3000000008 r13 0xffff8000149227e0 r14 0x100 r15 0x1 rip 0xffffffff8186dab8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000149227c0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.0) pid=97192 stat=onproc flags process=2 proc=0 pri=17, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff800014914508,0xffff8000149153e8 process=0xffff8000ffff7b10 user=0xffff80001491e000, vmspace=0xfffffd803f013550 estcpu=4, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 1132 63245 1 0 3 0x100083 ttyin getty 96352 395750 0 0 3 0x14200 acct acct *87794 97192 1739 0 7 0x2 syz-executor.0 75298 319045 0 0 3 0x14200 bored sosplice 1739 412771 68816 0 3 0x82 thrsleep syz-fuzzer 1739 160618 68816 0 3 0x4000082 nanosleep syz-fuzzer 1739 346106 68816 0 3 0x4000082 thrsleep syz-fuzzer 1739 44668 68816 0 3 0x4000082 thrsleep syz-fuzzer 1739 100007 68816 0 3 0x4000082 thrsleep syz-fuzzer 1739 311084 68816 0 3 0x4000002 biowait syz-fuzzer 1739 289819 68816 0 3 0x4000082 thrsleep syz-fuzzer 1739 326517 68816 0 3 0x4000082 kqread syz-fuzzer 68816 384481 36584 0 3 0x10008a pause ksh 36584 145555 14676 0 3 0x92 select sshd 14676 33819 1 0 3 0x80 select sshd 69274 480233 5368 73 3 0x100010 ffs_fsync syslogd 5368 264503 1 0 3 0x100082 netio syslogd 16390 416843 1 77 3 0x100090 poll dhclient 86396 309268 1 0 3 0x80 poll dhclient 12845 30669 0 0 3 0x14200 pgzero zerothread 58606 437963 0 0 3 0x14200 aiodoned aiodoned 27607 480116 0 0 3 0x14200 syncer update 23179 196637 0 0 3 0x14200 cleaner cleaner 98305 256979 0 0 3 0x14200 reaper reaper 20739 289496 0 0 3 0x14200 pgdaemon pagedaemon 7788 390334 0 0 3 0x14200 bored crynlk 38060 517752 0 0 3 0x14200 bored crypto 44807 453995 0 0 3 0x40014200 acpi0 acpi0 60024 253167 0 0 3 0x14200 bored softnet 6473 141854 0 0 3 0x14200 bored systqmp 88970 427260 0 0 3 0x14200 bored systq 37713 193374 0 0 3 0x40014200 bored softclock 92159 219348 0 0 3 0x40014200 idle0 91035 404839 0 0 3 0x14200 bored smr 1 113855 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 9564 6361K 7127K 78643K 14907 0 0 pcb 13 9K 9K 78643K 1427 0 0 rtable 108 8K 9K 78643K 1334 0 0 ifaddr 83 17K 18K 78643K 399 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 137 0 0 iov 0 0K 20K 78643K 493 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1211 76K 77K 78643K 2900 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 31 0 0 VM map 28 7K 7K 78643K 42 0 0 sem 12 0K 0K 78643K 763 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12645 0 0 file desc 3 5K 25K 78643K 2466 0 0 sigio 0 0K 0K 78643K 32 0 0 proc 50 38K 63K 78643K 936 0 0 subproc 16 1K 2K 78643K 221 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 237 0 0 in_multi 21 1K 2K 78643K 250 0 0 ether_multi 1 0K 0K 78643K 18 0 0 mrt 0 0K 0K 78643K 9 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 72 318K 318K 78643K 72 0 0 exec 0 0K 1K 78643K 558 0 0 pfkey data 0 0K 4K 78643K 2 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 143 177K 202K 78643K 6792 0 0 UVM aobj 130 4K 4K 78643K 132 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 1982 0 0 NDP 20 0K 0K 78643K 128 0 0 temp 211 3543K 4191K 78643K 61590 0 0 kqueue 0 0K 0K 78643K 22 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 37 0 33 1 0 1 1 0 8 0 rtpcb 80 255 0 253 1 0 1 1 0 8 0 rtentry 112 238 0 200 2 0 2 2 0 8 0 unpcb 120 996 0 986 1 0 1 1 0 8 0 syncache 264 10 0 10 5 5 0 1 0 8 0 tcpqe 32 186 0 186 5 5 0 1 0 8 0 tcpcb 544 2056 0 2052 6 5 1 2 0 8 0 ipq 40 17 0 17 5 5 0 1 0 8 0 ipqe 40 555 0 555 5 5 0 1 0 8 0 inpcb 280 4568 0 4561 14 13 1 4 0 8 0 rttmr 72 2 0 1 1 0 1 1 0 8 0 nd6 48 35 0 34 1 0 1 1 0 8 0 pkpcb 40 2 0 2 1 1 0 1 0 8 0 swfcl 56 1 0 0 1 0 1 1 0 8 0 ppxss 1128 37 0 37 6 6 0 1 0 8 0 art_heap8 4096 4 0 2 4 2 2 4 0 8 0 art_heap4 256 1070 0 872 18 3 15 15 0 8 0 art_table 32 1074 0 874 2 0 2 2 0 8 0 art_node 16 236 0 202 1 0 1 1 0 8 0 sysvmsgpl 40 53 0 44 1 0 1 1 0 8 0 semupl 112 2 0 2 1 1 0 1 0 8 0 semapl 112 761 0 751 1 0 1 1 0 8 0 shmpl 112 130 0 2 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 4833 0 3445 46 0 46 46 0 8 0 ffsino 240 4833 0 3445 83 0 83 83 0 8 0 nchpl 144 9233 0 8776 60 39 21 60 0 8 0 uvmvnodes 72 6067 0 0 111 0 111 111 0 8 0 vnodes 208 6067 0 0 320 0 320 320 0 8 0 namei 1024 29771 0 29771 4 3 1 1 0 8 1 vcpupl 1984 26 0 0 4 0 4 4 0 8 0 vmpool 520 40 0 14 2 0 2 2 0 8 0 scsiplug 64 4 0 4 2 2 0 1 0 8 0 scxspl 192 27496 0 27494 16 15 1 7 0 8 0 plimitpl 152 153 0 147 1 0 1 1 0 8 0 sigapl 432 2604 0 2593 2 0 2 2 0 8 0 futexpl 56 66840 0 66840 5 5 0 1 0 8 0 knotepl 112 594 0 577 6 5 1 3 0 8 0 kqueuepl 104 637 0 635 1 0 1 1 0 8 0 pipepl 112 1410 0 1395 4 3 1 2 0 8 0 fdescpl 424 2605 0 2593 2 0 2 2 0 8 0 filepl 120 22033 0 21957 12 9 3 5 0 8 0 lockfpl 104 688 0 687 1 0 1 1 0 8 0 lockfspl 48 231 0 230 1 0 1 1 0 8 0 sessionpl 112 29 0 20 1 0 1 1 0 8 0 pgrppl 48 67 0 58 1 0 1 1 0 8 0 ucredpl 96 2454 0 2447 1 0 1 1 0 8 0 zombiepl 144 2598 0 2598 4 3 1 1 0 8 1 processpl 864 2626 0 2598 4 0 4 4 0 8 0 procpl 632 5448 0 5413 4 0 4 4 0 8 0 sosppl 128 39 0 39 6 6 0 1 0 8 0 sockpl 384 5873 0 5854 21 18 3 7 0 8 0 mcl64k 65536 467 0 467 35 35 0 33 0 8 0 mcl16k 16384 23 0 23 6 6 0 1 0 8 0 mcl12k 12288 61 0 61 8 8 0 1 0 8 0 mcl9k 9216 31 0 31 10 10 0 1 0 8 0 mcl8k 8192 92 0 90 4 3 1 1 0 8 0 mcl4k 4096 234 0 234 4 4 0 1 0 8 0 mcl2k2 2112 15 0 15 6 6 0 1 0 8 0 mcl2k 2048 72815 0 72767 17 10 7 15 0 8 0 mtagpl 80 91 0 78 2 1 1 1 0 8 0 mbufpl 256 138128 0 137985 86 72 14 29 0 8 0 bufpl 256 16850 0 9347 470 0 470 470 0 8 0 anonpl 16 319886 0 299334 148 45 103 103 0 62 12 amapchunkpl 152 13193 0 13049 55 38 17 17 0 158 9 amappl16 192 15179 0 13936 146 82 64 76 0 8 0 amappl15 184 1 0 1 1 0 1 1 0 8 1 amappl14 176 522 0 517 1 0 1 1 0 8 0 amappl13 168 901 0 901 2 2 0 1 0 8 0 amappl12 160 251 0 250 5 4 1 1 0 8 0 amappl11 152 127 0 114 1 0 1 1 0 8 0 amappl10 144 107 0 104 1 0 1 1 0 8 0 amappl9 136 1325 0 1323 1 0 1 1 0 8 0 amappl8 128 920 0 873 2 0 2 2 0 8 0 amappl7 120 152 0 147 1 0 1 1 0 8 0 amappl6 112 94 0 80 1 0 1 1 0 8 0 amappl5 104 476 0 466 1 0 1 1 0 8 0 amappl4 96 2850 0 2818 1 0 1 1 0 8 0 amappl3 88 332 0 324 1 0 1 1 0 8 0 amappl2 80 20237 0 20180 3 1 2 3 0 8 0 amappl1 72 54576 0 54187 26 16 10 20 0 8 0 amappl 80 5883 0 5832 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 17 0 17 1 1 0 1 0 8 0 aobjpl 64 131 0 2 3 0 3 3 0 8 0 uaddrrnd 24 2645 0 2593 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 2645 0 2593 1 0 1 1 0 8 0 vmmpekpl 168 18806 0 18767 2 0 2 2 0 8 0 vmmpepl 168 318904 0 316633 220 99 121 160 0 357 3 vmsppl 272 2604 0 2593 4 3 1 2 0 8 0 pdppl 4096 5296 0 5240 11 2 9 9 0 8 0 pvpl 32 940165 0 917664 427 112 315 330 0 265 117 pmappl 200 2644 0 2607 5 2 3 3 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 757 0 150 18 0 18 18 0 8 0