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 *430180 59354 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(ffffffff821e690c,ffffffff821f7f3b,149,ffffffff821c1398) at __assert+0x2b sys/kern/subr_prf.c:154 buf_free_pages(fffffd802db0d600) at buf_free_pages+0x1ee sys/kern/vfs_biomem.c:318 buf_dealloc_mem(fffffd802db0d600) at buf_dealloc_mem+0xe1 sys/kern/vfs_biomem.c:194 buf_put(fffffd802db0d600) at buf_put+0x16b sys/kern/vfs_bio.c:131 brelse(fffffd802db0d600) at brelse+0x257 sys/kern/vfs_bio.c:922 vinvalbuf(fffffd803b7961a0,2,fffffd803f7c6ae0,ffff8000ffff5648,0,ffffffffffffffff) at vinvalbuf+0x3b1 sys/kern/vfs_subr.c:1977 ffs_truncate(fffffd803be000f8,0,4,fffffd803f7c6ae0) at ffs_truncate+0xeb1 sys/ufs/ffs/ffs_inode.c:326 ufs_rmdir(ffff800014904258) at ufs_rmdir+0x3af sys/ufs/ufs/ufs_vnops.c:1357 VOP_RMDIR(fffffd802dadcaa8,fffffd803b7961a0,ffff800014904358) at VOP_RMDIR+0xf8 sys/kern/vfs_vops.c:474 dounlinkat(ffff8000ffff5648,b,c0011fc820,8) at dounlinkat+0x14c sys/kern/vfs_syscalls.c:1818 syscall(ffff8000149044d0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:555 Xsyscall(0,145,c00002a000,145,100,41) at Xsyscall+0x128 end of kernel end trace frame: 0xc00337d7e8, 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(ffffffff821e690c,ffffffff821f7f3b,149,ffffffff821c1398) at __assert+0x2b sys/kern/subr_prf.c:154 buf_free_pages(fffffd802db0d600) at buf_free_pages+0x1ee sys/kern/vfs_biomem.c:318 buf_dealloc_mem(fffffd802db0d600) at buf_dealloc_mem+0xe1 sys/kern/vfs_biomem.c:194 buf_put(fffffd802db0d600) at buf_put+0x16b sys/kern/vfs_bio.c:131 brelse(fffffd802db0d600) at brelse+0x257 sys/kern/vfs_bio.c:922 vinvalbuf(fffffd803b7961a0,2,fffffd803f7c6ae0,ffff8000ffff5648,0,ffffffffffffffff) at vinvalbuf+0x3b1 sys/kern/vfs_subr.c:1977 ffs_truncate(fffffd803be000f8,0,4,fffffd803f7c6ae0) at ffs_truncate+0xeb1 sys/ufs/ffs/ffs_inode.c:326 ufs_rmdir(ffff800014904258) at ufs_rmdir+0x3af sys/ufs/ufs/ufs_vnops.c:1357 VOP_RMDIR(fffffd802dadcaa8,fffffd803b7961a0,ffff800014904358) at VOP_RMDIR+0xf8 sys/kern/vfs_vops.c:474 dounlinkat(ffff8000ffff5648,b,c0011fc820,8) at dounlinkat+0x14c sys/kern/vfs_syscalls.c:1818 syscall(ffff8000149044d0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:555 Xsyscall(0,145,c00002a000,145,100,41) at Xsyscall+0x128 end of kernel end trace frame: 0xc00337d7e8, count: -14 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff800014903d30 rbx 0xffff800014903de0 rdx 0x2 rcx 0 rax 0 r8 0xffff800014903cf0 r9 0x1 r10 0 r11 0xe459b70173fefa12 r12 0x3000000008 r13 0xffff800014903d40 r14 0x100 r15 0x1 rip 0xffffffff82060498 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800014903d20 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-fuzzer) pid=430180 stat=onproc flags process=2 proc=4000000 pri=17, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff4010,0xffff8000ffff9650 process=0xffff8000148a2378 user=0xffff8000148ff000, vmspace=0xfffffd803f013330 estcpu=36, cpticks=3, pctcpu=0.0 user=0, sys=2, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 92697 178253 34610 0 2 0 syz-executor.1 92697 477654 34610 0 3 0x4000080 lockf syz-executor.1 92697 421976 34610 0 3 0x4000080 fsleep syz-executor.1 15450 145306 1 0 3 0x100083 ttyin getty 34610 252358 59354 0 3 0x82 nanosleep syz-executor.1 55617 497484 0 0 3 0x14200 bored sosplice 59354 187863 79267 0 3 0x82 thrsleep syz-fuzzer 59354 48301 79267 0 3 0x4000082 nanosleep syz-fuzzer 59354 130783 79267 0 3 0x4000082 thrsleep syz-fuzzer 59354 392176 79267 0 3 0x4000082 thrsleep syz-fuzzer *59354 430180 79267 0 7 0x4000002 syz-fuzzer 59354 310663 79267 0 3 0x4000082 thrsleep syz-fuzzer 59354 416101 79267 0 3 0x4000082 thrsleep syz-fuzzer 59354 375083 79267 0 3 0x4000082 thrsleep syz-fuzzer 79267 8842 21655 0 3 0x10008a pause ksh 21655 160186 79434 0 3 0x92 select sshd 79434 161938 1 0 3 0x80 select sshd 65428 478479 30522 73 3 0x100090 kqread syslogd 30522 78906 1 0 3 0x100082 netio syslogd 48053 229183 1 77 3 0x100090 poll dhclient 86989 221272 1 0 3 0x80 poll dhclient 19615 295324 0 0 2 0x14200 zerothread 41679 257191 0 0 3 0x14200 aiodoned aiodoned 83432 205153 0 0 3 0x14200 syncer update 86870 131325 0 0 3 0x14200 cleaner cleaner 47288 388441 0 0 3 0x14200 reaper reaper 82147 311079 0 0 3 0x14200 pgdaemon pagedaemon 94765 418575 0 0 3 0x14200 bored crynlk 46720 92504 0 0 3 0x14200 bored crypto 7837 158707 0 0 3 0x40014200 acpi0 acpi0 43155 324325 0 0 3 0x14200 bored softnet 67309 367129 0 0 3 0x14200 bored systqmp 74716 154023 0 0 3 0x14200 bored systq 76633 422141 0 0 3 0x40014200 bored softclock 7163 431477 0 0 3 0x40014200 idle0 74673 21340 0 0 3 0x14200 bored smr 1 277763 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 9595 7019K 7469K 78643K 21546 0 0 pcb 13 12K 14K 78643K 694 0 0 rtable 84 7K 8K 78643K 2048 0 0 ifaddr 82 17K 18K 78643K 505 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 205 0 0 iov 0 0K 20K 78643K 796 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1223 77K 78K 78643K 6281 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 39 0 0 VM map 34 8K 8K 78643K 40 0 0 sem 12 1K 1K 78643K 587 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12645 0 0 file desc 4 9K 25K 78643K 3293 0 0 sigio 0 0K 0K 78643K 49 0 0 proc 50 38K 63K 78643K 1357 0 0 subproc 16 1K 2K 78643K 323 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 13 0K 2K 78643K 401 0 0 ether_multi 1 0K 0K 78643K 40 0 0 mrt 0 0K 0K 78643K 31 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 252 1113K 1113K 78643K 252 0 0 exec 0 0K 1K 78643K 716 0 0 pfkey data 0 0K 4K 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 145 251K 264K 78643K 11156 0 0 UVM aobj 130 6K 6K 78643K 151 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 738 0 0 NDP 20 0K 0K 78643K 170 0 0 temp 211 3539K 4180K 78643K 190572 0 0 kqueue 0 0K 0K 78643K 27 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 75 0 71 1 0 1 1 0 8 0 rtpcb 80 391 0 389 1 0 1 1 0 8 0 rtentry 112 398 0 372 2 0 2 2 0 8 0 unpcb 120 5839 0 5828 26 24 2 3 0 8 1 syncache 264 16 0 16 7 7 0 1 0 8 0 sackhl 24 1 0 1 1 1 0 1 0 8 0 tcpqe 32 40 0 40 2 2 0 1 0 8 0 tcpcb 544 1377 0 1373 17 16 1 15 0 8 0 ipq 40 24 0 24 10 10 0 1 0 8 0 ipqe 40 404 0 404 10 10 0 1 0 8 0 inpcb 280 4976 0 4968 41 39 2 13 0 8 1 rttmr 72 8 0 8 6 6 0 1 0 8 0 nd6 48 51 0 51 4 4 0 1 0 8 0 pkpcb 40 20 0 20 9 9 0 1 0 8 0 swfcl 56 4 0 0 1 0 1 1 0 8 0 ppxss 1128 49 0 49 22 22 0 1 0 8 0 art_heap8 4096 14 0 13 9 8 1 3 0 8 0 art_heap4 256 1650 0 1520 30 19 11 16 0 8 0 art_table 32 1664 0 1533 2 0 2 2 0 8 0 art_node 16 397 0 373 1 0 1 1 0 8 0 sysvmsgpl 40 30 0 23 1 0 1 1 0 8 0 semupl 112 2 0 2 1 1 0 1 0 8 0 semapl 112 583 0 573 1 0 1 1 0 8 0 shmpl 112 149 0 21 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 8266 0 6873 46 0 46 46 0 8 0 ffsino 240 8266 0 6873 83 0 83 83 0 8 0 nchpl 144 13721 0 13237 61 41 20 60 0 8 0 uvmvnodes 72 7528 0 0 137 0 137 137 0 8 0 vnodes 208 7528 0 0 397 0 397 397 0 8 0 namei 1024 58633 0 58633 7 6 1 1 0 8 1 vcpupl 1984 32 0 0 4 0 4 4 0 8 0 vmpool 520 38 0 6 4 1 3 3 0 8 0 scsiplug 64 3 0 3 2 2 0 1 0 8 0 scxspl 192 50796 0 50796 30 28 2 7 0 8 2 plimitpl 152 315 0 309 1 0 1 1 0 8 0 sigapl 432 3415 0 3403 2 0 2 2 0 8 0 futexpl 56 125028 0 125027 7 6 1 1 0 8 0 knotepl 112 1018 0 997 9 6 3 3 0 8 2 kqueuepl 104 1020 0 1018 4 3 1 4 0 8 0 pipepl 112 5286 0 5265 22 20 2 3 0 8 0 fdescpl 424 3416 0 3403 2 0 2 2 0 8 0 filepl 120 49085 0 48998 81 75 6 11 0 8 2 lockfpl 104 4698 0 4695 1 0 1 1 0 8 0 lockfspl 48 1385 0 1383 1 0 1 1 0 8 0 sessionpl 112 36 0 27 1 0 1 1 0 8 0 pgrppl 48 1691 0 1682 1 0 1 1 0 8 0 ucredpl 96 14249 0 14242 1 0 1 1 0 8 0 zombiepl 144 3405 0 3405 1 0 1 1 0 8 1 processpl 864 3433 0 3405 4 0 4 4 0 8 0 procpl 632 9473 0 9436 19 15 4 5 0 8 0 sosppl 128 45 0 45 14 14 0 1 0 8 0 sockpl 384 11277 0 11254 111 105 6 22 0 8 2 mcl64k 65536 1380 0 1380 138 137 1 33 0 8 1 mcl16k 16384 110 0 110 18 17 1 1 0 8 1 mcl12k 12288 138 0 138 19 18 1 1 0 8 1 mcl9k 9216 75 0 75 21 20 1 1 0 8 1 mcl8k 8192 377 0 377 10 9 1 1 0 8 1 mcl4k 4096 379 0 379 10 9 1 1 0 8 1 mcl2k2 2112 24 0 24 13 12 1 1 0 8 1 mcl2k 2048 74048 0 74005 33 26 7 13 0 8 1 mtagpl 80 134 0 134 7 7 0 1 0 8 0 mbufpl 256 153848 0 153789 136 128 8 33 0 8 0 bufpl 256 20906 0 13363 472 0 472 472 0 8 0 anonpl 16 503751 0 483795 277 182 95 98 0 62 5 amapchunkpl 152 22970 0 22841 84 77 7 19 0 158 0 amappl16 192 24738 0 23551 301 230 71 71 0 8 9 amappl15 184 128 0 128 3 3 0 1 0 8 0 amappl14 176 856 0 850 1 0 1 1 0 8 0 amappl13 168 157 0 157 4 4 0 1 0 8 0 amappl12 160 11 0 8 1 0 1 1 0 8 0 amappl11 152 782 0 771 1 0 1 1 0 8 0 amappl10 144 75 0 72 1 0 1 1 0 8 0 amappl9 136 1633 0 1625 1 0 1 1 0 8 0 amappl8 128 1191 0 1145 3 1 2 2 0 8 0 amappl7 120 171 0 164 1 0 1 1 0 8 0 amappl6 112 777 0 763 1 0 1 1 0 8 0 amappl5 104 401 0 391 1 0 1 1 0 8 0 amappl4 96 3412 0 3381 1 0 1 1 0 8 0 amappl3 88 1205 0 1199 1 0 1 1 0 8 0 amappl2 80 25862 0 25794 3 1 2 3 0 8 0 amappl1 72 77870 0 77472 26 16 10 20 0 8 0 amappl 80 10018 0 9965 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 150 0 21 4 1 3 3 0 8 0 uaddrrnd 24 3454 0 3403 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 3454 0 3403 1 0 1 1 0 8 0 vmmpekpl 168 35441 0 35400 3 0 3 3 0 8 0 vmmpepl 168 436486 0 434189 456 337 119 156 0 357 10 vmsppl 272 3415 0 3403 4 3 1 2 0 8 0 pdppl 4096 6914 0 6850 10 1 9 9 0 8 0 pvpl 32 1329235 0 1307518 691 415 276 326 0 265 84 pmappl 200 3453 0 3409 3 0 3 3 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 982 0 381 20 1 19 19 0 8 0