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 *302773 75728 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(ffffffff821e69a4,ffffffff821fbbbc,149,ffffffff821c4f70) at __assert+0x2b sys/kern/subr_prf.c:154 buf_free_pages(fffffd802b51f400) at buf_free_pages+0x1ee sys/kern/vfs_biomem.c:318 buf_dealloc_mem(fffffd802b51f400) at buf_dealloc_mem+0xe1 sys/kern/vfs_biomem.c:194 buf_put(fffffd802b51f400) at buf_put+0x16b sys/kern/vfs_bio.c:131 brelse(fffffd802b51f400) at brelse+0x257 sys/kern/vfs_bio.c:922 vinvalbuf(fffffd80295b18f0,2,fffffd803f7c6c00,ffff8000ffff8280,0,ffffffffffffffff) at vinvalbuf+0x3b1 sys/kern/vfs_subr.c:1977 ffs_truncate(fffffd80366f44b0,0,4,fffffd803f7c6c00) at ffs_truncate+0xeb1 sys/ufs/ffs/ffs_inode.c:326 ufs_rmdir(ffff800014920b88) at ufs_rmdir+0x3af sys/ufs/ufs/ufs_vnops.c:1357 VOP_RMDIR(fffffd803aa59690,fffffd80295b18f0,ffff800014920c88) at VOP_RMDIR+0xf8 sys/kern/vfs_vops.c:474 dounlinkat(ffff8000ffff8280,9,c002862f60,8) at dounlinkat+0x14c sys/kern/vfs_syscalls.c:1818 syscall(ffff800014920e00) at syscall+0x507 sys/arch/amd64/amd64/trap.c:555 Xsyscall(0,145,c00002a000,145,100,7b) at Xsyscall+0x128 end of kernel end trace frame: 0xc0005e98f8, 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(ffffffff821e69a4,ffffffff821fbbbc,149,ffffffff821c4f70) at __assert+0x2b sys/kern/subr_prf.c:154 buf_free_pages(fffffd802b51f400) at buf_free_pages+0x1ee sys/kern/vfs_biomem.c:318 buf_dealloc_mem(fffffd802b51f400) at buf_dealloc_mem+0xe1 sys/kern/vfs_biomem.c:194 buf_put(fffffd802b51f400) at buf_put+0x16b sys/kern/vfs_bio.c:131 brelse(fffffd802b51f400) at brelse+0x257 sys/kern/vfs_bio.c:922 vinvalbuf(fffffd80295b18f0,2,fffffd803f7c6c00,ffff8000ffff8280,0,ffffffffffffffff) at vinvalbuf+0x3b1 sys/kern/vfs_subr.c:1977 ffs_truncate(fffffd80366f44b0,0,4,fffffd803f7c6c00) at ffs_truncate+0xeb1 sys/ufs/ffs/ffs_inode.c:326 ufs_rmdir(ffff800014920b88) at ufs_rmdir+0x3af sys/ufs/ufs/ufs_vnops.c:1357 VOP_RMDIR(fffffd803aa59690,fffffd80295b18f0,ffff800014920c88) at VOP_RMDIR+0xf8 sys/kern/vfs_vops.c:474 dounlinkat(ffff8000ffff8280,9,c002862f60,8) at dounlinkat+0x14c sys/kern/vfs_syscalls.c:1818 syscall(ffff800014920e00) at syscall+0x507 sys/arch/amd64/amd64/trap.c:555 Xsyscall(0,145,c00002a000,145,100,7b) at Xsyscall+0x128 end of kernel end trace frame: 0xc0005e98f8, count: -14 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff800014920660 rbx 0xffff800014920710 rdx 0x2 rcx 0 rax 0 r8 0xffff800014920620 r9 0x1 r10 0 r11 0xe1ad5eb760340005 r12 0x3000000008 r13 0xffff800014920670 r14 0x100 r15 0x1 rip 0xffffffff816c6118 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800014920650 ss 0 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-fuzzer) pid=302773 stat=onproc flags process=2 proc=4000000 pri=17, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff8770,0xffff8000ffff2518 process=0xffff8000148a2018 user=0xffff80001491b000, vmspace=0xfffffd803f014440 estcpu=36, cpticks=1, pctcpu=0.8 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 60978 96819 75728 0 2 0x2 syz-executor.0 79048 293407 1 0 3 0x100083 ttyin getty 52895 196195 0 0 3 0x14200 acct acct 87314 248386 0 0 3 0x14200 bored sosplice 75728 215963 94474 0 3 0x82 thrsleep syz-fuzzer 75728 244596 94474 0 3 0x4000082 nanosleep syz-fuzzer 75728 183371 94474 0 3 0x4000082 thrsleep syz-fuzzer 75728 522709 94474 0 3 0x4000082 thrsleep syz-fuzzer 75728 233911 94474 0 3 0x4000082 thrsleep syz-fuzzer 75728 327689 94474 0 2 0x4000002 syz-fuzzer 75728 263144 94474 0 3 0x4000082 thrsleep syz-fuzzer 75728 82288 94474 0 3 0x4000082 thrsleep syz-fuzzer *75728 302773 94474 0 7 0x4000002 syz-fuzzer 94474 270989 27469 0 3 0x10008a pause ksh 27469 66809 46626 0 3 0x92 select sshd 46626 82869 1 0 3 0x80 select sshd 6764 362855 52763 73 3 0x100090 kqread syslogd 52763 175219 1 0 3 0x100082 netio syslogd 83693 12519 1 77 3 0x100090 poll dhclient 23585 95988 1 0 3 0x80 poll dhclient 24780 347089 0 0 3 0x14200 pgzero zerothread 32160 108022 0 0 3 0x14200 aiodoned aiodoned 81113 45713 0 0 3 0x14200 syncer update 23415 390225 0 0 3 0x14200 cleaner cleaner 77513 59272 0 0 3 0x14200 reaper reaper 72036 26180 0 0 3 0x14200 pgdaemon pagedaemon 50509 62346 0 0 3 0x14200 bored crynlk 90484 393861 0 0 3 0x14200 bored crypto 51981 450050 0 0 3 0x40014200 acpi0 acpi0 98262 235682 0 0 3 0x14200 bored softnet 3175 417956 0 0 3 0x14200 bored systqmp 45088 406473 0 0 3 0x14200 bored systq 60840 60355 0 0 3 0x40014200 bored softclock 65398 474390 0 0 3 0x40014200 idle0 45093 40257 0 0 3 0x14200 bored smr 1 93251 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 7035K 8042K 78643K 18408 0 0 pcb 13 10K 12K 78643K 773 0 0 rtable 114 13K 14K 78643K 2245 0 0 ifaddr 88 20K 22K 78643K 646 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 215 0 0 iov 0 0K 32K 78643K 1852 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1227 77K 78K 78643K 4168 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 55 0 0 VM map 28 7K 7K 78643K 36 0 0 sem 12 0K 0K 78643K 788 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12645 0 0 file desc 3 5K 25K 78643K 3013 0 0 sigio 0 0K 0K 78643K 146 0 0 proc 48 38K 63K 78643K 1450 0 0 subproc 16 1K 2K 78643K 378 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 332 0 0 in_multi 16 1K 2K 78643K 489 0 0 ether_multi 1 0K 0K 78643K 41 0 0 mrt 1 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 72 318K 318K 78643K 72 0 0 exec 0 0K 1K 78643K 733 0 0 pfkey data 0 0K 4K 78643K 4 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 160 226K 244K 78643K 9713 0 0 UVM aobj 130 4K 4K 78643K 158 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 661 0 0 NDP 21 0K 1K 78643K 217 0 0 temp 196 3543K 4183K 78643K 119144 0 0 kqueue 0 0K 0K 78643K 44 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 61 0 57 1 0 1 1 0 8 0 rtpcb 80 311 0 309 1 0 1 1 0 8 0 rtentry 112 443 0 404 2 0 2 2 0 8 0 unpcb 120 1792 0 1779 1 0 1 1 0 8 0 syncache 264 17 0 17 9 9 0 1 0 8 0 tcpqe 32 122 0 122 2 2 0 1 0 8 0 tcpcb 544 1367 0 1363 23 21 2 15 0 8 1 ipq 40 42 0 42 15 15 0 1 0 8 0 ipqe 40 956 0 956 15 15 0 1 0 8 0 inpcb 280 3933 0 3926 28 26 2 9 0 8 1 rttmr 72 5 0 5 5 5 0 1 0 8 0 nd6 48 67 0 67 1 0 1 1 0 8 1 pkpcb 40 12 0 12 5 5 0 1 0 8 0 ppxss 1128 82 0 82 19 18 1 1 0 8 1 art_heap8 4096 15 0 12 11 7 4 4 0 8 1 art_heap4 256 2049 0 1890 26 11 15 18 0 8 2 art_table 32 2064 0 1902 3 0 3 3 0 8 1 art_node 16 441 0 408 1 0 1 1 0 8 0 sysvmsgpl 40 14 0 10 1 0 1 1 0 8 0 semapl 112 786 0 776 1 0 1 1 0 8 0 shmpl 112 156 0 28 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 6361 0 4962 46 0 46 46 0 8 0 ffsino 240 6361 0 4962 83 0 83 83 0 8 0 nchpl 144 11688 0 11236 60 40 20 60 0 8 0 uvmvnodes 72 7426 0 0 136 0 136 136 0 8 0 vnodes 208 7426 0 0 391 0 391 391 0 8 0 namei 1024 41733 0 41733 6 5 1 1 0 8 1 vcpupl 1984 26 0 0 4 0 4 4 0 8 0 vmpool 520 34 0 8 2 0 2 2 0 8 0 scxspl 192 51379 0 51379 24 23 1 7 0 8 1 plimitpl 152 294 0 288 1 0 1 1 0 8 0 sigapl 432 3125 0 3114 2 0 2 2 0 8 0 futexpl 56 93200 0 93200 7 6 1 1 0 8 1 knotepl 112 867 0 850 4 3 1 2 0 8 0 kqueuepl 104 1149 0 1147 4 3 1 4 0 8 0 pipepl 112 6758 0 6743 21 19 2 2 0 8 1 fdescpl 424 3126 0 3114 2 0 2 2 0 8 0 filepl 120 33559 0 33484 31 27 4 11 0 8 0 lockfpl 104 3356 0 3355 1 0 1 1 0 8 0 lockfspl 48 833 0 832 1 0 1 1 0 8 0 sessionpl 112 39 0 30 1 0 1 1 0 8 0 pgrppl 48 73 0 64 1 0 1 1 0 8 0 ucredpl 96 3473 0 3466 1 0 1 1 0 8 0 zombiepl 144 3116 0 3116 1 0 1 1 0 8 1 processpl 864 3144 0 3116 4 0 4 4 0 8 0 procpl 632 7827 0 7791 18 13 5 5 0 8 1 sosppl 128 50 0 50 14 14 0 1 0 8 0 sockpl 384 6136 0 6114 48 43 5 14 0 8 1 mcl64k 65536 593 0 593 45 44 1 32 0 8 1 mcl16k 16384 40 0 40 19 19 0 1 0 8 0 mcl12k 12288 104 0 104 19 18 1 1 0 8 1 mcl9k 9216 46 0 46 20 20 0 1 0 8 0 mcl8k 8192 159 0 159 13 12 1 1 0 8 1 mcl4k 4096 389 0 389 8 7 1 1 0 8 1 mcl2k2 2112 32 0 32 15 15 0 1 0 8 0 mcl2k 2048 73332 0 73290 15 9 6 13 0 8 0 mtagpl 80 181 0 181 3 2 1 1 0 8 1 mbufpl 256 146701 0 146644 139 125 14 28 0 8 5 bufpl 256 18517 0 11063 467 0 467 467 0 8 0 anonpl 16 434203 0 413668 225 136 89 100 0 62 0 amapchunkpl 152 21979 0 21832 93 86 7 20 0 158 0 amappl16 192 18429 0 17219 201 139 62 74 0 8 0 amappl15 184 220 0 220 3 3 0 1 0 8 0 amappl14 176 1165 0 1159 1 0 1 1 0 8 0 amappl13 168 605 0 605 6 5 1 1 0 8 1 amappl12 160 379 0 378 2 1 1 1 0 8 0 amappl11 152 448 0 437 1 0 1 1 0 8 0 amappl10 144 134 0 131 1 0 1 1 0 8 0 amappl9 136 834 0 830 1 0 1 1 0 8 0 amappl8 128 406 0 355 2 0 2 2 0 8 0 amappl7 120 249 0 241 1 0 1 1 0 8 0 amappl6 112 398 0 388 1 0 1 1 0 8 0 amappl5 104 727 0 717 1 0 1 1 0 8 0 amappl4 96 3111 0 3078 1 0 1 1 0 8 0 amappl3 88 1133 0 1128 1 0 1 1 0 8 0 amappl2 80 23673 0 23612 3 1 2 3 0 8 0 amappl1 72 71473 0 71090 27 18 9 20 0 8 0 amappl 80 8394 0 8340 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 157 0 28 3 0 3 3 0 8 0 uaddrrnd 24 3160 0 3114 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 3160 0 3114 1 0 1 1 0 8 0 vmmpekpl 168 35940 0 35909 2 0 2 2 0 8 0 vmmpepl 168 399656 0 397466 492 373 119 153 0 357 8 vmsppl 272 3125 0 3114 6 5 1 2 0 8 0 pdppl 4096 6326 0 6270 15 7 8 9 0 8 0 pvpl 32 1303793 0 1280535 649 441 208 337 0 265 0 pmappl 200 3159 0 3122 5 2 3 3 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 881 0 274 19 0 19 19 0 8 0