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 *384949 90344 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(ffffffff821e7905,ffffffff821f9e1b,149,ffffffff821c32de) at __assert+0x2b sys/kern/subr_prf.c:154 buf_free_pages(fffffd803ada7400) at buf_free_pages+0x1ee sys/kern/vfs_biomem.c:318 buf_dealloc_mem(fffffd803ada7400) at buf_dealloc_mem+0xe1 sys/kern/vfs_biomem.c:194 buf_put(fffffd803ada7400) at buf_put+0x16b sys/kern/vfs_bio.c:131 brelse(fffffd803ada7400) at brelse+0x257 sys/kern/vfs_bio.c:922 vinvalbuf(fffffd803a1fd278,2,fffffd803f7c67e0,ffff8000ffff4c68,0,ffffffffffffffff) at vinvalbuf+0x3b1 sys/kern/vfs_subr.c:1977 ffs_truncate(fffffd8039a0fe10,0,4,fffffd803f7c67e0) at ffs_truncate+0xeb1 sys/ufs/ffs/ffs_inode.c:326 ufs_rmdir(ffff8000149046d8) at ufs_rmdir+0x3af sys/ufs/ufs/ufs_vnops.c:1357 VOP_RMDIR(fffffd802efebd08,fffffd803a1fd278,ffff8000149047d8) at VOP_RMDIR+0xf8 sys/kern/vfs_vops.c:474 dounlinkat(ffff8000ffff4c68,e,c002d82416,8) at dounlinkat+0x14c sys/kern/vfs_syscalls.c:1818 syscall(ffff800014904950) at syscall+0x507 sys/arch/amd64/amd64/trap.c:555 Xsyscall(6,145,c00002a000,145,38,9634ee) at Xsyscall+0x128 end of kernel end trace frame: 0xc000e6f658, 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(ffffffff821e7905,ffffffff821f9e1b,149,ffffffff821c32de) at __assert+0x2b sys/kern/subr_prf.c:154 buf_free_pages(fffffd803ada7400) at buf_free_pages+0x1ee sys/kern/vfs_biomem.c:318 buf_dealloc_mem(fffffd803ada7400) at buf_dealloc_mem+0xe1 sys/kern/vfs_biomem.c:194 buf_put(fffffd803ada7400) at buf_put+0x16b sys/kern/vfs_bio.c:131 brelse(fffffd803ada7400) at brelse+0x257 sys/kern/vfs_bio.c:922 vinvalbuf(fffffd803a1fd278,2,fffffd803f7c67e0,ffff8000ffff4c68,0,ffffffffffffffff) at vinvalbuf+0x3b1 sys/kern/vfs_subr.c:1977 ffs_truncate(fffffd8039a0fe10,0,4,fffffd803f7c67e0) at ffs_truncate+0xeb1 sys/ufs/ffs/ffs_inode.c:326 ufs_rmdir(ffff8000149046d8) at ufs_rmdir+0x3af sys/ufs/ufs/ufs_vnops.c:1357 VOP_RMDIR(fffffd802efebd08,fffffd803a1fd278,ffff8000149047d8) at VOP_RMDIR+0xf8 sys/kern/vfs_vops.c:474 dounlinkat(ffff8000ffff4c68,e,c002d82416,8) at dounlinkat+0x14c sys/kern/vfs_syscalls.c:1818 syscall(ffff800014904950) at syscall+0x507 sys/arch/amd64/amd64/trap.c:555 Xsyscall(6,145,c00002a000,145,38,9634ee) at Xsyscall+0x128 end of kernel end trace frame: 0xc000e6f658, count: -14 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff8000149041b0 rbx 0xffff800014904260 rdx 0x2 rcx 0 rax 0 r8 0xffff800014904170 r9 0x1 r10 0 r11 0x6e4befe2a8d9520f r12 0x3000000008 r13 0xffff8000149041c0 r14 0x100 r15 0x1 rip 0xffffffff817df538 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000149041a0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-fuzzer) pid=384949 stat=onproc flags process=2 proc=4000000 pri=17, usrpri=52, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff4288,0xffff8000ffff9160 process=0xffff8000148a2018 user=0xffff8000148ff000, vmspace=0xfffffd803f013220 estcpu=2, cpticks=3, pctcpu=0.0 user=0, sys=2, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 57645 305210 57761 0 2 0x10008a sh 57761 160619 90344 0 3 0x82 wait syz-executor.0 24875 420343 0 0 3 0x14200 acct acct 44008 128042 1 0 3 0x100083 ttyin getty 47337 295457 0 0 3 0x14200 bored sosplice 90344 390268 75218 0 3 0x82 thrsleep syz-fuzzer 90344 246988 75218 0 3 0x4000082 nanosleep syz-fuzzer 90344 386196 75218 0 3 0x4000082 thrsleep syz-fuzzer 90344 29653 75218 0 3 0x4000082 thrsleep syz-fuzzer *90344 384949 75218 0 7 0x4000002 syz-fuzzer 90344 440291 75218 0 3 0x4000082 thrsleep syz-fuzzer 90344 348295 75218 0 3 0x4000082 thrsleep syz-fuzzer 90344 84607 75218 0 3 0x4000082 thrsleep syz-fuzzer 75218 400513 2049 0 3 0x10008a pause ksh 2049 328717 77878 0 3 0x92 select sshd 77878 346657 1 0 3 0x80 select sshd 15492 23322 97967 73 3 0x100010 ffs_fsync syslogd 97967 352455 1 0 3 0x100082 netio syslogd 5134 141323 1 77 3 0x100090 poll dhclient 38615 32521 1 0 3 0x80 poll dhclient 62050 46366 0 0 2 0x14200 zerothread 24495 8281 0 0 3 0x14200 aiodoned aiodoned 14299 81230 0 0 3 0x14200 syncer update 18077 426495 0 0 3 0x14200 cleaner cleaner 47616 283514 0 0 3 0x14200 reaper reaper 45214 139526 0 0 3 0x14200 pgdaemon pagedaemon 25527 141738 0 0 3 0x14200 bored crynlk 71898 465041 0 0 3 0x14200 bored crypto 55118 259271 0 0 3 0x40014200 acpi0 acpi0 13263 209984 0 0 3 0x14200 bored softnet 9209 436311 0 0 3 0x14200 bored systqmp 75531 367430 0 0 3 0x14200 bored systq 33288 516340 0 0 3 0x40014200 bored softclock 88695 174536 0 0 3 0x40014200 idle0 81227 38988 0 0 3 0x14200 bored smr 1 150919 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 9560 7006K 7775K 78643K 18374 0 0 pcb 13 9K 9K 78643K 601 0 0 rtable 122 12K 13K 78643K 2182 0 0 ifaddr 81 17K 17K 78643K 435 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 163 0 0 iov 0 0K 28K 78643K 578 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1225 77K 78K 78643K 4156 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 38 0 0 VM map 34 8K 8K 78643K 41 0 0 sem 12 1K 1K 78643K 361 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12645 0 0 file desc 4 9K 25K 78643K 2637 0 0 sigio 0 0K 0K 78643K 20 0 0 proc 49 38K 55K 78643K 1196 0 0 subproc 16 1K 2K 78643K 310 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 245 0 0 in_multi 30 2K 2K 78643K 370 0 0 ether_multi 1 0K 0K 78643K 20 0 0 mrt 0 0K 0K 78643K 9 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 84 371K 371K 78643K 84 0 0 exec 0 0K 1K 78643K 636 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 156 260K 280K 78643K 7502 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 0K 78643K 591 0 0 NDP 21 0K 0K 78643K 146 0 0 temp 204 3539K 4180K 78643K 88715 0 0 kqueue 0 0K 0K 78643K 33 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 79 0 72 1 0 1 1 0 8 0 rtpcb 80 3244 0 3242 1 0 1 1 0 8 0 rtentry 112 375 0 330 2 0 2 2 0 8 0 unpcb 120 1104 0 1092 1 0 1 1 0 8 0 syncache 264 13 0 13 6 6 0 1 0 8 0 sackhl 24 1 0 1 1 1 0 1 0 8 0 tcpqe 32 126 0 126 3 3 0 1 0 8 0 tcpcb 544 987 0 983 4 3 1 3 0 8 0 ipq 40 15 0 15 8 8 0 1 0 8 0 ipqe 40 166 0 166 8 8 0 1 0 8 0 inpcb 280 2856 0 2849 13 12 1 4 0 8 0 rttmr 72 4 0 3 3 2 1 1 0 8 0 ip6q 72 1 0 1 1 1 0 1 0 8 0 ip6af 40 1 0 1 1 1 0 1 0 8 0 nd6 48 47 0 44 1 0 1 1 0 8 0 pkpcb 40 3 0 3 2 2 0 1 0 8 0 swfcl 56 6 0 0 1 0 1 1 0 8 0 ppxss 1128 41 0 41 10 10 0 1 0 8 0 art_heap8 4096 9 0 7 6 4 2 3 0 8 0 art_heap4 256 1653 0 1399 23 5 18 18 0 8 0 art_table 32 1662 0 1406 3 0 3 3 0 8 0 art_node 16 373 0 331 1 0 1 1 0 8 0 sysvmsgpl 40 47 0 34 1 0 1 1 0 8 0 semupl 112 3 0 3 1 1 0 1 0 8 0 semapl 112 357 0 347 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 5395 0 3999 46 0 46 46 0 8 0 ffsino 240 5395 0 3999 83 0 83 83 0 8 0 nchpl 144 9721 0 9267 61 41 20 61 0 8 0 uvmvnodes 72 6876 0 0 126 0 126 126 0 8 0 vnodes 208 6876 0 0 362 0 362 362 0 8 0 namei 1024 33250 0 33250 3 2 1 1 0 8 1 vcpupl 1984 33 0 1 4 0 4 4 0 8 0 vmpool 520 39 0 7 3 0 3 3 0 8 0 scsiplug 64 5 0 5 4 4 0 1 0 8 0 scxspl 192 35259 0 35258 22 21 1 7 0 8 0 plimitpl 152 243 0 237 1 0 1 1 0 8 0 sigapl 432 2761 0 2749 2 0 2 2 0 8 0 futexpl 56 79513 0 79513 3 3 0 1 0 8 0 knotepl 112 782 0 757 1 0 1 1 0 8 0 kqueuepl 104 811 0 809 1 0 1 1 0 8 0 pipepl 112 1596 0 1581 5 3 2 2 0 8 0 fdescpl 424 2762 0 2749 2 0 2 2 0 8 0 filepl 120 24331 0 24254 11 8 3 5 0 8 0 lockfpl 104 1305 0 1304 1 0 1 1 0 8 0 lockfspl 48 496 0 495 1 0 1 1 0 8 0 sessionpl 112 34 0 25 1 0 1 1 0 8 0 pgrppl 48 56 0 47 1 0 1 1 0 8 0 ucredpl 96 2774 0 2767 1 0 1 1 0 8 0 zombiepl 144 2749 0 2748 1 0 1 1 0 8 0 processpl 864 2778 0 2748 4 0 4 4 0 8 0 procpl 632 5940 0 5903 4 0 4 4 0 8 0 sosppl 128 54 0 54 12 12 0 1 0 8 0 sockpl 384 7254 0 7233 25 22 3 7 0 8 0 mcl64k 65536 457 0 457 38 38 0 33 0 8 0 mcl16k 16384 26 0 26 12 12 0 1 0 8 0 mcl12k 12288 60 0 60 6 6 0 1 0 8 0 mcl9k 9216 46 0 46 9 9 0 1 0 8 0 mcl8k 8192 171 0 171 3 3 0 1 0 8 0 mcl4k 4096 408 0 407 5 4 1 1 0 8 0 mcl2k2 2112 27 0 27 7 7 0 1 0 8 0 mcl2k 2048 73345 0 73297 21 14 7 16 0 8 0 mtagpl 80 135 0 135 2 1 1 1 0 8 1 mbufpl 256 141369 0 141284 59 46 13 24 0 8 2 bufpl 256 18808 0 11930 431 0 431 431 0 8 0 anonpl 16 376799 0 360805 198 83 115 120 0 62 25 amapchunkpl 152 16292 0 16185 61 44 17 19 0 158 10 amappl16 192 18019 0 16812 169 97 72 83 0 8 7 amappl15 184 112 0 111 3 2 1 1 0 8 0 amappl14 176 731 0 726 1 0 1 1 0 8 0 amappl13 168 86 0 85 3 2 1 1 0 8 0 amappl12 160 244 0 242 1 0 1 1 0 8 0 amappl11 152 414 0 403 1 0 1 1 0 8 0 amappl10 144 129 0 127 1 0 1 1 0 8 0 amappl9 136 1335 0 1329 1 0 1 1 0 8 0 amappl8 128 923 0 877 2 0 2 2 0 8 0 amappl7 120 223 0 217 1 0 1 1 0 8 0 amappl6 112 388 0 379 1 0 1 1 0 8 0 amappl5 104 508 0 497 1 0 1 1 0 8 0 amappl4 96 2740 0 2710 1 0 1 1 0 8 0 amappl3 88 1067 0 1059 1 0 1 1 0 8 0 amappl2 80 20511 0 20449 3 1 2 3 0 8 0 amappl1 72 60279 0 59861 27 18 9 20 0 8 0 amappl 80 6475 0 6422 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 2801 0 2749 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 2801 0 2749 1 0 1 1 0 8 0 vmmpekpl 168 20097 0 20064 2 0 2 2 0 8 0 vmmpepl 168 345468 0 343187 314 153 161 168 0 357 47 vmsppl 272 2761 0 2749 4 2 2 2 0 8 1 pdppl 4096 5608 0 5544 11 1 10 10 0 8 1 pvpl 32 1004199 0 986721 532 188 344 356 0 265 147 pmappl 200 2800 0 2756 3 0 3 3 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 708 0 136 17 0 17 17 0 8 0