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 *111495 52848 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(ffffffff821e6f50,ffffffff821f97cd,149,ffffffff821c29b1) at __assert+0x2b sys/kern/subr_prf.c:154 buf_free_pages(fffffd80240ac500) at buf_free_pages+0x1ee sys/kern/vfs_biomem.c:318 buf_dealloc_mem(fffffd80240ac500) at buf_dealloc_mem+0xe1 sys/kern/vfs_biomem.c:194 buf_put(fffffd80240ac500) at buf_put+0x16b sys/kern/vfs_bio.c:131 brelse(fffffd80240ac500) at brelse+0x257 sys/kern/vfs_bio.c:922 vinvalbuf(fffffd802349d4e8,2,fffffd803f7c68a0,ffff8000ffff93c8,0,ffffffffffffffff) at vinvalbuf+0x3b1 sys/kern/vfs_subr.c:1977 ffs_truncate(fffffd802e34e3d0,0,4,fffffd803f7c68a0) at ffs_truncate+0xeb1 sys/ufs/ffs/ffs_inode.c:326 ufs_rmdir(ffff800014907e58) at ufs_rmdir+0x3af sys/ufs/ufs/ufs_vnops.c:1357 VOP_RMDIR(fffffd802349d5b8,fffffd802349d4e8,ffff800014907f58) at VOP_RMDIR+0xf8 sys/kern/vfs_vops.c:474 dounlinkat(ffff8000ffff93c8,b,c003b0c6a0,8) at dounlinkat+0x14c sys/kern/vfs_syscalls.c:1818 syscall(ffff8000149080d0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:555 Xsyscall(6,145,c000028000,145,100,35) at Xsyscall+0x128 end of kernel end trace frame: 0xc00014b760, 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(ffffffff821e6f50,ffffffff821f97cd,149,ffffffff821c29b1) at __assert+0x2b sys/kern/subr_prf.c:154 buf_free_pages(fffffd80240ac500) at buf_free_pages+0x1ee sys/kern/vfs_biomem.c:318 buf_dealloc_mem(fffffd80240ac500) at buf_dealloc_mem+0xe1 sys/kern/vfs_biomem.c:194 buf_put(fffffd80240ac500) at buf_put+0x16b sys/kern/vfs_bio.c:131 brelse(fffffd80240ac500) at brelse+0x257 sys/kern/vfs_bio.c:922 vinvalbuf(fffffd802349d4e8,2,fffffd803f7c68a0,ffff8000ffff93c8,0,ffffffffffffffff) at vinvalbuf+0x3b1 sys/kern/vfs_subr.c:1977 ffs_truncate(fffffd802e34e3d0,0,4,fffffd803f7c68a0) at ffs_truncate+0xeb1 sys/ufs/ffs/ffs_inode.c:326 ufs_rmdir(ffff800014907e58) at ufs_rmdir+0x3af sys/ufs/ufs/ufs_vnops.c:1357 VOP_RMDIR(fffffd802349d5b8,fffffd802349d4e8,ffff800014907f58) at VOP_RMDIR+0xf8 sys/kern/vfs_vops.c:474 dounlinkat(ffff8000ffff93c8,b,c003b0c6a0,8) at dounlinkat+0x14c sys/kern/vfs_syscalls.c:1818 syscall(ffff8000149080d0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:555 Xsyscall(6,145,c000028000,145,100,35) at Xsyscall+0x128 end of kernel end trace frame: 0xc00014b760, count: -14 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff800014907930 rbx 0xffff8000149079e0 rdx 0x2 rcx 0 rax 0 r8 0xffff8000149078f0 r9 0x1 r10 0 r11 0x2e0eef4f37be882a r12 0x3000000008 r13 0xffff800014907940 r14 0x100 r15 0x1 rip 0xffffffff82049278 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800014907920 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-fuzzer) pid=111495 stat=onproc flags process=2 proc=4000000 pri=17, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff58c0,0xffff8000ffff89f8 process=0xffff8000148a2a38 user=0xffff800014903000, vmspace=0xfffffd803f014cc0 estcpu=33, cpticks=1, pctcpu=0.1 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 48319 389472 52848 0 3 0x2 biowait syz-executor.1 4260 276855 0 0 3 0x14200 acct acct 39623 47057 1 0 3 0x100083 ttyin getty 90717 388527 0 0 3 0x14200 bored sosplice 52848 309597 14501 0 3 0x82 thrsleep syz-fuzzer 52848 14254 14501 0 3 0x4000082 nanosleep syz-fuzzer 52848 763 14501 0 3 0x4000082 thrsleep syz-fuzzer 52848 416955 14501 0 3 0x4000082 thrsleep syz-fuzzer 52848 236101 14501 0 3 0x4000082 thrsleep syz-fuzzer *52848 111495 14501 0 7 0x4000002 syz-fuzzer 52848 264943 14501 0 3 0x4000082 thrsleep syz-fuzzer 52848 484637 14501 0 3 0x4000082 thrsleep syz-fuzzer 52848 204817 14501 0 3 0x4000082 thrsleep syz-fuzzer 14501 90213 24731 0 3 0x10008a pause ksh 24731 94160 76285 0 3 0x92 select sshd 76285 253995 1 0 3 0x80 select sshd 23503 289941 26061 73 3 0x100010 biowait syslogd 26061 469845 1 0 3 0x100082 netio syslogd 58567 200060 0 0 3 0x14200 pgzero zerothread 38735 171443 0 0 3 0x14200 aiodoned aiodoned 21235 301337 0 0 3 0x14200 syncer update 36102 278718 0 0 3 0x14200 cleaner cleaner 16842 204429 0 0 3 0x14200 reaper reaper 15378 263189 0 0 3 0x14200 pgdaemon pagedaemon 1973 398588 0 0 3 0x14200 bored crynlk 25630 16081 0 0 3 0x14200 bored crypto 93644 379339 0 0 3 0x40014200 acpi0 acpi0 29036 335562 0 0 3 0x14200 bored softnet 81486 313713 0 0 3 0x14200 bored systqmp 20889 474784 0 0 3 0x14200 bored systq 94543 54713 0 0 3 0x40014200 bored softclock 55701 212259 0 0 3 0x40014200 idle0 78870 292469 0 0 3 0x14200 bored smr 1 357529 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 9620 7208K 14610K 78643K 39599 0 0 pcb 13 10K 12K 78643K 1253 0 0 rtable 162 15K 16K 78643K 2698 0 0 ifaddr 94 22K 24K 78643K 866 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 332 0 0 iov 0 0K 24K 78643K 1349 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1228 77K 78K 78643K 9508 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 76 0 0 VM map 50 12K 12K 78643K 73 0 0 sem 12 0K 1K 78643K 1178 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12645 0 0 file desc 3 5K 25K 78643K 5162 0 0 sigio 0 0K 0K 78643K 86 0 0 proc 45 30K 62K 78643K 2212 0 0 subproc 16 1K 2K 78643K 580 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 3646 0 0 in_multi 32 2K 2K 78643K 839 0 0 ether_multi 1 0K 0K 78643K 47 0 0 mrt 0 0K 0K 78643K 30 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 96 424K 424K 78643K 96 0 0 exec 0 0K 1K 78643K 1237 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 190 391K 399K 78643K 15615 0 0 UVM aobj 130 8K 8K 78643K 136 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 1248 0 0 NDP 18 0K 1K 78643K 285 0 0 temp 161 3543K 4183K 78643K 182387 0 0 kqueue 0 0K 0K 78643K 110 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 104 0 98 1 0 1 1 0 8 0 rtpcb 80 598 0 598 10 9 1 1 0 8 1 rtentry 112 674 0 609 3 0 3 3 0 8 0 unpcb 120 2950 0 2939 2 1 1 2 0 8 0 syncache 264 34 0 34 16 16 0 1 0 8 0 sackhl 24 1 0 1 1 1 0 1 0 8 0 tcpqe 32 24 0 24 9 9 0 1 0 8 0 tcpcb 544 4152 0 4148 36 35 1 13 0 8 0 ipq 40 80 0 80 26 26 0 1 0 8 0 ipqe 40 2170 0 2170 26 26 0 1 0 8 0 inpcb 280 8545 0 8540 48 47 1 9 0 8 0 rttmr 72 9 0 9 2 2 0 1 0 8 0 ip6q 72 5 0 5 3 3 0 1 0 8 0 ip6af 40 14 0 14 3 3 0 1 0 8 0 nd6 48 91 0 89 5 4 1 1 0 8 0 pkpcb 40 24 0 24 8 7 1 1 0 8 1 swfcl 56 4 0 0 1 0 1 1 0 8 0 ppxss 1128 83 0 83 29 29 0 1 0 8 0 art_heap8 4096 21 0 17 15 11 4 6 0 8 0 art_heap4 256 2797 0 2585 42 26 16 20 0 8 0 art_table 32 2818 0 2602 3 0 3 3 0 8 0 art_node 16 669 0 625 1 0 1 1 0 8 0 sysvmsgpl 40 39 0 23 1 0 1 1 0 8 0 semupl 112 3 0 3 1 1 0 1 0 8 0 semapl 112 1174 0 1164 1 0 1 1 0 8 0 shmpl 112 134 0 6 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 9366 0 7962 46 0 46 46 0 8 0 ffsino 240 9366 0 7962 84 0 84 84 0 8 0 nchpl 144 18009 0 17557 60 38 22 60 0 8 0 uvmvnodes 72 7728 0 0 141 0 141 141 0 8 0 vnodes 208 7728 0 0 407 0 407 407 0 8 0 namei 1024 65815 0 65814 4 3 1 1 0 8 0 vcpupl 1984 48 0 0 6 0 6 6 0 8 0 vmpool 520 71 0 23 5 1 4 4 0 8 0 scsiplug 64 13 0 13 5 5 0 1 0 8 0 scxspl 192 65772 0 65770 32 31 1 7 0 8 0 plimitpl 152 513 0 508 1 0 1 1 0 8 0 sigapl 432 5240 0 5231 2 0 2 2 0 8 0 futexpl 56 155375 0 155375 4 3 1 1 0 8 1 knotepl 112 1444 0 1427 10 9 1 3 0 8 0 kqueuepl 104 1942 0 1940 7 6 1 4 0 8 0 pipepl 112 3548 0 3533 17 16 1 2 0 8 0 fdescpl 424 5241 0 5231 2 0 2 2 0 8 0 filepl 120 49614 0 49549 43 39 4 11 0 8 1 lockfpl 104 2120 0 2120 4 3 1 1 0 8 1 lockfspl 48 677 0 677 4 3 1 1 0 8 1 sessionpl 112 53 0 46 1 0 1 1 0 8 0 pgrppl 48 108 0 101 1 0 1 1 0 8 0 ucredpl 96 5983 0 5977 1 0 1 1 0 8 0 zombiepl 144 5236 0 5236 1 0 1 1 0 8 1 processpl 864 5262 0 5236 4 0 4 4 0 8 0 procpl 632 13102 0 13068 12 8 4 5 0 8 0 sosppl 128 89 0 89 23 23 0 1 0 8 0 sockpl 384 12230 0 12215 68 65 3 14 0 8 0 mcl64k 65536 1778 0 1778 161 160 1 33 0 8 1 mcl16k 16384 84 0 84 34 33 1 1 0 8 1 mcl12k 12288 181 0 181 25 25 0 1 0 8 0 mcl9k 9216 83 0 83 32 31 1 1 0 8 1 mcl8k 8192 217 0 217 25 24 1 1 0 8 1 mcl4k 4096 638 0 638 6 5 1 1 0 8 1 mcl2k2 2112 62 0 62 27 27 0 1 0 8 0 mcl2k 2048 79917 0 79873 39 32 7 14 0 8 0 mtagpl 80 235 0 231 9 8 1 1 0 8 0 mbufpl 256 180322 0 180232 344 329 15 36 0 8 1 bufpl 256 30015 0 21950 505 0 505 505 0 8 0 anonpl 16 695898 0 679118 281 179 102 103 0 62 15 amapchunkpl 152 32447 0 32312 123 105 18 20 0 158 10 amappl16 192 34570 0 33411 328 269 59 72 0 8 0 amappl15 184 206 0 205 1 0 1 1 0 8 0 amappl14 176 1464 0 1460 1 0 1 1 0 8 0 amappl13 168 344 0 343 6 5 1 1 0 8 0 amappl12 160 177 0 173 1 0 1 1 0 8 0 amappl11 152 527 0 523 1 0 1 1 0 8 0 amappl10 144 961 0 959 1 0 1 1 0 8 0 amappl9 136 1810 0 1808 1 0 1 1 0 8 0 amappl8 128 1397 0 1338 5 3 2 3 0 8 0 amappl7 120 1119 0 1111 1 0 1 1 0 8 0 amappl6 112 453 0 433 1 0 1 1 0 8 0 amappl5 104 606 0 599 1 0 1 1 0 8 0 amappl4 96 5052 0 5023 1 0 1 1 0 8 0 amappl3 88 1854 0 1847 1 0 1 1 0 8 0 amappl2 80 39461 0 39405 3 1 2 3 0 8 0 amappl1 72 112110 0 111757 27 18 9 20 0 8 0 amappl 80 13941 0 13879 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 135 0 6 3 0 3 3 0 8 0 uaddrrnd 24 5312 0 5231 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 5312 0 5231 1 0 1 1 0 8 0 vmmpekpl 168 39991 0 39952 2 0 2 2 0 8 0 vmmpepl 168 659183 0 657079 607 458 149 157 0 357 41 vmsppl 272 5240 0 5231 6 5 1 2 0 8 0 pdppl 4096 10630 0 10556 14 3 11 11 0 8 0 pvpl 32 1787607 0 1768201 760 438 322 339 0 265 121 pmappl 200 5311 0 5254 5 1 4 4 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 1320 0 668 19 0 19 19 0 8 0