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 *456204 40406 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(ffffffff821e5ca2,ffffffff821f71ee,149,ffffffff821c0770) at __assert+0x2b sys/kern/subr_prf.c:154 buf_free_pages(fffffd8027dda500) at buf_free_pages+0x1ee sys/kern/vfs_biomem.c:318 buf_dealloc_mem(fffffd8027dda500) at buf_dealloc_mem+0xe1 sys/kern/vfs_biomem.c:194 buf_put(fffffd8027dda500) at buf_put+0x16b sys/kern/vfs_bio.c:131 brelse(fffffd8027dda500) at brelse+0x257 sys/kern/vfs_bio.c:922 vinvalbuf(fffffd803e7df360,2,fffffd803f7c6900,ffff8000ffff89e8,0,ffffffffffffffff) at vinvalbuf+0x3b1 sys/kern/vfs_subr.c:1977 ffs_truncate(fffffd803928ee18,0,4,fffffd803f7c6900) at ffs_truncate+0xeb1 sys/ufs/ffs/ffs_inode.c:326 ufs_rmdir(ffff80001490aab8) at ufs_rmdir+0x3af sys/ufs/ufs/ufs_vnops.c:1357 VOP_RMDIR(fffffd8038601768,fffffd803e7df360,ffff80001490abb8) at VOP_RMDIR+0xf8 sys/kern/vfs_vops.c:474 dounlinkat(ffff8000ffff89e8,b,c002ac7d70,8) at dounlinkat+0x14c sys/kern/vfs_syscalls.c:1818 syscall(ffff80001490ad30) at syscall+0x507 sys/arch/amd64/amd64/trap.c:555 Xsyscall(0,145,c00002a000,145,38,200) at Xsyscall+0x128 end of kernel end trace frame: 0xc002489658, 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(ffffffff821e5ca2,ffffffff821f71ee,149,ffffffff821c0770) at __assert+0x2b sys/kern/subr_prf.c:154 buf_free_pages(fffffd8027dda500) at buf_free_pages+0x1ee sys/kern/vfs_biomem.c:318 buf_dealloc_mem(fffffd8027dda500) at buf_dealloc_mem+0xe1 sys/kern/vfs_biomem.c:194 buf_put(fffffd8027dda500) at buf_put+0x16b sys/kern/vfs_bio.c:131 brelse(fffffd8027dda500) at brelse+0x257 sys/kern/vfs_bio.c:922 vinvalbuf(fffffd803e7df360,2,fffffd803f7c6900,ffff8000ffff89e8,0,ffffffffffffffff) at vinvalbuf+0x3b1 sys/kern/vfs_subr.c:1977 ffs_truncate(fffffd803928ee18,0,4,fffffd803f7c6900) at ffs_truncate+0xeb1 sys/ufs/ffs/ffs_inode.c:326 ufs_rmdir(ffff80001490aab8) at ufs_rmdir+0x3af sys/ufs/ufs/ufs_vnops.c:1357 VOP_RMDIR(fffffd8038601768,fffffd803e7df360,ffff80001490abb8) at VOP_RMDIR+0xf8 sys/kern/vfs_vops.c:474 dounlinkat(ffff8000ffff89e8,b,c002ac7d70,8) at dounlinkat+0x14c sys/kern/vfs_syscalls.c:1818 syscall(ffff80001490ad30) at syscall+0x507 sys/arch/amd64/amd64/trap.c:555 Xsyscall(0,145,c00002a000,145,38,200) at Xsyscall+0x128 end of kernel end trace frame: 0xc002489658, count: -14 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80001490a590 rbx 0xffff80001490a640 rdx 0x2 rcx 0 rax 0 r8 0xffff80001490a550 r9 0x1 r10 0 r11 0x475894e07c547620 r12 0x3000000008 r13 0xffff80001490a5a0 r14 0x100 r15 0x1 rip 0xffffffff8147e928 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80001490a580 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-fuzzer) pid=456204 stat=onproc flags process=2 proc=4000000 pri=17, usrpri=70, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff5b38,0xffff8000ffff93d8 process=0xffff8000148a2378 user=0xffff800014905000, vmspace=0xfffffd803f013440 estcpu=20, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 91571 362457 0 0 3 0x14200 acct acct 92706 494361 1 0 3 0x100083 ttyin getty 55285 345851 0 0 3 0x14200 bored sosplice 40406 164418 2225 0 3 0x82 thrsleep syz-fuzzer 40406 134226 2225 0 3 0x4000082 nanosleep syz-fuzzer 40406 201843 2225 0 3 0x4000082 thrsleep syz-fuzzer 40406 67002 2225 0 3 0x4000082 thrsleep syz-fuzzer 40406 468668 2225 0 3 0x4000082 thrsleep syz-fuzzer *40406 456204 2225 0 7 0x4000002 syz-fuzzer 40406 203275 2225 0 3 0x4000082 thrsleep syz-fuzzer 40406 98635 2225 0 3 0x4000082 thrsleep syz-fuzzer 2225 522136 46286 0 3 0x10008a pause ksh 46286 22758 99391 0 3 0x92 select sshd 99391 8524 1 0 3 0x80 select sshd 7469 118114 9406 73 3 0x100010 ffs_fsync syslogd 9406 393163 1 0 3 0x100082 netio syslogd 32498 474961 1 77 3 0x100090 poll dhclient 31478 415120 1 0 3 0x80 poll dhclient 83569 94077 0 0 3 0x14200 pgzero zerothread 45736 293633 0 0 3 0x14200 aiodoned aiodoned 34890 53648 0 0 3 0x14200 syncer update 20303 56503 0 0 3 0x14200 cleaner cleaner 10550 474617 0 0 3 0x14200 reaper reaper 74585 425628 0 0 3 0x14200 pgdaemon pagedaemon 29231 438753 0 0 3 0x14200 bored crynlk 89001 288587 0 0 3 0x14200 bored crypto 86398 32339 0 0 3 0x40014200 acpi0 acpi0 92838 496929 0 0 3 0x14200 bored softnet 11653 435913 0 0 3 0x14200 bored systqmp 93309 473579 0 0 3 0x14200 bored systq 40746 184973 0 0 3 0x40014200 bored softclock 83159 343255 0 0 3 0x40014200 idle0 97115 71598 0 0 3 0x14200 bored smr 1 470603 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 9570 7007K 9066K 78643K 24783 0 0 pcb 13 11K 12K 78643K 593 0 0 rtable 87 11K 14K 78643K 2161 0 0 ifaddr 74 17K 21K 78643K 568 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 169 0 0 iov 0 0K 28K 78643K 559 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1241 78K 78K 78643K 5522 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 57 0 0 VM map 30 7K 7K 78643K 48 0 0 sem 12 0K 1K 78643K 606 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12645 0 0 file desc 2 1K 25K 78643K 2631 0 0 sigio 0 0K 0K 78643K 34 0 0 proc 50 38K 63K 78643K 1399 0 0 subproc 0 0K 2K 78643K 344 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 258 0 0 in_multi 12 0K 2K 78643K 380 0 0 ether_multi 1 0K 0K 78643K 30 0 0 mrt 1 0K 0K 78643K 16 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 126 556K 556K 78643K 126 0 0 exec 0 0K 1K 78643K 722 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 165 204K 230K 78643K 7858 0 0 UVM aobj 130 5K 5K 78643K 178 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 618 0 0 NDP 19 0K 0K 78643K 189 0 0 temp 186 3538K 4180K 78643K 97420 0 0 kqueue 0 0K 0K 78643K 25 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 84 0 81 1 0 1 1 0 8 0 rtpcb 80 285 0 283 1 0 1 1 0 8 0 rtentry 112 398 0 372 2 0 2 2 0 8 0 unpcb 120 1546 0 1535 5 4 1 2 0 8 0 syncache 264 23 0 23 11 11 0 1 0 8 0 tcpqe 32 252 0 252 7 7 0 1 0 8 0 tcpcb 544 1901 0 1897 3 2 1 2 0 8 0 ipq 40 24 0 24 8 8 0 1 0 8 0 ipqe 40 744 0 744 8 8 0 1 0 8 0 inpcb 280 4541 0 4534 46 45 1 13 0 8 0 rttmr 72 7 0 6 4 3 1 1 0 8 0 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 51 0 51 2 2 0 1 0 8 0 pkpcb 40 4 0 4 2 2 0 1 0 8 0 swfcl 56 2 0 0 1 0 1 1 0 8 0 ppxss 1128 57 0 57 11 11 0 1 0 8 0 art_heap8 4096 12 0 11 5 4 1 3 0 8 0 art_heap4 256 1633 0 1481 28 14 14 16 0 8 0 art_table 32 1645 0 1492 3 1 2 3 0 8 0 art_node 16 397 0 373 1 0 1 1 0 8 0 sysvmsgpl 40 46 0 31 1 0 1 1 0 8 0 semupl 112 4 0 4 1 1 0 1 0 8 0 semapl 112 602 0 592 1 0 1 1 0 8 0 shmpl 112 176 0 48 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 5461 0 4059 46 0 46 46 0 8 0 ffsino 240 5461 0 4059 83 0 83 83 0 8 0 nchpl 144 9870 0 9392 60 39 21 60 0 8 0 uvmvnodes 72 6353 0 0 116 0 116 116 0 8 0 vnodes 208 6353 0 0 335 0 335 335 0 8 0 namei 1024 35984 0 35984 2 1 1 1 0 8 1 vcpupl 1984 28 0 0 4 0 4 4 0 8 0 vmpool 520 46 0 18 2 0 2 2 0 8 0 scsiplug 64 2 0 2 1 1 0 1 0 8 0 scxspl 192 30879 0 30878 17 16 1 7 0 8 0 plimitpl 152 225 0 220 1 0 1 1 0 8 0 sigapl 432 2749 0 2739 2 0 2 2 0 8 0 futexpl 56 82765 0 82765 2 2 0 1 0 8 0 knotepl 112 811 0 790 1 0 1 1 0 8 0 kqueuepl 104 792 0 790 1 0 1 1 0 8 0 pipepl 112 3404 0 3393 10 9 1 3 0 8 0 fdescpl 424 2750 0 2739 2 0 2 2 0 8 0 filepl 120 28365 0 28309 34 31 3 11 0 8 0 lockfpl 104 896 0 895 1 0 1 1 0 8 0 lockfspl 48 322 0 321 1 0 1 1 0 8 0 sessionpl 112 36 0 28 1 0 1 1 0 8 0 pgrppl 48 58 0 50 1 0 1 1 0 8 0 ucredpl 96 4097 0 4089 1 0 1 1 0 8 0 zombiepl 144 2740 0 2740 1 0 1 1 0 8 1 processpl 864 2767 0 2740 4 0 4 4 0 8 0 procpl 632 6140 0 6106 5 1 4 5 0 8 0 sosppl 128 39 0 39 10 10 0 1 0 8 0 sockpl 384 6410 0 6390 78 75 3 22 0 8 0 mcl64k 65536 1539 0 1539 131 131 0 64 0 8 0 mcl16k 16384 41 0 41 9 9 0 1 0 8 0 mcl12k 12288 83 0 83 12 12 0 1 0 8 0 mcl9k 9216 40 0 40 13 13 0 1 0 8 0 mcl8k 8192 147 0 147 4 4 0 1 0 8 0 mcl4k 4096 312 0 312 6 6 0 1 0 8 0 mcl2k2 2112 26 0 26 14 14 0 1 0 8 0 mcl2k 2048 72650 0 72610 22 16 6 18 0 8 0 mtagpl 80 127 0 127 5 5 0 1 0 8 0 mbufpl 256 142754 0 142692 129 122 7 38 0 8 0 bufpl 256 15601 0 9248 399 1 398 398 0 8 0 anonpl 16 443736 0 424029 180 82 98 98 0 62 14 amapchunkpl 152 16421 0 16273 64 47 17 20 0 158 10 amappl16 192 19708 0 18615 194 137 57 68 0 8 0 amappl15 184 970 0 970 3 3 0 1 0 8 0 amappl14 176 149 0 147 1 0 1 1 0 8 0 amappl13 168 581 0 581 4 3 1 1 0 8 1 amappl12 160 313 0 309 1 0 1 1 0 8 0 amappl11 152 183 0 172 1 0 1 1 0 8 0 amappl10 144 339 0 338 1 0 1 1 0 8 0 amappl9 136 1125 0 1119 1 0 1 1 0 8 0 amappl8 128 657 0 607 2 0 2 2 0 8 0 amappl7 120 454 0 448 1 0 1 1 0 8 0 amappl6 112 177 0 164 1 0 1 1 0 8 0 amappl5 104 603 0 592 1 0 1 1 0 8 0 amappl4 96 3570 0 3542 1 0 1 1 0 8 0 amappl3 88 214 0 208 1 0 1 1 0 8 0 amappl2 80 20758 0 20699 3 1 2 3 0 8 0 amappl1 72 61159 0 60786 26 17 9 20 0 8 0 amappl 80 6720 0 6664 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 177 0 48 4 1 3 3 0 8 0 uaddrrnd 24 2796 0 2739 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 2796 0 2739 1 0 1 1 0 8 0 vmmpekpl 168 25469 0 25440 2 0 2 2 0 8 0 vmmpepl 168 348822 0 346784 284 172 112 145 0 357 8 vmsppl 272 2749 0 2739 3 2 1 2 0 8 0 pdppl 4096 5598 0 5542 10 1 9 9 0 8 0 pvpl 32 1055230 0 1033454 496 186 310 325 0 265 122 pmappl 200 2795 0 2757 3 0 3 3 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 839 0 315 18 1 17 17 0 8 0