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 *315361 12312 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(ffffffff821e3863,ffffffff821f70fe,149,ffffffff821c01b6) at __assert+0x2b sys/kern/subr_prf.c:154 buf_free_pages(fffffd802d417400) at buf_free_pages+0x1ee sys/kern/vfs_biomem.c:318 buf_dealloc_mem(fffffd802d417400) at buf_dealloc_mem+0xe1 sys/kern/vfs_biomem.c:194 buf_put(fffffd802d417400) at buf_put+0x16b sys/kern/vfs_bio.c:131 brelse(fffffd802d417400) at brelse+0x257 sys/kern/vfs_bio.c:922 vinvalbuf(fffffd802d3a3280,2,fffffd803f7c6a80,ffff8000ffff5648,0,ffffffffffffffff) at vinvalbuf+0x3b1 sys/kern/vfs_subr.c:1977 ffs_truncate(fffffd802e0ca5a8,0,4,fffffd803f7c6a80) at ffs_truncate+0xeb1 sys/ufs/ffs/ffs_inode.c:326 ufs_rmdir(ffff8000149042d8) at ufs_rmdir+0x3af sys/ufs/ufs/ufs_vnops.c:1357 VOP_RMDIR(fffffd8036720420,fffffd802d3a3280,ffff8000149043d8) at VOP_RMDIR+0xf8 sys/kern/vfs_vops.c:474 dounlinkat(ffff8000ffff5648,9,c00180f3e0,8) at dounlinkat+0x14c sys/kern/vfs_syscalls.c:1818 syscall(ffff800014904550) at syscall+0x507 sys/arch/amd64/amd64/trap.c:555 Xsyscall(0,145,c00002a000,145,100,9f) at Xsyscall+0x128 end of kernel end trace frame: 0xc0010d5978, 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(ffffffff821e3863,ffffffff821f70fe,149,ffffffff821c01b6) at __assert+0x2b sys/kern/subr_prf.c:154 buf_free_pages(fffffd802d417400) at buf_free_pages+0x1ee sys/kern/vfs_biomem.c:318 buf_dealloc_mem(fffffd802d417400) at buf_dealloc_mem+0xe1 sys/kern/vfs_biomem.c:194 buf_put(fffffd802d417400) at buf_put+0x16b sys/kern/vfs_bio.c:131 brelse(fffffd802d417400) at brelse+0x257 sys/kern/vfs_bio.c:922 vinvalbuf(fffffd802d3a3280,2,fffffd803f7c6a80,ffff8000ffff5648,0,ffffffffffffffff) at vinvalbuf+0x3b1 sys/kern/vfs_subr.c:1977 ffs_truncate(fffffd802e0ca5a8,0,4,fffffd803f7c6a80) at ffs_truncate+0xeb1 sys/ufs/ffs/ffs_inode.c:326 ufs_rmdir(ffff8000149042d8) at ufs_rmdir+0x3af sys/ufs/ufs/ufs_vnops.c:1357 VOP_RMDIR(fffffd8036720420,fffffd802d3a3280,ffff8000149043d8) at VOP_RMDIR+0xf8 sys/kern/vfs_vops.c:474 dounlinkat(ffff8000ffff5648,9,c00180f3e0,8) at dounlinkat+0x14c sys/kern/vfs_syscalls.c:1818 syscall(ffff800014904550) at syscall+0x507 sys/arch/amd64/amd64/trap.c:555 Xsyscall(0,145,c00002a000,145,100,9f) at Xsyscall+0x128 end of kernel end trace frame: 0xc0010d5978, count: -14 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff800014903db0 rbx 0xffff800014903e60 rdx 0x2 rcx 0 rax 0 r8 0xffff800014903d70 r9 0x1 r10 0 r11 0x16a55524af5479a9 r12 0x3000000008 r13 0xffff800014903dc0 r14 0x100 r15 0x1 rip 0xffffffff8173c158 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800014903da0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-fuzzer) pid=315361 stat=onproc flags process=2 proc=4000000 pri=17, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff4500,0xffff8000ffff93d8 process=0xffff8000148a26d8 user=0xffff8000148ff000, vmspace=0xfffffd803f013aa0 estcpu=36, cpticks=2, pctcpu=0.0 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 21138 401634 24616 0 2 0 syz-executor.1 21138 295879 24616 0 2 0x4000000 syz-executor.1 24616 455329 12312 0 3 0x82 nanosleep syz-executor.1 94403 51622 1 0 3 0x100083 ttyin getty 12115 218214 0 0 3 0x14200 bored sosplice 84584 398656 0 0 3 0x14200 acct acct 12312 401228 56640 0 3 0x82 thrsleep syz-fuzzer 12312 168787 56640 0 3 0x4000082 nanosleep syz-fuzzer 12312 244397 56640 0 3 0x4000082 thrsleep syz-fuzzer 12312 330517 56640 0 3 0x4000082 thrsleep syz-fuzzer *12312 315361 56640 0 7 0x4000002 syz-fuzzer 12312 517407 56640 0 3 0x4000082 thrsleep syz-fuzzer 12312 125427 56640 0 3 0x4000082 thrsleep syz-fuzzer 12312 443034 56640 0 3 0x4000082 kqread syz-fuzzer 56640 408357 30337 0 3 0x10008a pause ksh 30337 341622 43184 0 3 0x92 select sshd 43184 96454 1 0 3 0x80 select sshd 164 68297 96080 73 3 0x100090 kqread syslogd 96080 226465 1 0 3 0x100082 netio syslogd 90688 192984 1 77 3 0x100090 poll dhclient 1008 274167 1 0 3 0x80 poll dhclient 36333 273192 0 0 2 0x14200 zerothread 43865 381383 0 0 3 0x14200 aiodoned aiodoned 17973 358405 0 0 3 0x14200 syncer update 32505 331214 0 0 3 0x14200 cleaner cleaner 38967 325288 0 0 3 0x14200 reaper reaper 94307 254679 0 0 3 0x14200 pgdaemon pagedaemon 4732 84232 0 0 3 0x14200 bored crynlk 67625 87349 0 0 3 0x14200 bored crypto 7188 459470 0 0 3 0x40014200 acpi0 acpi0 75209 252235 0 0 3 0x14200 bored softnet 65531 83228 0 0 3 0x14200 bored systqmp 69375 330581 0 0 3 0x14200 bored systq 4647 499380 0 0 3 0x40014200 bored softclock 37307 464266 0 0 3 0x40014200 idle0 74332 463016 0 0 3 0x14200 bored smr 1 490075 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 9562 6362K 6977K 78643K 15258 0 0 pcb 13 10K 12K 78643K 489 0 0 rtable 83 7K 8K 78643K 1513 0 0 ifaddr 78 16K 18K 78643K 389 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 135 0 0 iov 0 0K 24K 78643K 493 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1213 76K 77K 78643K 3095 0 0 UFS quota 1 32K 32K 78643K 1 0 0 UFS mount 5 36K 36K 78643K 5 0 0 shm 2 1K 9K 78643K 25 0 0 VM map 24 6K 6K 78643K 34 0 0 sem 12 1K 1K 78643K 380 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12645 0 0 file desc 4 9K 25K 78643K 2005 0 0 sigio 0 0K 0K 78643K 40 0 0 proc 50 38K 63K 78643K 1085 0 0 subproc 16 1K 2K 78643K 255 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 176 0 0 in_multi 15 0K 2K 78643K 271 0 0 ether_multi 1 0K 0K 78643K 19 0 0 mrt 0 0K 0K 78643K 23 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 560 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 130 208K 217K 78643K 5949 0 0 UVM aobj 68 3K 3K 78643K 73 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 391 0 0 NDP 19 0K 1K 78643K 128 0 0 temp 206 3547K 3619K 78643K 90111 0 0 kqueue 0 0K 0K 78643K 17 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 51 0 47 1 0 1 1 0 8 0 rtpcb 80 245 0 243 1 0 1 1 0 8 0 rtentry 112 290 0 263 2 0 2 2 0 8 0 unpcb 120 1135 0 1124 2 1 1 2 0 8 0 syncache 264 11 0 11 4 4 0 1 0 8 0 sackhl 24 1 0 1 1 1 0 1 0 8 0 tcpqe 32 143 0 143 3 3 0 1 0 8 0 tcpcb 544 1794 0 1790 30 29 1 15 0 8 0 ipq 40 6 0 6 3 3 0 1 0 8 0 ipqe 40 14 0 14 3 3 0 1 0 8 0 inpcb 280 5295 0 5287 27 24 3 9 0 8 2 rttmr 72 9 0 9 4 3 1 1 0 8 1 ip6q 72 2 0 2 1 1 0 1 0 8 0 ip6af 40 6 0 6 1 1 0 1 0 8 0 nd6 48 37 0 37 3 2 1 1 0 8 1 pkpcb 40 10 0 10 3 3 0 1 0 8 0 ppxss 1128 33 0 33 8 7 1 1 0 8 1 art_heap8 4096 4 0 3 3 2 1 3 0 8 0 art_heap4 256 1248 0 1112 26 13 13 15 0 8 1 art_table 32 1252 0 1115 2 0 2 2 0 8 0 art_node 16 289 0 264 1 0 1 1 0 8 0 sysvmsgpl 40 45 0 40 1 0 1 1 0 8 0 semupl 112 2 0 2 1 1 0 1 0 8 0 semapl 112 378 0 368 1 0 1 1 0 8 0 shmpl 112 71 0 5 2 0 2 2 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 4451 0 3053 46 0 46 46 0 8 0 ffsino 240 4451 0 3053 83 0 83 83 0 8 0 nchpl 144 7619 0 6016 60 0 60 60 0 8 0 uvmvnodes 72 5837 0 0 107 0 107 107 0 8 0 vnodes 208 5837 0 0 308 0 308 308 0 8 0 namei 1024 25287 0 25287 6 5 1 1 0 8 1 vcpupl 1984 22 0 0 3 0 3 3 0 8 0 vmpool 520 32 0 10 2 0 2 2 0 8 0 scsiplug 64 2 0 2 1 1 0 1 0 8 0 scxspl 192 33101 0 33101 18 17 1 7 0 8 1 plimitpl 152 203 0 197 1 0 1 1 0 8 0 sigapl 432 2138 0 2126 2 0 2 2 0 8 0 futexpl 56 55527 0 55527 6 5 1 1 0 8 1 knotepl 112 640 0 616 2 1 1 2 0 8 0 kqueuepl 104 866 0 862 7 6 1 4 0 8 0 pipepl 112 1318 0 1303 8 7 1 2 0 8 0 fdescpl 424 2139 0 2126 2 0 2 2 0 8 0 filepl 120 19289 0 19208 26 21 5 11 0 8 2 lockfpl 104 735 0 734 1 0 1 1 0 8 0 lockfspl 48 245 0 244 1 0 1 1 0 8 0 sessionpl 112 31 0 22 1 0 1 1 0 8 0 pgrppl 48 63 0 54 1 0 1 1 0 8 0 ucredpl 96 2147 0 2140 1 0 1 1 0 8 0 zombiepl 144 2126 0 2126 2 1 1 1 0 8 1 processpl 864 2155 0 2126 4 0 4 4 0 8 0 procpl 632 4535 0 4498 4 0 4 4 0 8 0 sosppl 128 25 0 25 7 6 1 1 0 8 1 sockpl 384 6707 0 6686 39 33 6 14 0 8 3 mcl64k 65536 184 0 184 8 7 1 1 0 8 1 mcl16k 16384 20 0 20 9 8 1 1 0 8 1 mcl12k 12288 54 0 54 11 10 1 1 0 8 1 mcl9k 9216 41 0 41 9 8 1 1 0 8 1 mcl8k 8192 85 0 85 5 4 1 1 0 8 1 mcl4k 4096 233 0 233 6 5 1 1 0 8 1 mcl2k2 2112 11 0 11 6 6 0 1 0 8 0 mcl2k 2048 69914 0 69864 19 12 7 14 0 8 0 mtagpl 80 97 0 97 5 4 1 1 0 8 1 mbufpl 256 132571 0 132507 59 50 9 34 0 8 1 bufpl 256 17913 0 10347 474 0 474 474 0 8 0 anonpl 16 315795 0 297295 155 68 87 92 0 62 7 amapchunkpl 152 12005 0 11893 56 43 13 19 0 158 7 amappl16 192 14728 0 13609 146 84 62 66 0 8 6 amappl15 184 130 0 130 3 3 0 1 0 8 0 amappl14 176 834 0 829 2 1 1 1 0 8 0 amappl13 168 101 0 101 2 2 0 1 0 8 0 amappl12 160 18 0 16 1 0 1 1 0 8 0 amappl11 152 340 0 329 1 0 1 1 0 8 0 amappl10 144 21 0 19 1 0 1 1 0 8 0 amappl9 136 1336 0 1331 1 0 1 1 0 8 0 amappl8 128 890 0 860 3 1 2 2 0 8 0 amappl7 120 114 0 105 1 0 1 1 0 8 0 amappl6 112 311 0 303 1 0 1 1 0 8 0 amappl5 104 277 0 267 1 0 1 1 0 8 0 amappl4 96 2391 0 2364 1 0 1 1 0 8 0 amappl3 88 775 0 768 1 0 1 1 0 8 0 amappl2 80 15540 0 15472 4 2 2 3 0 8 0 amappl1 72 49182 0 48791 27 18 9 20 0 8 0 amappl 80 5008 0 4959 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 17 0 17 1 1 0 1 0 8 0 aobjpl 64 72 0 5 2 0 2 2 0 8 0 uaddrrnd 24 2171 0 2126 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 2171 0 2126 1 0 1 1 0 8 0 vmmpekpl 168 18018 0 17983 2 0 2 2 0 8 0 vmmpepl 168 270914 0 268762 293 162 131 145 0 357 28 vmsppl 272 2138 0 2126 6 5 1 2 0 8 0 pdppl 4096 4348 0 4294 9 1 8 8 0 8 0 pvpl 32 862737 0 841485 439 149 290 315 0 265 106 pmappl 200 2170 0 2136 2 0 2 2 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 748 0 143 18 0 18 18 0 8 0