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 * 48179 3044 0 0x2 0x4000000 0 syz-fuzzer 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(ffffffff821dd6b4,ffffffff821f08f1,149,ffffffff821b99a5) at __assert+0x2b sys/kern/subr_prf.c:154 buf_free_pages(fffffd803c386500) at buf_free_pages+0x1ee sys/kern/vfs_biomem.c:318 buf_dealloc_mem(fffffd803c386500) at buf_dealloc_mem+0xe1 sys/kern/vfs_biomem.c:194 buf_put(fffffd803c386500) at buf_put+0x16b sys/kern/vfs_bio.c:131 brelse(fffffd803c386500) at brelse+0x257 sys/kern/vfs_bio.c:922 vinvalbuf(fffffd803eb4e5c0,2,fffffd803f7c6c60,ffff8000ffff5648,0,ffffffffffffffff) at vinvalbuf+0x3b1 sys/kern/vfs_subr.c:1977 ffs_truncate(fffffd80365315b0,0,4,fffffd803f7c6c60) at ffs_truncate+0xeb1 sys/ufs/ffs/ffs_inode.c:326 ufs_rmdir(ffff8000149043b8) at ufs_rmdir+0x3af sys/ufs/ufs/ufs_vnops.c:1357 VOP_RMDIR(fffffd8036a17690,fffffd803eb4e5c0,ffff8000149044b8) at VOP_RMDIR+0xf8 sys/kern/vfs_vops.c:474 dounlinkat(ffff8000ffff5648,e,c002438440,8) at dounlinkat+0x14c sys/kern/vfs_syscalls.c:1818 syscall(ffff800014904630) at syscall+0x507 sys/arch/amd64/amd64/trap.c:555 Xsyscall(6,145,c00002a000,145,100,22) at Xsyscall+0x128 end of kernel end trace frame: 0xc0023f98b8, count: 1 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(ffffffff821dd6b4,ffffffff821f08f1,149,ffffffff821b99a5) at __assert+0x2b sys/kern/subr_prf.c:154 buf_free_pages(fffffd803c386500) at buf_free_pages+0x1ee sys/kern/vfs_biomem.c:318 buf_dealloc_mem(fffffd803c386500) at buf_dealloc_mem+0xe1 sys/kern/vfs_biomem.c:194 buf_put(fffffd803c386500) at buf_put+0x16b sys/kern/vfs_bio.c:131 brelse(fffffd803c386500) at brelse+0x257 sys/kern/vfs_bio.c:922 vinvalbuf(fffffd803eb4e5c0,2,fffffd803f7c6c60,ffff8000ffff5648,0,ffffffffffffffff) at vinvalbuf+0x3b1 sys/kern/vfs_subr.c:1977 ffs_truncate(fffffd80365315b0,0,4,fffffd803f7c6c60) at ffs_truncate+0xeb1 sys/ufs/ffs/ffs_inode.c:326 ufs_rmdir(ffff8000149043b8) at ufs_rmdir+0x3af sys/ufs/ufs/ufs_vnops.c:1357 VOP_RMDIR(fffffd8036a17690,fffffd803eb4e5c0,ffff8000149044b8) at VOP_RMDIR+0xf8 sys/kern/vfs_vops.c:474 dounlinkat(ffff8000ffff5648,e,c002438440,8) at dounlinkat+0x14c sys/kern/vfs_syscalls.c:1818 syscall(ffff800014904630) at syscall+0x507 sys/arch/amd64/amd64/trap.c:555 Xsyscall(6,145,c00002a000,145,100,22) at Xsyscall+0x128 end of kernel end trace frame: 0xc0023f98b8, count: -14 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff800014903e90 rbx 0xffff800014903f40 rdx 0x2 rcx 0 rax 0 r8 0xffff800014903e50 r9 0x1 r10 0 r11 0xf415af9c038133a9 r12 0x3000000008 r13 0xffff800014903ea0 r14 0x100 r15 0x1 rip 0xffffffff82050c48 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800014903e80 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-fuzzer) pid=48179 stat=onproc flags process=2 proc=4000000 pri=17, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff4c68,0xffff8000ffff98c8 process=0xffff8000148a2018 user=0xffff8000148ff000, vmspace=0xfffffd803f014110 estcpu=0, cpticks=2, pctcpu=0.0 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 34502 346692 1 0 3 0x100083 ttyin getty 28005 507538 0 0 3 0x14200 acct acct 19190 161879 0 0 3 0x14200 bored sosplice 3044 441202 25008 0 3 0x82 thrsleep syz-fuzzer 3044 325343 25008 0 3 0x4000082 nanosleep syz-fuzzer 3044 125561 25008 0 3 0x4000082 thrsleep syz-fuzzer 3044 399787 25008 0 3 0x4000082 thrsleep syz-fuzzer * 3044 48179 25008 0 7 0x4000002 syz-fuzzer 3044 433594 25008 0 3 0x4000082 thrsleep syz-fuzzer 3044 151257 25008 0 3 0x4000082 thrsleep syz-fuzzer 3044 91126 25008 0 3 0x4000002 biowait syz-fuzzer 25008 473020 81040 0 3 0x10008a pause ksh 81040 163509 15683 0 3 0x92 select sshd 15683 183403 1 0 3 0x80 select sshd 6112 400953 62742 73 3 0x100010 ffs_fsync syslogd 62742 478339 1 0 3 0x100082 netio syslogd 4716 116758 1 77 3 0x100090 poll dhclient 63852 391454 1 0 3 0x80 poll dhclient 11652 559 0 0 3 0x14200 pgzero zerothread 53778 147698 0 0 3 0x14200 aiodoned aiodoned 74992 262478 0 0 3 0x14200 syncer update 24150 37950 0 0 3 0x14200 cleaner cleaner 73218 143592 0 0 3 0x14200 reaper reaper 20913 284859 0 0 3 0x14200 pgdaemon pagedaemon 19276 348947 0 0 3 0x14200 bored crynlk 58396 452651 0 0 3 0x14200 bored crypto 78108 520432 0 0 3 0x40014200 acpi0 acpi0 83091 206181 0 0 3 0x14200 bored softnet 12922 257654 0 0 3 0x14200 bored systqmp 90384 219130 0 0 3 0x14200 bored systq 30967 366048 0 0 3 0x40014200 bored softclock 80969 24344 0 0 3 0x40014200 idle0 64582 446405 0 0 3 0x14200 bored smr 1 423961 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 9524 6356K 14928K 78643K 23597 0 0 pcb 13 8K 8K 78643K 527 0 0 rtable 74 3K 4K 78643K 1970 0 0 ifaddr 51 14K 18K 78643K 588 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 304 0 0 iov 0 0K 20K 78643K 405 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1204 76K 77K 78643K 5998 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 58 0 0 VM map 2 0K 0K 78643K 12 0 0 sem 12 0K 1K 78643K 510 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1794 195K 288K 78643K 12723 0 0 file desc 2 1K 25K 78643K 5059 0 0 sigio 0 0K 0K 78643K 77 0 0 proc 49 38K 55K 78643K 1807 0 0 subproc 0 0K 2K 78643K 466 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 407 0 0 in_multi 11 0K 2K 78643K 497 0 0 ether_multi 1 0K 0K 78643K 35 0 0 mrt 0 0K 0K 78643K 12 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 114 503K 503K 78643K 114 0 0 exec 0 0K 1K 78643K 906 0 0 pfkey data 0 0K 0K 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 92 5K 32K 78643K 13225 0 0 UVM aobj 130 4K 4K 78643K 139 0 0 memdesc 1 4K 4K 78643K 1 0 0 crypto data 1 1K 1K 78643K 1 0 0 ip6_options 0 0K 1K 78643K 534 0 0 NDP 12 0K 0K 78643K 194 0 0 temp 136 3533K 3614K 78643K 106311 0 0 kqueue 0 0K 0K 78643K 44 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 56 0 54 1 0 1 1 0 8 0 rtpcb 80 284 0 282 1 0 1 1 0 8 0 rtentry 112 305 0 280 2 0 2 2 0 8 0 unpcb 120 1553 0 1545 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 3353 0 3353 1 1 0 1 0 8 0 tcpcb 544 1052 0 1048 1 0 1 1 0 8 0 ipq 40 2 0 2 1 1 0 1 0 8 0 ipqe 40 4 0 4 1 1 0 1 0 8 0 inpcb 280 2734 0 2727 4 3 1 2 0 8 0 nd6 48 54 0 54 3 3 0 1 0 8 0 pkpcb 40 14 0 14 6 6 0 1 0 8 0 swfcl 56 1 0 0 1 0 1 1 0 8 0 ppxss 1128 73 0 73 23 23 0 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 1340 0 1217 22 9 13 14 0 8 3 art_table 32 1341 0 1217 2 0 2 2 0 8 0 art_node 16 295 0 273 1 0 1 1 0 8 0 sysvmsgpl 40 33 0 19 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 508 0 498 1 0 1 1 0 8 0 shmpl 112 137 0 9 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 8757 0 7379 46 0 46 46 0 8 0 ffsino 240 8757 0 7379 83 0 83 83 0 8 0 nchpl 144 15681 0 14095 60 0 60 60 0 8 0 uvmvnodes 72 8056 0 0 147 0 147 147 0 8 0 vnodes 208 8056 0 0 424 0 424 424 0 8 0 namei 1024 51030 0 51030 7 6 1 1 0 8 1 vmpool 520 10 0 10 5 5 0 1 0 8 0 scsiplug 64 11 0 11 7 7 0 1 0 8 0 scxspl 192 53350 0 53348 27 26 1 7 0 8 0 plimitpl 152 413 0 408 1 0 1 1 0 8 0 sigapl 432 5157 0 5147 2 0 2 2 0 8 0 futexpl 56 77590 0 77590 5 5 0 1 0 8 0 knotepl 112 1396 0 1375 1 0 1 1 0 8 0 kqueuepl 104 1042 0 1040 1 0 1 1 0 8 0 pipepl 112 2762 0 2751 7 6 1 2 0 8 0 fdescpl 424 5158 0 5147 2 0 2 2 0 8 0 filepl 120 29761 0 29705 9 5 4 5 0 8 0 lockfpl 104 1304 0 1303 1 0 1 1 0 8 0 lockfspl 48 450 0 449 1 0 1 1 0 8 0 sessionpl 112 44 0 36 1 0 1 1 0 8 0 pgrppl 48 86 0 78 1 0 1 1 0 8 0 ucredpl 96 5553 0 5545 1 0 1 1 0 8 0 zombiepl 144 5147 0 5147 2 1 1 1 0 8 1 processpl 864 5174 0 5147 4 0 4 4 0 8 0 procpl 632 11357 0 11323 4 0 4 4 0 8 0 sosppl 128 57 0 57 18 18 0 1 0 8 0 sockpl 384 4635 0 4618 12 10 2 4 0 8 0 mcl64k 65536 1062 0 1062 132 132 0 33 0 8 0 mcl16k 16384 20 0 20 15 15 0 1 0 8 0 mcl12k 12288 86 0 86 23 23 0 1 0 8 0 mcl9k 9216 58 0 58 24 24 0 1 0 8 0 mcl8k 8192 81 0 81 22 22 0 1 0 8 0 mcl4k 4096 243 0 243 12 12 0 1 0 8 0 mcl2k2 2112 27 0 27 14 14 0 1 0 8 0 mcl2k 2048 63210 0 63158 39 31 8 20 0 8 0 mtagpl 80 126 0 126 7 7 0 1 0 8 0 mbufpl 256 129507 0 129432 82 73 9 23 0 8 1 bufpl 256 21121 0 13069 505 1 504 504 0 8 0 anonpl 16 532373 0 522720 221 146 75 75 0 62 17 amapchunkpl 152 26159 0 26060 101 76 25 25 0 158 20 amappl16 192 27623 0 26941 235 199 36 48 0 8 0 amappl15 184 3 0 3 3 3 0 1 0 8 0 amappl14 176 927 0 924 1 0 1 1 0 8 0 amappl13 168 1039 0 1039 5 4 1 1 0 8 1 amappl12 160 801 0 800 1 0 1 1 0 8 0 amappl11 152 985 0 973 1 0 1 1 0 8 0 amappl10 144 102 0 101 2 1 1 1 0 8 0 amappl9 136 2104 0 2100 1 0 1 1 0 8 0 amappl8 128 1562 0 1532 3 1 2 2 0 8 0 amappl7 120 202 0 194 1 0 1 1 0 8 0 amappl6 112 917 0 906 1 0 1 1 0 8 0 amappl5 104 1144 0 1134 1 0 1 1 0 8 0 amappl4 96 5064 0 5038 1 0 1 1 0 8 0 amappl3 88 1841 0 1836 1 0 1 1 0 8 0 amappl2 80 39241 0 39185 3 1 2 3 0 8 0 amappl1 72 102688 0 102298 26 16 10 20 0 8 0 amappl 80 11973 0 11944 1 0 1 1 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 dma64 64 259 0 259 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 138 0 9 3 0 3 3 0 8 0 uaddrrnd 24 5168 0 5147 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 5168 0 5147 1 0 1 1 0 8 0 vmmpekpl 168 35605 0 35581 2 0 2 2 0 8 0 vmmpepl 168 613137 0 611635 388 302 86 112 0 357 6 vmsppl 272 5157 0 5147 8 7 1 2 0 8 0 pdppl 4096 10342 0 10314 8 3 5 6 0 8 0 pvpl 32 1606888 0 1594410 769 406 363 378 0 265 229 pmappl 200 5167 0 5157 1 0 1 1 0 8 0 extentpl 40 38 0 22 1 0 1 1 0 8 0 phpool 112 942 0 313 20 0 20 20 0 8 0