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 *312664 77765 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(ffffffff821e6c25,ffffffff821fd180,149,ffffffff821c5f56) at __assert+0x2b sys/kern/subr_prf.c:154 buf_free_pages(fffffd803ddd3700) at buf_free_pages+0x1ee sys/kern/vfs_biomem.c:318 buf_dealloc_mem(fffffd803ddd3700) at buf_dealloc_mem+0xe1 sys/kern/vfs_biomem.c:194 buf_put(fffffd803ddd3700) at buf_put+0x16b sys/kern/vfs_bio.c:131 brelse(fffffd803ddd3700) at brelse+0x257 sys/kern/vfs_bio.c:922 vinvalbuf(fffffd803dc6a9d0,2,fffffd803f7c6960,ffff8000ffff9640,0,ffffffffffffffff) at vinvalbuf+0x3b1 sys/kern/vfs_subr.c:1977 ffs_truncate(fffffd803eb374c0,0,4,fffffd803f7c6960) at ffs_truncate+0xeb1 sys/ufs/ffs/ffs_inode.c:326 ufs_rmdir(ffff80001490a258) at ufs_rmdir+0x3af sys/ufs/ufs/ufs_vnops.c:1357 VOP_RMDIR(fffffd803e3a7828,fffffd803dc6a9d0,ffff80001490a358) at VOP_RMDIR+0xf8 sys/kern/vfs_vops.c:474 dounlinkat(ffff8000ffff9640,13,c0037e6246,8) at dounlinkat+0x14c sys/kern/vfs_syscalls.c:1818 syscall(ffff80001490a4d0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:555 Xsyscall(6,145,c00002a000,145,38,98af58) at Xsyscall+0x128 end of kernel end trace frame: 0xc0025f5430, 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(ffffffff821e6c25,ffffffff821fd180,149,ffffffff821c5f56) at __assert+0x2b sys/kern/subr_prf.c:154 buf_free_pages(fffffd803ddd3700) at buf_free_pages+0x1ee sys/kern/vfs_biomem.c:318 buf_dealloc_mem(fffffd803ddd3700) at buf_dealloc_mem+0xe1 sys/kern/vfs_biomem.c:194 buf_put(fffffd803ddd3700) at buf_put+0x16b sys/kern/vfs_bio.c:131 brelse(fffffd803ddd3700) at brelse+0x257 sys/kern/vfs_bio.c:922 vinvalbuf(fffffd803dc6a9d0,2,fffffd803f7c6960,ffff8000ffff9640,0,ffffffffffffffff) at vinvalbuf+0x3b1 sys/kern/vfs_subr.c:1977 ffs_truncate(fffffd803eb374c0,0,4,fffffd803f7c6960) at ffs_truncate+0xeb1 sys/ufs/ffs/ffs_inode.c:326 ufs_rmdir(ffff80001490a258) at ufs_rmdir+0x3af sys/ufs/ufs/ufs_vnops.c:1357 VOP_RMDIR(fffffd803e3a7828,fffffd803dc6a9d0,ffff80001490a358) at VOP_RMDIR+0xf8 sys/kern/vfs_vops.c:474 dounlinkat(ffff8000ffff9640,13,c0037e6246,8) at dounlinkat+0x14c sys/kern/vfs_syscalls.c:1818 syscall(ffff80001490a4d0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:555 Xsyscall(6,145,c00002a000,145,38,98af58) at Xsyscall+0x128 end of kernel end trace frame: 0xc0025f5430, count: -14 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff800014909d30 rbx 0xffff800014909de0 rdx 0x2 rcx 0 rax 0 r8 0xffff800014909cf0 r9 0x1 r10 0 r11 0x56b48700fa8b8a7 r12 0x3000000008 r13 0xffff800014909d40 r14 0x100 r15 0x1 rip 0xffffffff81eb3838 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800014909d20 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-fuzzer) pid=312664 stat=onproc flags process=2 proc=4000000 pri=17, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff5b38,0xffff8000ffff89f8 process=0xffff8000148a26d8 user=0xffff800014905000, vmspace=0xfffffd803f013880 estcpu=0, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 59940 459382 0 0 3 0x14200 acct acct 54745 6184 1 0 3 0x100083 ttyin getty 58108 78832 0 0 3 0x14200 bored sosplice 77765 81607 68927 0 3 0x82 thrsleep syz-fuzzer 77765 184339 68927 0 3 0x4000082 nanosleep syz-fuzzer 77765 348345 68927 0 3 0x4000002 biowait syz-fuzzer 77765 103018 68927 0 3 0x4000082 thrsleep syz-fuzzer 77765 299413 68927 0 3 0x4000082 thrsleep syz-fuzzer *77765 312664 68927 0 7 0x4000002 syz-fuzzer 77765 461462 68927 0 3 0x4000082 thrsleep syz-fuzzer 77765 64913 68927 0 3 0x4000082 thrsleep syz-fuzzer 77765 357871 68927 0 3 0x4000082 thrsleep syz-fuzzer 68927 291834 17732 0 3 0x10008a pause ksh 17732 496242 76558 0 3 0x92 select sshd 76558 355245 1 0 3 0x80 select sshd 58374 25282 93514 73 3 0x100010 ffs_fsync syslogd 93514 248830 1 0 3 0x100082 netio syslogd 20038 500702 0 0 3 0x14200 pgzero zerothread 78168 92330 0 0 3 0x14200 aiodoned aiodoned 26196 211134 0 0 3 0x14200 syncer update 44452 305669 0 0 3 0x14200 cleaner cleaner 25510 9593 0 0 3 0x14200 reaper reaper 65346 427041 0 0 3 0x14200 pgdaemon pagedaemon 87363 136718 0 0 3 0x14200 bored crynlk 59389 500129 0 0 3 0x14200 bored crypto 64815 270029 0 0 3 0x40014200 acpi0 acpi0 97059 110264 0 0 3 0x14200 bored softnet 19695 212631 0 0 3 0x14200 bored systqmp 75648 118623 0 0 3 0x14200 bored systq 76354 351740 0 0 3 0x40014200 bored softclock 34787 462460 0 0 3 0x40014200 idle0 46098 465146 0 0 3 0x14200 bored smr 1 472586 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 9555 6315K 7920K 78643K 31694 0 0 pcb 13 11K 13K 78643K 1040 0 0 rtable 112 12K 12K 78643K 1993 0 0 ifaddr 226 27K 28K 78643K 754 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 338 0 0 iov 0 0K 32K 78643K 1134 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1224 77K 78K 78643K 8031 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 50 0 0 VM map 60 15K 15K 78643K 75 0 0 sem 12 0K 1K 78643K 1569 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12645 0 0 file desc 2 1K 25K 78643K 4160 0 0 sigio 0 0K 0K 78643K 101 0 0 proc 44 30K 55K 78643K 1828 0 0 subproc 0 0K 2K 78643K 501 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 546 0 0 in_multi 25 1K 2K 78643K 522 0 0 ether_multi 1 0K 0K 78643K 40 0 0 mrt 2 0K 0K 78643K 50 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 1117 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 213 480K 499K 78643K 11668 0 0 UVM aobj 130 4K 4K 78643K 131 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 999 0 0 NDP 21 0K 1K 78643K 216 0 0 temp 139 3534K 4175K 78643K 155131 0 0 kqueue 0 0K 0K 78643K 74 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 132 0 126 1 0 1 1 0 8 0 rtpcb 80 494 0 494 8 8 0 1 0 8 0 rtentry 112 576 0 536 2 0 2 2 0 8 0 unpcb 120 5879 0 5869 2 1 1 2 0 8 0 syncache 264 27 0 27 11 11 0 1 0 8 0 sackhl 24 1 0 1 1 1 0 1 0 8 0 tcpqe 32 134 0 134 8 8 0 1 0 8 0 tcpcb 544 1995 0 1991 19 18 1 13 0 8 0 ipq 40 66 0 66 18 18 0 1 0 8 0 ipqe 40 1835 0 1835 18 18 0 1 0 8 0 inpcb 280 5974 0 5970 33 32 1 9 0 8 0 rttmr 72 17 0 17 11 11 0 1 0 8 0 ip6q 72 2 0 2 2 2 0 1 0 8 0 ip6af 40 4 0 4 2 2 0 1 0 8 0 nd6 48 73 0 71 2 1 1 1 0 8 0 pkpcb 40 26 0 26 6 6 0 1 0 8 0 swfcl 56 2 0 0 1 0 1 1 0 8 0 ppxss 1128 61 0 61 18 18 0 1 0 8 0 art_heap8 4096 3 0 2 3 2 1 3 0 8 0 art_heap4 256 2286 0 2096 39 25 14 16 0 8 0 art_table 32 2289 0 2098 2 0 2 2 0 8 0 art_node 16 575 0 537 1 0 1 1 0 8 0 sysvmsgpl 40 75 0 50 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 1567 0 1557 1 0 1 1 0 8 0 shmpl 112 129 0 1 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 8130 0 6724 46 0 46 46 0 8 0 ffsino 240 8130 0 6724 84 1 83 84 0 8 0 nchpl 144 14739 0 14294 60 39 21 60 0 8 0 uvmvnodes 72 7850 0 0 143 0 143 143 0 8 0 vnodes 208 7850 0 0 414 0 414 414 0 8 0 namei 1024 59587 0 59587 7 6 1 1 0 8 1 vcpupl 1984 58 0 0 8 0 8 8 0 8 0 vmpool 520 73 0 15 4 0 4 4 0 8 0 scsiplug 64 1 0 1 1 1 0 1 0 8 0 scxspl 192 57495 0 57493 32 31 1 6 0 8 0 plimitpl 152 434 0 430 1 0 1 1 0 8 0 sigapl 432 4250 0 4242 2 0 2 2 0 8 0 futexpl 56 140907 0 140907 6 6 0 1 0 8 0 knotepl 112 1035 0 1020 2 1 1 2 0 8 0 kqueuepl 104 1356 0 1354 4 3 1 4 0 8 0 pipepl 128 5290 0 5279 16 15 1 2 0 8 0 fdescpl 424 4251 0 4242 2 0 2 2 0 8 0 filepl 120 49309 0 49260 33 30 3 11 0 8 0 lockfpl 104 1702 0 1702 5 5 0 1 0 8 0 lockfspl 48 569 0 569 5 5 0 1 0 8 0 sessionpl 112 45 0 39 1 0 1 1 0 8 0 pgrppl 48 129 0 123 1 0 1 1 0 8 0 ucredpl 96 9493 0 9486 1 0 1 1 0 8 0 zombiepl 144 4243 0 4243 1 0 1 1 0 8 1 processpl 864 4268 0 4243 4 0 4 4 0 8 0 procpl 632 9430 0 9397 5 1 4 5 0 8 0 sosppl 128 103 0 103 15 15 0 1 0 8 0 sockpl 384 12470 0 12455 44 41 3 14 0 8 0 mcl64k 65536 2063 0 2063 199 199 0 64 0 8 0 mcl16k 16384 77 0 77 20 20 0 1 0 8 0 mcl12k 12288 147 0 147 17 17 0 1 0 8 0 mcl9k 9216 77 0 77 14 14 0 1 0 8 0 mcl8k 8192 241 0 241 8 8 0 1 0 8 0 mcl4k 4096 580 0 580 9 9 0 1 0 8 0 mcl2k2 2112 37 0 37 15 15 0 1 0 8 0 mcl2k 2048 75213 0 75172 26 19 7 13 0 8 0 mtagpl 80 1855 0 1855 19 17 2 6 0 8 2 mbufpl 256 165007 0 164934 281 264 17 70 0 8 4 bufpl 256 27373 0 19527 491 0 491 491 0 8 0 anonpl 16 643285 0 621915 256 151 105 107 0 62 12 amapchunkpl 152 26423 0 26227 117 98 19 20 0 158 10 amappl16 192 29995 0 28762 288 225 63 77 0 8 0 amappl15 184 53 0 52 1 0 1 1 0 8 0 amappl14 176 1686 0 1681 1 0 1 1 0 8 0 amappl13 168 387 0 386 1 0 1 1 0 8 0 amappl12 160 129 0 129 5 5 0 1 0 8 0 amappl11 152 496 0 492 1 0 1 1 0 8 0 amappl10 144 440 0 438 1 0 1 1 0 8 0 amappl9 136 1636 0 1635 1 0 1 1 0 8 0 amappl8 128 1231 0 1171 3 1 2 3 0 8 0 amappl7 120 574 0 564 1 0 1 1 0 8 0 amappl6 112 445 0 429 1 0 1 1 0 8 0 amappl5 104 552 0 545 1 0 1 1 0 8 0 amappl4 96 3884 0 3854 1 0 1 1 0 8 0 amappl3 88 2263 0 2252 1 0 1 1 0 8 0 amappl2 80 31848 0 31792 3 1 2 3 0 8 0 amappl1 72 89450 0 89101 26 17 9 20 0 8 0 amappl 80 10173 0 10106 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 130 0 1 3 0 3 3 0 8 0 uaddrrnd 24 4324 0 4242 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 4324 0 4242 1 0 1 1 0 8 0 vmmpekpl 168 36473 0 36439 3 0 3 3 0 8 0 vmmpepl 168 538221 0 536028 421 303 118 155 0 357 8 vmsppl 272 4250 0 4242 2 1 1 2 0 8 0 pdppl 4096 8654 0 8572 15 3 12 12 0 8 1 pvpl 32 1650928 0 1628289 653 339 314 333 0 265 112 pmappl 200 4323 0 4257 5 1 4 4 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 1208 0 577 23 3 20 22 0 8 0