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 *177315 65725 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(ffffffff821e0cd2,ffffffff821f2a9a,149,ffffffff821bbecd) at __assert+0x2e sys/kern/subr_prf.c:154 buf_free_pages(fffffd803d5fcc00) at buf_free_pages+0x1ee sys/kern/vfs_biomem.c:318 buf_dealloc_mem(fffffd803d5fcc00) at buf_dealloc_mem+0xe1 sys/kern/vfs_biomem.c:194 buf_put(fffffd803d5fcc00) at buf_put+0x172 sys/kern/vfs_bio.c:131 brelse(fffffd803d5fcc00) at brelse+0x257 sys/kern/vfs_bio.c:922 vinvalbuf(fffffd803c41f5b8,2,fffffd803f7c6a80,ffff8000ffff58c0,0,ffffffffffffffff) at vinvalbuf+0x3de sys/kern/vfs_subr.c:1974 ffs_truncate(fffffd8036a65c40,0,4,fffffd803f7c6a80) at ffs_truncate+0xeb5 sys/ufs/ffs/ffs_inode.c:326 ufs_rmdir(ffff8000148fe428) at ufs_rmdir+0x3af sys/ufs/ufs/ufs_vnops.c:1357 VOP_RMDIR(fffffd803e615b08,fffffd803c41f5b8,ffff8000148fe528) at VOP_RMDIR+0xf8 sys/kern/vfs_vops.c:473 dounlinkat(ffff8000ffff58c0,b,c001644060,8) at dounlinkat+0x14c sys/kern/vfs_syscalls.c:1818 syscall(ffff8000148fe6a0) at syscall+0x508 Xsyscall(0,145,c00002a000,145,100,3) at Xsyscall+0x128 end of kernel end trace frame: 0xc001c11808, 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(ffffffff821e0cd2,ffffffff821f2a9a,149,ffffffff821bbecd) at __assert+0x2e sys/kern/subr_prf.c:154 buf_free_pages(fffffd803d5fcc00) at buf_free_pages+0x1ee sys/kern/vfs_biomem.c:318 buf_dealloc_mem(fffffd803d5fcc00) at buf_dealloc_mem+0xe1 sys/kern/vfs_biomem.c:194 buf_put(fffffd803d5fcc00) at buf_put+0x172 sys/kern/vfs_bio.c:131 brelse(fffffd803d5fcc00) at brelse+0x257 sys/kern/vfs_bio.c:922 vinvalbuf(fffffd803c41f5b8,2,fffffd803f7c6a80,ffff8000ffff58c0,0,ffffffffffffffff) at vinvalbuf+0x3de sys/kern/vfs_subr.c:1974 ffs_truncate(fffffd8036a65c40,0,4,fffffd803f7c6a80) at ffs_truncate+0xeb5 sys/ufs/ffs/ffs_inode.c:326 ufs_rmdir(ffff8000148fe428) at ufs_rmdir+0x3af sys/ufs/ufs/ufs_vnops.c:1357 VOP_RMDIR(fffffd803e615b08,fffffd803c41f5b8,ffff8000148fe528) at VOP_RMDIR+0xf8 sys/kern/vfs_vops.c:473 dounlinkat(ffff8000ffff58c0,b,c001644060,8) at dounlinkat+0x14c sys/kern/vfs_syscalls.c:1818 syscall(ffff8000148fe6a0) at syscall+0x508 Xsyscall(0,145,c00002a000,145,100,3) at Xsyscall+0x128 end of kernel end trace frame: 0xc001c11808, count: -14 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff8000148fdf00 rbx 0xffff8000148fdfb0 rdx 0x2 rcx 0 rax 0 r8 0xffff8000148fdec0 r9 0x1 r10 0 r11 0xd0adb64c065d91ec r12 0x3000000008 r13 0xffff8000148fdf10 r14 0x100 r15 0x1 rip 0xffffffff817a82f8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000148fdef0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-fuzzer) pid=177315 stat=onproc flags process=2 proc=4000000 pri=17, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff4778,0xffff8000ffff5b48 process=0xffff8000148a2018 user=0xffff8000148f9000, vmspace=0xfffffd803f014330 estcpu=31, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 92048 487890 0 0 3 0x14200 acct acct 4904 266160 65725 0 3 0x82 nanosleep syz-executor.1 16274 103058 1 0 3 0x100083 ttyin getty 14814 162396 0 0 3 0x14200 bored sosplice 65725 80496 83594 0 3 0x82 thrsleep syz-fuzzer 65725 190042 83594 0 3 0x4000082 nanosleep syz-fuzzer 65725 9183 83594 0 3 0x4000082 thrsleep syz-fuzzer *65725 177315 83594 0 7 0x4000002 syz-fuzzer 65725 210639 83594 0 3 0x4000082 thrsleep syz-fuzzer 65725 495600 83594 0 3 0x4000082 thrsleep syz-fuzzer 65725 258607 83594 0 3 0x4000082 thrsleep syz-fuzzer 65725 397058 83594 0 3 0x4000082 thrsleep syz-fuzzer 83594 158428 58401 0 3 0x10008a pause ksh 58401 91777 47726 0 3 0x92 select sshd 47726 320015 1 0 3 0x80 select sshd 93629 215376 80611 73 3 0x100090 kqread syslogd 80611 303792 1 0 3 0x100082 netio syslogd 70931 63373 1 77 3 0x100090 poll dhclient 29489 459460 1 0 3 0x80 poll dhclient 88747 70060 0 0 2 0x14200 zerothread 57978 430923 0 0 3 0x14200 aiodoned aiodoned 89643 449541 0 0 3 0x14200 syncer update 75732 250631 0 0 3 0x14200 cleaner cleaner 85516 401400 0 0 3 0x14200 reaper reaper 14052 310610 0 0 3 0x14200 pgdaemon pagedaemon 51037 26754 0 0 3 0x14200 bored crynlk 49243 202119 0 0 3 0x14200 bored crypto 61274 213326 0 0 3 0x40014200 acpi0 acpi0 73700 161373 0 0 3 0x14200 bored softnet 39611 330040 0 0 3 0x14200 bored systqmp 43719 428678 0 0 3 0x14200 bored systq 89865 271252 0 0 3 0x40014200 bored softclock 70293 276569 0 0 3 0x40014200 idle0 78814 356889 0 0 3 0x14200 bored smr 1 478759 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 9576 7077K 7787K 78643K 32343 0 0 pcb 13 8K 8K 78643K 649 0 0 rtable 95 4K 5K 78643K 2313 0 0 ifaddr 72 17K 19K 78643K 872 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 358 0 0 iov 0 0K 28K 78643K 1345 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1197 75K 77K 78643K 9204 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 95 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 1K 1K 78643K 1328 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12645 0 0 file desc 3 5K 25K 78643K 8264 0 0 sigio 0 0K 0K 78643K 86 0 0 proc 42 30K 54K 78643K 1796 0 0 subproc 16 1K 2K 78643K 348 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 757 0 0 in_multi 22 1K 2K 78643K 475 0 0 ether_multi 1 0K 0K 78643K 30 0 0 mrt 0 0K 0K 78643K 17 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 120 530K 530K 78643K 120 0 0 exec 0 0K 1K 78643K 1125 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 96 13K 32K 78643K 20512 0 0 UVM aobj 130 4K 4K 78643K 146 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 470 0 0 NDP 18 0K 0K 78643K 263 0 0 temp 196 3535K 4176K 78643K 102994 0 0 kqueue 0 0K 0K 78643K 61 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 44 0 40 1 0 1 1 0 8 0 rtpcb 80 372 0 370 1 0 1 1 0 8 0 rtentry 112 253 0 220 3 1 2 2 0 8 0 unpcb 120 2727 0 2719 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 1890 0 1890 1 1 0 1 0 8 0 tcpcb 544 1189 0 1185 1 0 1 1 0 8 0 ipq 40 8 0 8 4 4 0 1 0 8 0 ipqe 40 22 0 22 4 4 0 1 0 8 0 inpcb 280 4062 0 4055 7 6 1 2 0 8 0 nd6 48 60 0 57 1 0 1 1 0 8 0 pkpcb 40 44 0 44 15 14 1 1 0 8 1 swfcl 56 2 0 0 1 0 1 1 0 8 0 ppxss 1128 143 0 143 26 26 0 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 1025 0 878 18 5 13 13 0 8 1 art_table 32 1026 0 878 2 0 2 2 0 8 0 art_node 16 244 0 214 1 0 1 1 0 8 0 sysvmsgpl 40 34 0 27 2 1 1 1 0 8 0 semupl 112 4 0 4 1 1 0 1 0 8 0 semapl 112 1326 0 1316 1 0 1 1 0 8 0 shmpl 112 144 0 16 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 14921 0 13507 46 0 46 46 0 8 0 ffsino 240 14921 0 13507 84 0 84 84 0 8 0 nchpl 144 26910 0 25278 62 1 61 62 0 8 0 uvmvnodes 72 6696 0 0 122 0 122 122 0 8 0 vnodes 200 6696 0 0 353 0 353 353 0 8 0 namei 1024 85785 0 85785 3 2 1 1 0 8 1 scsiplug 64 18 0 18 13 13 0 1 0 8 0 scxspl 192 84893 0 84893 21 19 2 7 0 8 2 plimitpl 152 703 0 697 1 0 1 1 0 8 0 sigapl 432 8389 0 8378 2 0 2 2 0 8 0 futexpl 56 143468 0 143468 4 3 1 1 0 8 1 knotepl 112 1857 0 1836 1 0 1 1 0 8 0 kqueuepl 104 1913 0 1911 1 0 1 1 0 8 0 pipepl 112 4450 0 4435 10 9 1 2 0 8 0 fdescpl 424 8390 0 8378 2 0 2 2 0 8 0 filepl 120 50079 0 50004 9 5 4 5 0 8 1 lockfpl 104 2655 0 2655 11 10 1 1 0 8 1 lockfspl 48 887 0 887 11 10 1 1 0 8 1 sessionpl 112 43 0 34 1 0 1 1 0 8 0 pgrppl 48 133 0 124 1 0 1 1 0 8 0 ucredpl 96 9395 0 9388 1 0 1 1 0 8 0 zombiepl 144 8379 0 8378 1 0 1 1 0 8 0 processpl 864 8407 0 8378 4 0 4 4 0 8 0 procpl 632 18352 0 18316 5 1 4 5 0 8 0 sosppl 128 86 0 86 23 22 1 1 0 8 1 sockpl 384 7264 0 7247 12 9 3 4 0 8 1 mcl64k 65536 3056 0 3056 258 248 10 64 0 8 10 mcl16k 16384 40 0 40 20 19 1 1 0 8 1 mcl12k 12288 139 0 139 22 21 1 1 0 8 1 mcl9k 9216 104 0 104 27 26 1 1 0 8 1 mcl8k 8192 125 0 125 26 25 1 1 0 8 1 mcl4k 4096 404 0 404 11 10 1 1 0 8 1 mcl2k2 2112 53 0 53 19 19 0 1 0 8 0 mcl2k 2048 71694 0 71649 17 10 7 12 0 8 0 mtagpl 80 225 0 210 6 5 1 1 0 8 0 mbufpl 256 160041 0 159953 130 119 11 39 0 8 0 bufpl 256 27271 0 19759 470 0 470 470 0 8 0 anonpl 16 780583 0 768345 261 194 67 73 0 62 11 amapchunkpl 152 36807 0 36705 98 90 8 18 0 158 2 amappl16 192 44339 0 43674 271 228 43 47 0 8 8 amappl15 184 2256 0 2256 4 4 0 1 0 8 0 amappl14 176 2257 0 2250 1 0 1 1 0 8 0 amappl13 168 116 0 115 1 0 1 1 0 8 0 amappl12 160 485 0 483 1 0 1 1 0 8 0 amappl11 152 291 0 280 1 0 1 1 0 8 0 amappl10 144 2131 0 2130 1 0 1 1 0 8 0 amappl9 136 1760 0 1758 1 0 1 1 0 8 0 amappl8 128 1285 0 1255 5 4 1 2 0 8 0 amappl7 120 2118 0 2112 1 0 1 1 0 8 0 amappl6 112 271 0 259 1 0 1 1 0 8 0 amappl5 104 769 0 757 1 0 1 1 0 8 0 amappl4 96 7575 0 7547 1 0 1 1 0 8 0 amappl3 88 2473 0 2463 1 0 1 1 0 8 0 amappl2 80 66679 0 66622 3 1 2 3 0 8 0 amappl1 72 154702 0 154320 27 18 9 19 0 8 0 amappl 80 18938 0 18906 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 dma64 64 259 0 259 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 145 0 16 3 0 3 3 0 8 0 uaddrrnd 24 8390 0 8378 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 8390 0 8378 1 0 1 1 0 8 0 vmmpekpl 168 53220 0 53194 2 0 2 2 0 8 0 vmmpepl 168 971685 0 970135 361 269 92 111 0 357 7 vmsppl 272 8389 0 8378 3 2 1 2 0 8 0 pdppl 4096 16786 0 16756 7 2 5 6 0 8 0 pvpl 32 2257635 0 2242451 567 403 164 270 0 265 28 pmappl 200 8389 0 8378 1 0 1 1 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 1054 0 444 21 2 19 19 0 8 0