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 *290610 65332 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(ffffffff821e3209,ffffffff821f7fae,149,ffffffff821c11d6) at __assert+0x2b sys/kern/subr_prf.c:154 buf_free_pages(fffffd8025bd9700) at buf_free_pages+0x1ee sys/kern/vfs_biomem.c:318 buf_dealloc_mem(fffffd8025bd9700) at buf_dealloc_mem+0xe1 sys/kern/vfs_biomem.c:194 buf_put(fffffd8025bd9700) at buf_put+0x16b sys/kern/vfs_bio.c:131 brelse(fffffd8025bd9700) at brelse+0x257 sys/kern/vfs_bio.c:922 vinvalbuf(fffffd803766e8f8,2,fffffd803f7c6c00,ffff8000ffff3160,0,ffffffffffffffff) at vinvalbuf+0x3b1 sys/kern/vfs_subr.c:1977 ffs_truncate(fffffd803c9c31e0,0,4,fffffd803f7c6c00) at ffs_truncate+0xeb1 sys/ufs/ffs/ffs_inode.c:326 ufs_rmdir(ffff8000159314d8) at ufs_rmdir+0x3af sys/ufs/ufs/ufs_vnops.c:1357 VOP_RMDIR(fffffd803c8cb350,fffffd803766e8f8,ffff8000159315d8) at VOP_RMDIR+0xf8 sys/kern/vfs_vops.c:474 dounlinkat(ffff8000ffff3160,a,c00359c100,8) at dounlinkat+0x14c sys/kern/vfs_syscalls.c:1818 syscall(ffff800015931750) at syscall+0x507 sys/arch/amd64/amd64/trap.c:555 Xsyscall(0,145,c000028000,145,100,8) at Xsyscall+0x128 end of kernel end trace frame: 0xc000049978, 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(ffffffff821e3209,ffffffff821f7fae,149,ffffffff821c11d6) at __assert+0x2b sys/kern/subr_prf.c:154 buf_free_pages(fffffd8025bd9700) at buf_free_pages+0x1ee sys/kern/vfs_biomem.c:318 buf_dealloc_mem(fffffd8025bd9700) at buf_dealloc_mem+0xe1 sys/kern/vfs_biomem.c:194 buf_put(fffffd8025bd9700) at buf_put+0x16b sys/kern/vfs_bio.c:131 brelse(fffffd8025bd9700) at brelse+0x257 sys/kern/vfs_bio.c:922 vinvalbuf(fffffd803766e8f8,2,fffffd803f7c6c00,ffff8000ffff3160,0,ffffffffffffffff) at vinvalbuf+0x3b1 sys/kern/vfs_subr.c:1977 ffs_truncate(fffffd803c9c31e0,0,4,fffffd803f7c6c00) at ffs_truncate+0xeb1 sys/ufs/ffs/ffs_inode.c:326 ufs_rmdir(ffff8000159314d8) at ufs_rmdir+0x3af sys/ufs/ufs/ufs_vnops.c:1357 VOP_RMDIR(fffffd803c8cb350,fffffd803766e8f8,ffff8000159315d8) at VOP_RMDIR+0xf8 sys/kern/vfs_vops.c:474 dounlinkat(ffff8000ffff3160,a,c00359c100,8) at dounlinkat+0x14c sys/kern/vfs_syscalls.c:1818 syscall(ffff800015931750) at syscall+0x507 sys/arch/amd64/amd64/trap.c:555 Xsyscall(0,145,c000028000,145,100,8) at Xsyscall+0x128 end of kernel end trace frame: 0xc000049978, count: -14 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff800015930fb0 rbx 0xffff800015931060 rdx 0x2 rcx 0 rax 0 r8 0xffff800015930f70 r9 0x1 r10 0 r11 0xc5abfc7c1bd16bc0 r12 0x3000000008 r13 0xffff800015930fc0 r14 0x100 r15 0x1 rip 0xffffffff81e06468 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800015930fa0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-fuzzer) pid=290610 stat=onproc flags process=2 proc=4000000 pri=17, usrpri=51, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff38c8,0xffff8000ffff2790 process=0xffff8000148a26d8 user=0xffff80001592c000, vmspace=0xfffffd803f013aa0 estcpu=34, cpticks=8, pctcpu=0.10 user=0, sys=2, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 89320 236210 65332 0 3 0x82 piperd syz-executor.1 73458 149661 1 0 3 0x100083 ttyin getty 85477 363226 0 0 3 0x14200 acct acct 92412 4919 0 0 3 0x14200 bored sosplice 65332 497470 2214 0 3 0x82 thrsleep syz-fuzzer 65332 146320 2214 0 3 0x4000082 nanosleep syz-fuzzer 65332 131309 2214 0 3 0x4000082 thrsleep syz-fuzzer 65332 521588 2214 0 3 0x4000082 thrsleep syz-fuzzer 65332 28549 2214 0 3 0x4000082 thrsleep syz-fuzzer 65332 66945 2214 0 3 0x4000082 thrsleep syz-fuzzer 65332 152844 2214 0 3 0x4000082 thrsleep syz-fuzzer *65332 290610 2214 0 7 0x4000002 syz-fuzzer 2214 262842 77813 0 3 0x10008a pause ksh 77813 496368 51694 0 3 0x92 select sshd 51694 432979 1 0 3 0x80 select sshd 353 212305 22890 73 3 0x100090 kqread syslogd 22890 227675 1 0 3 0x100082 netio syslogd 77721 404061 1 77 3 0x100090 poll dhclient 19604 328284 1 0 3 0x80 poll dhclient 35783 422701 0 0 3 0x14200 pgzero zerothread 49935 362847 0 0 3 0x14200 aiodoned aiodoned 18385 91810 0 0 3 0x14200 syncer update 91251 271779 0 0 3 0x14200 cleaner cleaner 91192 306568 0 0 3 0x14200 reaper reaper 22820 330316 0 0 3 0x14200 pgdaemon pagedaemon 92853 117208 0 0 3 0x14200 bored crynlk 22456 287706 0 0 3 0x14200 bored crypto 7132 487192 0 0 3 0x40014200 acpi0 acpi0 87122 156428 0 0 3 0x14200 bored softnet 33557 386668 0 0 3 0x14200 bored systqmp 16566 61564 0 0 3 0x14200 bored systq 68463 469474 0 0 3 0x40014200 bored softclock 86904 296625 0 0 3 0x40014200 idle0 2421 287771 0 0 3 0x14200 bored smr 1 36948 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 9578 7137K 8353K 78643K 17178 0 0 pcb 13 10K 12K 78643K 1787 0 0 rtable 84 7K 8K 78643K 1719 0 0 ifaddr 77 15K 17K 78643K 454 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 205 0 0 iov 0 0K 24K 78643K 594 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1226 77K 78K 78643K 3764 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 26 6K 6K 78643K 40 0 0 sem 12 0K 0K 78643K 754 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12645 0 0 file desc 3 5K 25K 78643K 2437 0 0 sigio 0 0K 0K 78643K 36 0 0 proc 49 38K 63K 78643K 1231 0 0 subproc 16 1K 2K 78643K 306 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 247 0 0 in_multi 11 0K 2K 78643K 317 0 0 ether_multi 1 0K 0K 78643K 14 0 0 mrt 0 0K 0K 78643K 3 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 660 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 144 226K 243K 78643K 7095 0 0 UVM aobj 130 4K 4K 78643K 134 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 1466 0 0 NDP 20 0K 0K 78643K 152 0 0 temp 210 3543K 4188K 78643K 83123 0 0 kqueue 0 0K 0K 78643K 23 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 70 0 67 1 0 1 1 0 8 0 rtpcb 80 214 0 212 1 0 1 1 0 8 0 rtentry 112 319 0 293 2 0 2 2 0 8 0 unpcb 120 2292 0 2281 1 0 1 1 0 8 0 syncache 264 11 0 11 6 5 1 1 0 8 1 tcpqe 32 80 0 80 4 4 0 1 0 8 0 tcpcb 544 2393 0 2389 19 18 1 13 0 8 0 ipq 40 22 0 22 7 7 0 1 0 8 0 ipqe 40 567 0 567 7 7 0 1 0 8 0 inpcb 280 5731 0 5724 18 16 2 9 0 8 1 rttmr 72 2 0 1 2 1 1 1 0 8 0 nd6 48 44 0 44 6 5 1 1 0 8 1 pkpcb 40 16 0 16 5 5 0 1 0 8 0 swfcl 56 5 0 0 1 0 1 1 0 8 0 ppxss 1128 43 0 43 9 9 0 1 0 8 0 art_heap8 4096 4 0 3 4 2 2 3 0 8 1 art_heap4 256 1369 0 1216 31 17 14 15 0 8 2 art_table 32 1373 0 1219 2 0 2 2 0 8 0 art_node 16 318 0 294 1 0 1 1 0 8 0 sysvmsgpl 40 30 0 19 1 0 1 1 0 8 0 semupl 112 2 0 2 1 1 0 1 0 8 0 semapl 112 752 0 742 1 0 1 1 0 8 0 shmpl 112 132 0 4 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 5149 0 3761 46 0 46 46 0 8 0 ffsino 240 5149 0 3761 83 0 83 83 0 8 0 nchpl 144 8982 0 8536 60 41 19 60 0 8 0 uvmvnodes 72 7097 0 0 130 0 130 130 0 8 0 vnodes 208 7097 0 0 374 0 374 374 0 8 0 namei 1024 31712 0 31712 4 3 1 1 0 8 1 vcpupl 1984 24 0 0 3 0 3 3 0 8 0 vmpool 520 38 0 14 2 0 2 2 0 8 0 scsiplug 64 2 0 2 2 2 0 1 0 8 0 scxspl 192 37897 0 37897 22 21 1 7 0 8 1 plimitpl 152 202 0 196 1 0 1 1 0 8 0 sigapl 432 2562 0 2551 2 0 2 2 0 8 0 futexpl 56 76845 0 76845 5 4 1 1 0 8 1 knotepl 112 996 0 977 2 1 1 2 0 8 0 kqueuepl 104 1120 0 1118 4 3 1 4 0 8 0 pipepl 112 1476 0 1461 7 5 2 2 0 8 1 fdescpl 424 2563 0 2551 2 0 2 2 0 8 0 filepl 120 25177 0 25102 19 14 5 11 0 8 1 lockfpl 104 868 0 867 1 0 1 1 0 8 0 lockfspl 48 276 0 275 1 0 1 1 0 8 0 sessionpl 112 35 0 26 1 0 1 1 0 8 0 pgrppl 48 65 0 56 1 0 1 1 0 8 0 ucredpl 96 3613 0 3606 1 0 1 1 0 8 0 zombiepl 144 2551 0 2551 1 0 1 1 0 8 1 processpl 864 2579 0 2551 4 0 4 4 0 8 0 procpl 632 5479 0 5444 4 0 4 4 0 8 0 sosppl 128 33 0 33 9 9 0 1 0 8 0 sockpl 384 8306 0 8286 25 20 5 14 0 8 1 mcl64k 65536 1013 0 1013 96 67 29 33 0 8 29 mcl16k 16384 50 0 50 8 7 1 1 0 8 1 mcl12k 12288 77 0 77 7 6 1 1 0 8 1 mcl9k 9216 61 0 61 9 8 1 1 0 8 1 mcl8k 8192 128 0 128 7 6 1 1 0 8 1 mcl4k 4096 282 0 282 7 6 1 1 0 8 1 mcl2k2 2112 24 0 24 12 12 0 1 0 8 0 mcl2k 2048 72495 0 72451 24 17 7 14 0 8 0 mtagpl 80 87 0 87 10 9 1 1 0 8 1 mbufpl 256 140251 0 140185 112 96 16 38 0 8 8 bufpl 256 18347 0 10576 486 0 486 486 0 8 0 anonpl 16 403931 0 385381 157 74 83 102 0 62 0 amapchunkpl 152 15601 0 15482 65 55 10 16 0 158 4 amappl16 192 17759 0 16722 177 115 62 73 0 8 8 amappl15 184 507 0 506 2 1 1 1 0 8 0 amappl14 176 254 0 250 2 1 1 1 0 8 0 amappl13 168 195 0 195 4 4 0 1 0 8 0 amappl12 160 333 0 333 3 3 0 1 0 8 0 amappl11 152 399 0 388 1 0 1 1 0 8 0 amappl10 144 595 0 593 2 1 1 1 0 8 0 amappl9 136 909 0 904 1 0 1 1 0 8 0 amappl8 128 458 0 417 2 0 2 2 0 8 0 amappl7 120 692 0 684 1 0 1 1 0 8 0 amappl6 112 376 0 362 1 0 1 1 0 8 0 amappl5 104 630 0 621 1 0 1 1 0 8 0 amappl4 96 2651 0 2625 1 0 1 1 0 8 0 amappl3 88 718 0 709 1 0 1 1 0 8 0 amappl2 80 18849 0 18790 3 1 2 3 0 8 0 amappl1 72 57066 0 56680 27 18 9 20 0 8 0 amappl 80 6030 0 5984 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 133 0 4 3 0 3 3 0 8 0 uaddrrnd 24 2601 0 2551 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 2601 0 2551 1 0 1 1 0 8 0 vmmpekpl 168 20514 0 20480 2 0 2 2 0 8 0 vmmpepl 168 321567 0 319592 304 161 143 147 0 357 41 vmsppl 272 2562 0 2551 4 3 1 2 0 8 0 pdppl 4096 5208 0 5154 12 4 8 8 0 8 0 pvpl 32 1053822 0 1032332 456 181 275 321 0 265 92 pmappl 200 2600 0 2565 5 2 3 3 0 8 1 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 902 0 248 20 1 19 19 0 8 0