login: 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 *163385 86816 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:208 __assert(ffffffff81f6b110,ffffffff81f7c410,149,ffffffff81f4b8a7) at __assert+0x2e sys/kern/subr_prf.c:155 buf_free_pages(fffffd802e3e5600) at buf_free_pages+0x1ee sys/kern/vfs_biomem.c:318 buf_dealloc_mem(fffffd802e3e5600) at buf_dealloc_mem+0xe1 sys/kern/vfs_biomem.c:194 buf_put(fffffd802e3e5600) at buf_put+0x172 sys/kern/vfs_bio.c:130 brelse(fffffd802e3e5600) at brelse+0x257 sys/kern/vfs_bio.c:926 vinvalbuf(fffffd802d600ad8,2,fffffd803f7c69c0,ffff8000ffff59d8,0,0) at vinvalbuf+0x36b sys/kern/vfs_subr.c:1937 ffs_truncate(fffffd80361792d0,0,4,fffffd803f7c69c0) at ffs_truncate+0xed8 sys/ufs/ffs/ffs_inode.c:325 ufs_rmdir(ffff8000149baaa8) at ufs_rmdir+0x3af sys/ufs/ufs/ufs_vnops.c:1357 VOP_RMDIR(fffffd8036794a60,fffffd802d600ad8,ffff8000149bab98) at VOP_RMDIR+0x6f sys/kern/vfs_vops.c:473 dounlinkat(ffff8000ffff59d8,a,c0016e4e40,8) at dounlinkat+0x14c sys/kern/vfs_syscalls.c:1706 syscall(ffff8000149bad20) at syscall+0x511 Xsyscall(6,145,c00002c000,145,100,72) at Xsyscall+0x128 end of kernel end trace frame: 0xc001d779e8, 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:208 __assert(ffffffff81f6b110,ffffffff81f7c410,149,ffffffff81f4b8a7) at __assert+0x2e sys/kern/subr_prf.c:155 buf_free_pages(fffffd802e3e5600) at buf_free_pages+0x1ee sys/kern/vfs_biomem.c:318 buf_dealloc_mem(fffffd802e3e5600) at buf_dealloc_mem+0xe1 sys/kern/vfs_biomem.c:194 buf_put(fffffd802e3e5600) at buf_put+0x172 sys/kern/vfs_bio.c:130 brelse(fffffd802e3e5600) at brelse+0x257 sys/kern/vfs_bio.c:926 vinvalbuf(fffffd802d600ad8,2,fffffd803f7c69c0,ffff8000ffff59d8,0,0) at vinvalbuf+0x36b sys/kern/vfs_subr.c:1937 ffs_truncate(fffffd80361792d0,0,4,fffffd803f7c69c0) at ffs_truncate+0xed8 sys/ufs/ffs/ffs_inode.c:325 ufs_rmdir(ffff8000149baaa8) at ufs_rmdir+0x3af sys/ufs/ufs/ufs_vnops.c:1357 VOP_RMDIR(fffffd8036794a60,fffffd802d600ad8,ffff8000149bab98) at VOP_RMDIR+0x6f sys/kern/vfs_vops.c:473 dounlinkat(ffff8000ffff59d8,a,c0016e4e40,8) at dounlinkat+0x14c sys/kern/vfs_syscalls.c:1706 syscall(ffff8000149bad20) at syscall+0x511 Xsyscall(6,145,c00002c000,145,100,72) at Xsyscall+0x128 end of kernel end trace frame: 0xc001d779e8, count: -14 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff8000149ba580 rbx 0xffff8000149ba630 rdx 0x2 rcx 0 rax 0 r8 0xffff8000149ba540 r9 0x1 r10 0 r11 0x212a7abd42ab62fa r12 0x3000000008 r13 0xffff8000149ba590 r14 0x100 r15 0x1 rip 0xffffffff81766698 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000149ba570 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-fuzzer) pid=163385 stat=onproc flags process=2 proc=4000000 pri=17, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff5780,0xffff8000ffff92d8 process=0xffff800014952018 user=0xffff8000149b5000, vmspace=0xfffffd803f014b58 estcpu=36, cpticks=1, pctcpu=0.3 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 32663 32320 37185 0 3 0x80 nanosleep syz-executor.0 32663 79451 37185 0 3 0x4000080 pppxread syz-executor.0 32663 498366 37185 0 3 0x4000080 fsleep syz-executor.0 1989 178449 1 0 3 0x100083 ttyin getty 37185 367014 86816 0 3 0x82 nanosleep syz-executor.0 62085 278881 0 0 3 0x14200 bored sosplice 86816 497052 93153 0 3 0x82 thrsleep syz-fuzzer 86816 102323 93153 0 3 0x4000082 thrsleep syz-fuzzer 86816 416397 93153 0 3 0x4000082 thrsleep syz-fuzzer 86816 271622 93153 0 3 0x4000082 kqread syz-fuzzer 86816 154010 93153 0 3 0x4000082 thrsleep syz-fuzzer *86816 163385 93153 0 7 0x4000002 syz-fuzzer 86816 478161 93153 0 3 0x4000082 thrsleep syz-fuzzer 86816 161565 93153 0 3 0x4000082 thrsleep syz-fuzzer 93153 182486 56880 0 3 0x10008a pause ksh 56880 354434 73064 0 3 0x92 select sshd 73064 8776 1 0 3 0x80 select sshd 57553 97096 59097 73 3 0x100010 biowait syslogd 59097 258580 1 0 3 0x100082 netio syslogd 94341 20819 1 77 3 0x100090 poll dhclient 26118 296125 1 0 3 0x80 poll dhclient 56959 57793 0 0 3 0x14200 pgzero zerothread 23379 115145 0 0 3 0x14200 aiodoned aiodoned 92030 173234 0 0 3 0x14200 syncer update 8258 428952 0 0 3 0x14200 cleaner cleaner 47504 399915 0 0 3 0x14200 reaper reaper 58052 271467 0 0 3 0x14200 pgdaemon pagedaemon 87706 257321 0 0 3 0x14200 bored crynlk 63227 391537 0 0 3 0x14200 bored crypto 21903 156019 0 0 3 0x40014200 acpi0 acpi0 30754 282754 0 0 3 0x14200 bored softnet 54329 15210 0 0 3 0x14200 bored systqmp 57903 203379 0 0 3 0x14200 bored systq 10 41956 0 0 3 0x40014200 bored softclock 77282 513258 0 0 3 0x40014200 idle0 93268 213681 0 0 3 0x14200 bored smr 1 316480 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 9517 6987K 7384K 78643K 16853 0 0 pcb 23 9K 10K 78643K 1203 0 0 rtable 82 3K 3K 78643K 1172 0 0 ifaddr 56 14K 16K 78643K 393 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 95 0 0 iov 0 0K 28K 78643K 343 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1194 75K 76K 78643K 4016 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 35 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 0K 1K 78643K 413 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12537 0 0 file desc 4 9K 21K 78643K 2736 0 0 sigio 0 0K 0K 78643K 46 0 0 proc 42 30K 46K 78643K 876 0 0 subproc 32 32769K 67586K 78643K 686 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 286 0 0 in_multi 22 1K 2K 78643K 310 0 0 ether_multi 1 0K 0K 78643K 24 0 0 mrt 0 0K 0K 78643K 5 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 96 424K 424K 78643K 96 0 0 exec 0 0K 1K 78643K 424 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 82 12K 39K 78643K 7600 0 0 UVM aobj 117 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 1K 78643K 125 0 0 NDP 12 0K 0K 78643K 129 0 0 temp 154 2698K 3339K 78643K 12259 0 0 kqueue 0 0K 0K 78643K 18 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 22 0 19 1 0 1 1 0 8 0 inpcbpl 280 1034 0 1027 1 0 1 1 0 8 0 plimitpl 152 129 0 123 1 0 1 1 0 8 0 rtentry 112 203 0 172 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpcb 544 402 0 398 1 0 1 1 0 8 0 nd6 48 40 0 38 1 0 1 1 0 8 0 ppxss 1128 49 0 49 16 15 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 965 0 818 12 0 12 12 0 8 1 art_table 32 966 0 818 2 0 2 2 0 8 0 art_node 16 202 0 174 1 0 1 1 0 8 0 sysvmsgpl 40 12 0 5 1 0 1 1 0 8 0 semapl 112 407 0 397 1 0 1 1 0 8 0 shmpl 112 132 0 17 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 5946 0 4457 49 0 49 49 0 8 0 ffsino 240 5946 0 4457 88 0 88 88 0 8 0 nchpl 144 9871 0 8197 63 0 63 63 0 8 0 uvmvnodes 72 5926 0 0 108 0 108 108 0 8 0 vnodes 200 5926 0 0 312 0 312 312 0 8 0 namei 1024 34094 0 34094 3 2 1 1 0 8 1 scsiplug 64 4 0 4 3 3 0 1 0 8 0 scxspl 192 40926 0 40925 19 18 1 6 0 8 0 sigapl 432 2856 0 2844 2 0 2 2 0 8 0 futexpl 56 46280 0 46279 3 2 1 1 0 8 0 knotepl 112 794 0 775 1 0 1 1 0 8 0 kqueuepl 104 580 0 578 1 0 1 1 0 8 0 pipepl 112 1810 0 1795 5 4 1 2 0 8 0 fdescpl 424 2857 0 2844 2 0 2 2 0 8 0 filepl 120 20041 0 19966 6 2 4 4 0 8 1 lockfpl 104 954 0 954 8 7 1 1 0 8 1 lockfspl 32 333 0 333 8 7 1 1 0 8 1 sessionpl 112 39 0 30 1 0 1 1 0 8 0 pgrppl 48 69 0 60 1 0 1 1 0 8 0 ucredpl 96 6177 0 6170 1 0 1 1 0 8 0 zombiepl 144 2844 0 2844 1 0 1 1 0 8 1 processpl 840 2872 0 2844 4 0 4 4 0 8 0 procpl 600 6534 0 6497 4 0 4 4 0 8 0 sosppl 128 26 0 26 10 10 0 1 0 8 0 sockpl 384 2089 0 2072 15 12 3 3 0 8 1 mcl64k 65536 583 0 583 77 77 0 64 0 8 0 mcl16k 16384 5 0 5 4 3 1 1 0 8 1 mcl12k 12288 46 0 46 17 16 1 1 0 8 1 mcl9k 9216 37 0 37 17 17 0 1 0 8 0 mcl8k 8192 33 0 33 16 16 0 1 0 8 0 mcl4k 4096 141 0 141 15 14 1 1 0 8 1 mcl2k2 2112 18 0 18 10 9 1 1 0 8 1 mcl2k 2048 60393 0 60357 27 22 5 10 0 8 0 mtagpl 80 2 0 2 1 1 0 1 0 8 0 mbufpl 256 113499 0 113438 54 47 7 38 0 8 1 bufpl 256 13627 0 7926 358 1 357 358 0 8 0 anonpl 16 330703 0 319409 191 129 62 63 0 62 12 amapchunkpl 152 13295 0 13195 43 35 8 15 0 158 2 amappl16 192 17034 0 16406 188 147 41 44 0 8 8 amappl15 184 2254 0 2253 1 0 1 1 0 8 0 amappl14 176 329 0 326 1 0 1 1 0 8 0 amappl13 168 22 0 22 3 3 0 1 0 8 0 amappl12 160 216 0 215 1 0 1 1 0 8 0 amappl11 152 261 0 246 1 0 1 1 0 8 0 amappl10 144 179 0 177 1 0 1 1 0 8 0 amappl9 136 720 0 718 1 0 1 1 0 8 0 amappl8 128 308 0 287 1 0 1 1 0 8 0 amappl7 120 180 0 175 1 0 1 1 0 8 0 amappl6 112 293 0 285 1 0 1 1 0 8 0 amappl5 104 409 0 399 1 0 1 1 0 8 0 amappl4 96 2928 0 2898 2 1 1 2 0 8 0 amappl3 88 540 0 531 1 0 1 1 0 8 0 amappl2 80 25702 0 25652 2 0 2 2 0 8 0 amappl1 72 60612 0 60218 24 15 9 19 0 8 0 amappl 72 6899 0 6866 1 0 1 1 0 75 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 133 0 17 2 0 2 2 0 8 0 uaddrrnd 24 2857 0 2844 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 2857 0 2844 1 0 1 1 0 8 0 vmmpekpl 168 22848 0 22825 2 0 2 2 0 8 0 vmmpepl 168 308151 0 306646 276 190 86 109 0 357 13 vmsppl 264 2856 0 2844 5 4 1 2 0 8 0 pdppl 4096 5720 0 5688 5 0 5 5 0 8 0 pvpl 32 955482 0 941214 522 297 225 253 0 265 101 pmappl 200 2856 0 2844 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 666 0 184 17 2 15 17 0 8 0