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 *360276 78384 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(ffffffff821e4c09,ffffffff821fa562,149,ffffffff821c35bf) at __assert+0x2b sys/kern/subr_prf.c:154 buf_free_pages(fffffd8039f1a700) at buf_free_pages+0x1ee sys/kern/vfs_biomem.c:318 buf_dealloc_mem(fffffd8039f1a700) at buf_dealloc_mem+0xe1 sys/kern/vfs_biomem.c:194 buf_put(fffffd8039f1a700) at buf_put+0x16b sys/kern/vfs_bio.c:131 brelse(fffffd8039f1a700) at brelse+0x257 sys/kern/vfs_bio.c:922 vinvalbuf(fffffd802a4de688,2,fffffd803f7c66c0,ffff8000ffff49f0,0,ffffffffffffffff) at vinvalbuf+0x3b1 sys/kern/vfs_subr.c:1977 ffs_truncate(fffffd80360d5c30,0,4,fffffd803f7c66c0) at ffs_truncate+0xeb1 sys/ufs/ffs/ffs_inode.c:326 ufs_rmdir(ffff8000148e61c8) at ufs_rmdir+0x3af sys/ufs/ufs/ufs_vnops.c:1357 VOP_RMDIR(fffffd802a4de758,fffffd802a4de688,ffff8000148e62c8) at VOP_RMDIR+0xf8 sys/kern/vfs_vops.c:474 dounlinkat(ffff8000ffff49f0,b,c002752200,8) at dounlinkat+0x14c sys/kern/vfs_syscalls.c:1818 syscall(ffff8000148e6440) at syscall+0x507 sys/arch/amd64/amd64/trap.c:555 Xsyscall(0,145,c00002a000,145,100,10) at Xsyscall+0x128 end of kernel end trace frame: 0xc0024cd7e8, 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(ffffffff821e4c09,ffffffff821fa562,149,ffffffff821c35bf) at __assert+0x2b sys/kern/subr_prf.c:154 buf_free_pages(fffffd8039f1a700) at buf_free_pages+0x1ee sys/kern/vfs_biomem.c:318 buf_dealloc_mem(fffffd8039f1a700) at buf_dealloc_mem+0xe1 sys/kern/vfs_biomem.c:194 buf_put(fffffd8039f1a700) at buf_put+0x16b sys/kern/vfs_bio.c:131 brelse(fffffd8039f1a700) at brelse+0x257 sys/kern/vfs_bio.c:922 vinvalbuf(fffffd802a4de688,2,fffffd803f7c66c0,ffff8000ffff49f0,0,ffffffffffffffff) at vinvalbuf+0x3b1 sys/kern/vfs_subr.c:1977 ffs_truncate(fffffd80360d5c30,0,4,fffffd803f7c66c0) at ffs_truncate+0xeb1 sys/ufs/ffs/ffs_inode.c:326 ufs_rmdir(ffff8000148e61c8) at ufs_rmdir+0x3af sys/ufs/ufs/ufs_vnops.c:1357 VOP_RMDIR(fffffd802a4de758,fffffd802a4de688,ffff8000148e62c8) at VOP_RMDIR+0xf8 sys/kern/vfs_vops.c:474 dounlinkat(ffff8000ffff49f0,b,c002752200,8) at dounlinkat+0x14c sys/kern/vfs_syscalls.c:1818 syscall(ffff8000148e6440) at syscall+0x507 sys/arch/amd64/amd64/trap.c:555 Xsyscall(0,145,c00002a000,145,100,10) at Xsyscall+0x128 end of kernel end trace frame: 0xc0024cd7e8, count: -14 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff8000148e5ca0 rbx 0xffff8000148e5d50 rdx 0x2 rcx 0 rax 0 r8 0xffff8000148e5c60 r9 0x1 r10 0 r11 0x16db60736b40ad4d r12 0x3000000008 r13 0xffff8000148e5cb0 r14 0x100 r15 0x1 rip 0xffffffff8201d2f8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000148e5c90 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-fuzzer) pid=360276 stat=onproc flags process=2 proc=4000000 pri=17, usrpri=52, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff5b38,0xffff8000ffff4298 process=0xffff8000148a2018 user=0xffff8000148e1000, vmspace=0xfffffd803f013770 estcpu=36, cpticks=10, pctcpu=0.1 user=0, sys=2, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 12732 286373 78384 0 3 0x82 nanosleep syz-executor.1 32214 513137 0 0 3 0x14200 acct acct 59471 108565 0 0 3 0x14200 bored sosplice 78384 305858 29925 0 3 0x82 thrsleep syz-fuzzer 78384 367828 29925 0 3 0x4000082 thrsleep syz-fuzzer *78384 360276 29925 0 7 0x4000002 syz-fuzzer 78384 229908 29925 0 3 0x4000082 thrsleep syz-fuzzer 78384 433875 29925 0 3 0x4000082 thrsleep syz-fuzzer 78384 263848 29925 0 3 0x4000082 thrsleep syz-fuzzer 78384 471554 29925 0 3 0x4000082 thrsleep syz-fuzzer 78384 109584 29925 0 3 0x4000082 kqread syz-fuzzer 29925 387378 31240 0 3 0x10008a pause ksh 31240 113550 42922 0 3 0x92 select sshd 73430 79175 1 0 3 0x100083 ttyin getty 42922 368256 1 0 3 0x80 select sshd 65833 412290 96044 73 3 0x100090 kqread syslogd 96044 24600 1 0 3 0x100082 netio syslogd 47413 11495 1 77 3 0x100090 poll dhclient 20856 355311 1 0 3 0x80 poll dhclient 12130 477736 0 0 3 0x14200 pgzero zerothread 98462 499267 0 0 3 0x14200 aiodoned aiodoned 45278 169337 0 0 3 0x14200 syncer update 8943 459926 0 0 3 0x14200 cleaner cleaner 49144 437000 0 0 3 0x14200 reaper reaper 35349 133491 0 0 3 0x14200 pgdaemon pagedaemon 88086 309994 0 0 3 0x14200 bored crynlk 49095 384260 0 0 3 0x14200 bored crypto 9640 433892 0 0 3 0x40014200 acpi0 acpi0 24309 25503 0 0 3 0x14200 bored softnet 5509 7042 0 0 3 0x14200 bored systqmp 23087 157030 0 0 3 0x14200 bored systq 56981 424616 0 0 3 0x40014200 bored softclock 5165 514308 0 0 3 0x40014200 idle0 23221 80361 0 0 3 0x14200 bored smr 1 202607 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 9565 6375K 8446K 78643K 22803 0 0 pcb 13 10K 12K 78643K 488 0 0 rtable 83 7K 8K 78643K 1688 0 0 ifaddr 70 15K 16K 78643K 514 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 214 0 0 iov 0 0K 24K 78643K 561 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1223 77K 77K 78643K 4851 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 25 0 0 VM map 20 5K 5K 78643K 44 0 0 sem 12 0K 0K 78643K 562 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12645 0 0 file desc 3 5K 25K 78643K 2340 0 0 sigio 0 0K 0K 78643K 10 0 0 proc 49 38K 55K 78643K 1206 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 183 0 0 in_multi 13 0K 2K 78643K 306 0 0 ether_multi 1 0K 0K 78643K 32 0 0 mrt 0 0K 0K 78643K 13 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 180 795K 795K 78643K 180 0 0 exec 0 0K 1K 78643K 615 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 119 159K 177K 78643K 6740 0 0 UVM aobj 107 4K 4K 78643K 113 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 509 0 0 NDP 17 0K 0K 78643K 160 0 0 temp 189 3539K 4169K 78643K 148310 0 0 kqueue 0 0K 0K 78643K 30 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 59 0 55 1 0 1 1 0 8 0 rtpcb 80 252 0 250 1 0 1 1 0 8 0 rtentry 112 262 0 234 2 0 2 2 0 8 0 unpcb 120 1024 0 1015 3 2 1 2 0 8 0 syncache 264 16 0 16 5 5 0 1 0 8 0 tcpqe 32 4378 0 4378 5 5 0 2 0 8 0 tcpcb 544 2449 0 2445 6 5 1 2 0 8 0 ipq 40 17 0 17 5 4 1 1 0 8 1 ipqe 40 214 0 214 5 4 1 1 0 8 1 inpcb 280 6048 0 6041 22 20 2 13 0 8 1 rttmr 72 4 0 4 3 3 0 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 36 0 36 3 2 1 1 0 8 1 pkpcb 40 6 0 6 2 2 0 1 0 8 0 ppxss 1128 64 0 64 10 9 1 1 0 8 1 art_heap8 4096 6 0 4 5 3 2 3 0 8 0 art_heap4 256 1181 0 1041 28 14 14 15 0 8 3 art_table 32 1187 0 1045 2 0 2 2 0 8 0 art_node 16 261 0 235 1 0 1 1 0 8 0 sysvmsgpl 40 47 0 25 1 0 1 1 0 8 0 semapl 112 558 0 548 1 0 1 1 0 8 0 shmpl 112 111 0 6 3 0 3 3 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 4974 0 3579 46 0 46 46 0 8 0 ffsino 240 4974 0 3579 83 0 83 83 0 8 0 nchpl 144 8465 0 6860 60 0 60 60 0 8 0 uvmvnodes 72 7409 0 0 135 0 135 135 0 8 0 vnodes 208 7409 0 0 390 0 390 390 0 8 0 namei 1024 29621 0 29621 6 5 1 1 0 8 1 vcpupl 1984 18 0 0 3 0 3 3 0 8 0 vmpool 520 42 0 24 3 1 2 2 0 8 0 scsiplug 64 2 0 2 2 2 0 1 0 8 0 scxspl 192 35875 0 35875 16 14 2 7 0 8 2 plimitpl 152 220 0 214 1 0 1 1 0 8 0 sigapl 432 2463 0 2452 2 0 2 2 0 8 0 futexpl 56 63726 0 63726 3 2 1 1 0 8 1 knotepl 112 816 0 795 2 1 1 2 0 8 0 kqueuepl 104 630 0 628 1 0 1 1 0 8 0 pipepl 112 1350 0 1335 6 5 1 2 0 8 0 fdescpl 424 2464 0 2452 2 0 2 2 0 8 0 filepl 120 22183 0 22107 20 16 4 11 0 8 1 lockfpl 104 807 0 806 1 0 1 1 0 8 0 lockfspl 48 259 0 258 1 0 1 1 0 8 0 sessionpl 112 33 0 24 1 0 1 1 0 8 0 pgrppl 48 53 0 44 1 0 1 1 0 8 0 ucredpl 96 2666 0 2657 1 0 1 1 0 8 0 zombiepl 144 2453 0 2452 3 2 1 1 0 8 0 processpl 864 2481 0 2452 4 0 4 4 0 8 0 procpl 632 5226 0 5190 4 0 4 4 0 8 0 sosppl 128 22 0 22 5 5 0 1 0 8 0 sockpl 384 7353 0 7335 38 34 4 22 0 8 1 mcl64k 65536 453 0 453 35 34 1 33 0 8 1 mcl16k 16384 24 0 24 9 8 1 1 0 8 1 mcl12k 12288 43 0 43 12 11 1 1 0 8 1 mcl9k 9216 46 0 46 9 8 1 1 0 8 1 mcl8k 8192 92 0 92 6 5 1 1 0 8 1 mcl4k 4096 261 0 261 5 4 1 1 0 8 1 mcl2k2 2112 21 0 21 7 6 1 1 0 8 1 mcl2k 2048 63443 0 63403 28 22 6 23 0 8 0 mtagpl 80 86 0 80 5 4 1 1 0 8 0 mbufpl 256 128138 0 128033 88 80 8 30 0 8 0 bufpl 256 20723 0 13313 464 0 464 464 0 8 0 anonpl 16 343264 0 326657 147 63 84 87 0 62 13 amapchunkpl 152 14554 0 14451 68 60 8 18 0 158 3 amappl16 192 16205 0 15243 166 105 61 61 0 8 12 amappl15 184 211 0 211 2 2 0 1 0 8 0 amappl14 176 355 0 350 2 1 1 1 0 8 0 amappl13 168 248 0 248 5 5 0 1 0 8 0 amappl12 160 188 0 186 1 0 1 1 0 8 0 amappl11 152 577 0 566 1 0 1 1 0 8 0 amappl10 144 34 0 33 1 0 1 1 0 8 0 amappl9 136 1036 0 1031 1 0 1 1 0 8 0 amappl8 128 571 0 539 2 0 2 2 0 8 0 amappl7 120 120 0 111 1 0 1 1 0 8 0 amappl6 112 563 0 554 1 0 1 1 0 8 0 amappl5 104 475 0 465 1 0 1 1 0 8 0 amappl4 96 2787 0 2763 1 0 1 1 0 8 0 amappl3 88 208 0 200 1 0 1 1 0 8 0 amappl2 80 18010 0 17953 4 2 2 3 0 8 0 amappl1 72 55926 0 55540 28 19 9 20 0 8 0 amappl 80 5730 0 5688 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 112 0 6 2 0 2 2 0 8 0 uaddrrnd 24 2506 0 2452 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 2506 0 2452 1 0 1 1 0 8 0 vmmpekpl 168 17833 0 17803 2 0 2 2 0 8 0 vmmpepl 168 306914 0 305045 252 134 118 131 0 357 22 vmsppl 272 2463 0 2452 3 2 1 2 0 8 0 pdppl 4096 5018 0 4970 10 3 7 7 0 8 0 pvpl 32 966052 0 946528 464 187 277 308 0 265 111 pmappl 200 2505 0 2476 2 0 2 2 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 781 0 187 18 0 18 18 0 8 0