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 *334647 43838 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(ffffffff81efba0f,ffffffff81f0cfc1,149,ffffffff81edc04c) at __assert+0x2e sys/kern/subr_prf.c:155 buf_free_pages(fffffd8029147900) at buf_free_pages+0x1ee sys/kern/vfs_biomem.c:318 buf_dealloc_mem(fffffd8029147900) at buf_dealloc_mem+0xe1 sys/kern/vfs_biomem.c:194 buf_put(fffffd8029147900) at buf_put+0x172 sys/kern/vfs_bio.c:130 brelse(fffffd8029147900) at brelse+0x257 sys/kern/vfs_bio.c:926 vinvalbuf(fffffd802fedf090,2,fffffd803f7c6a80,ffff8000ffff52d0,0,0) at vinvalbuf+0x36b sys/kern/vfs_subr.c:1937 ffs_truncate(fffffd80304be2d8,0,4,fffffd803f7c6a80) at ffs_truncate+0xed8 sys/ufs/ffs/ffs_inode.c:325 ufs_rmdir(ffff8000149d48a8) at ufs_rmdir+0x3af sys/ufs/ufs/ufs_vnops.c:1357 VOP_RMDIR(fffffd802fedf158,fffffd802fedf090,ffff8000149d4998) at VOP_RMDIR+0x6f sys/kern/vfs_vops.c:473 dounlinkat(ffff8000ffff52d0,a,c0007ecf20,8) at dounlinkat+0x14c sys/kern/vfs_syscalls.c:1706 syscall(ffff8000149d4b20) at syscall+0x511 Xsyscall(6,145,c00002c000,145,100,79) at Xsyscall+0x128 end of kernel end trace frame: 0xc00040d7a0, 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(ffffffff81efba0f,ffffffff81f0cfc1,149,ffffffff81edc04c) at __assert+0x2e sys/kern/subr_prf.c:155 buf_free_pages(fffffd8029147900) at buf_free_pages+0x1ee sys/kern/vfs_biomem.c:318 buf_dealloc_mem(fffffd8029147900) at buf_dealloc_mem+0xe1 sys/kern/vfs_biomem.c:194 buf_put(fffffd8029147900) at buf_put+0x172 sys/kern/vfs_bio.c:130 brelse(fffffd8029147900) at brelse+0x257 sys/kern/vfs_bio.c:926 vinvalbuf(fffffd802fedf090,2,fffffd803f7c6a80,ffff8000ffff52d0,0,0) at vinvalbuf+0x36b sys/kern/vfs_subr.c:1937 ffs_truncate(fffffd80304be2d8,0,4,fffffd803f7c6a80) at ffs_truncate+0xed8 sys/ufs/ffs/ffs_inode.c:325 ufs_rmdir(ffff8000149d48a8) at ufs_rmdir+0x3af sys/ufs/ufs/ufs_vnops.c:1357 VOP_RMDIR(fffffd802fedf158,fffffd802fedf090,ffff8000149d4998) at VOP_RMDIR+0x6f sys/kern/vfs_vops.c:473 dounlinkat(ffff8000ffff52d0,a,c0007ecf20,8) at dounlinkat+0x14c sys/kern/vfs_syscalls.c:1706 syscall(ffff8000149d4b20) at syscall+0x511 Xsyscall(6,145,c00002c000,145,100,79) at Xsyscall+0x128 end of kernel end trace frame: 0xc00040d7a0, count: -14 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff8000149d4380 rbx 0xffff8000149d4430 rdx 0x2 rcx 0 rax 0 r8 0xffff8000149d4340 r9 0x1 r10 0 r11 0xd7f3274229eac75e r12 0x3000000008 r13 0xffff8000149d4390 r14 0x100 r15 0x1 rip 0xffffffff813d6078 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000149d4370 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-fuzzer) pid=334647 stat=onproc flags process=2 proc=4000000 pri=17, usrpri=51, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff5078,0xffff8000ffff59e8 process=0xffff800014972360 user=0xffff8000149cf000, vmspace=0xfffffd803f014738 estcpu=1, cpticks=3, pctcpu=0.0 user=0, sys=2, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 76131 69645 0 0 3 0x14200 bored sosplice 43838 455773 40633 0 3 0x82 thrsleep syz-fuzzer 43838 460373 40633 0 3 0x4000082 nanosleep syz-fuzzer 43838 510972 40633 0 3 0x4000082 thrsleep syz-fuzzer 43838 111236 40633 0 3 0x4000082 thrsleep syz-fuzzer *43838 334647 40633 0 7 0x4000002 syz-fuzzer 43838 521375 40633 0 3 0x4000082 thrsleep syz-fuzzer 43838 363467 40633 0 3 0x4000082 thrsleep syz-fuzzer 43838 145150 40633 0 3 0x4000082 thrsleep syz-fuzzer 43838 394962 40633 0 3 0x4000002 biowait syz-fuzzer 40633 199480 32594 0 3 0x10008a pause ksh 32594 120743 64634 0 3 0x92 select sshd 52037 7375 1 0 3 0x100083 ttyin getty 64634 20167 1 0 3 0x80 select sshd 68306 56518 51109 73 3 0x100010 ffs_fsync syslogd 51109 108335 1 0 3 0x100082 netio syslogd 7404 9285 1 77 3 0x100090 poll dhclient 15595 323170 1 0 3 0x80 poll dhclient 26112 338155 0 0 3 0x14200 pgzero zerothread 95672 305746 0 0 3 0x14200 aiodoned aiodoned 62177 55687 0 0 3 0x14200 syncer update 17424 428697 0 0 3 0x14200 cleaner cleaner 30422 437090 0 0 3 0x14200 reaper reaper 60197 159331 0 0 3 0x14200 pgdaemon pagedaemon 19380 190771 0 0 3 0x14200 bored crynlk 48209 501373 0 0 3 0x14200 bored crypto 51911 232941 0 0 3 0x40014200 acpi0 acpi0 13822 301586 0 0 3 0x14200 bored softnet 30832 299829 0 0 3 0x14200 bored systqmp 48685 207993 0 0 3 0x14200 bored systq 97430 164363 0 0 3 0x40014200 bored softclock 83590 139016 0 0 3 0x40014200 idle0 13412 304282 0 0 3 0x14200 bored smr 1 137251 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 9494 6336K 6594K 78643K 11668 0 0 pcb 23 9K 10K 78643K 525 0 0 rtable 64 2K 3K 78643K 796 0 0 ifaddr 45 11K 13K 78643K 210 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 32 0 0 iov 0 0K 24K 78643K 135 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1198 75K 75K 78643K 2131 0 0 UFS quota 1 32K 32K 78643K 1 0 0 UFS mount 5 36K 36K 78643K 5 0 0 shm 2 1K 9K 78643K 25 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 0K 0K 78643K 217 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12537 0 0 file desc 2 1K 25K 78643K 1283 0 0 sigio 0 0K 0K 78643K 6 0 0 proc 42 30K 46K 78643K 696 0 0 subproc 0 0K 67586K 78643K 578 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 115 0 0 in_multi 11 0K 2K 78643K 225 0 0 ether_multi 1 0K 0K 78643K 16 0 0 mrt 0 0K 0K 78643K 11 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 66 291K 291K 78643K 66 0 0 exec 0 0K 1K 78643K 363 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 70 4K 38K 78643K 4079 0 0 UVM aobj 93 3K 3K 78643K 96 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 44 0 0 NDP 10 0K 0K 78643K 78 0 0 temp 109 2349K 2424K 78643K 7136 0 0 kqueue 0 0K 0K 78643K 3 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 19 0 17 1 0 1 1 0 8 0 inpcbpl 280 565 0 558 1 0 1 1 0 8 0 plimitpl 152 87 0 82 1 0 1 1 0 8 0 rtentry 112 176 0 154 3 1 2 2 0 8 1 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 4 0 4 1 1 0 1 0 8 0 tcpcb 544 192 0 188 1 0 1 1 0 8 0 nd6 48 34 0 34 1 0 1 1 0 8 1 ppxss 1128 3 0 3 2 2 0 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 846 0 750 14 2 12 12 0 8 6 art_table 32 847 0 750 2 0 2 2 0 8 1 art_node 16 175 0 155 1 0 1 1 0 8 0 sysvmsgpl 40 29 0 24 1 0 1 1 0 8 0 semapl 112 215 0 205 1 0 1 1 0 8 0 shmpl 112 94 0 3 3 0 3 3 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 3552 0 2106 47 0 47 47 0 8 0 ffsino 240 3552 0 2106 86 0 86 86 0 8 0 nchpl 144 5443 0 3813 62 0 62 62 0 8 0 uvmvnodes 72 4035 0 0 74 0 74 74 0 8 0 vnodes 200 4035 0 0 213 0 213 213 0 8 0 namei 1024 15798 0 15798 7 6 1 1 0 8 1 scxspl 192 26477 0 26475 12 11 1 6 0 8 0 sigapl 432 1408 0 1398 2 0 2 2 0 8 0 futexpl 56 14386 0 14386 6 6 0 1 0 8 0 knotepl 112 607 0 586 1 0 1 1 0 8 0 kqueuepl 104 238 0 236 1 0 1 1 0 8 0 pipepl 112 564 0 553 2 1 1 1 0 8 0 fdescpl 424 1409 0 1398 2 0 2 2 0 8 0 filepl 120 7498 0 7443 5 2 3 4 0 8 0 lockfpl 104 253 0 253 5 5 0 1 0 8 0 lockfspl 32 192 0 192 5 5 0 1 0 8 0 sessionpl 112 32 0 24 1 0 1 1 0 8 0 pgrppl 48 39 0 31 1 0 1 1 0 8 0 ucredpl 96 2279 0 2272 1 0 1 1 0 8 0 zombiepl 144 1398 0 1398 2 1 1 1 0 8 1 processpl 840 1424 0 1398 4 0 4 4 0 8 0 procpl 600 3121 0 3087 5 1 4 4 0 8 0 sosppl 128 6 0 6 2 2 0 1 0 8 0 sockpl 384 993 0 976 6 4 2 3 0 8 0 mcl64k 65536 2089 0 2089 35 35 0 32 0 8 0 mcl12k 12288 10 0 10 2 2 0 1 0 8 0 mcl9k 9216 20 0 20 5 4 1 1 0 8 1 mcl8k 8192 18 0 18 4 4 0 1 0 8 0 mcl4k 4096 60 0 60 6 6 0 1 0 8 0 mcl2k2 2112 45 0 45 4 4 0 1 0 8 0 mcl2k 2048 18418 0 18365 51 40 11 13 0 8 1 mtagpl 80 4 0 4 2 2 0 1 0 8 0 mbufpl 256 47055 0 46990 48 39 9 22 0 8 1 bufpl 256 13299 0 6437 429 0 429 429 0 8 0 anonpl 16 259974 0 256355 90 56 34 48 0 62 7 amapchunkpl 152 9073 0 9000 36 22 14 24 0 158 8 amappl16 192 12267 0 12125 69 60 9 32 0 8 0 amappl15 184 5 0 5 1 1 0 1 0 8 0 amappl14 176 131 0 129 2 1 1 1 0 8 0 amappl13 168 294 0 294 2 1 1 1 0 8 1 amappl12 160 237 0 234 1 0 1 1 0 8 0 amappl11 152 309 0 295 1 0 1 1 0 8 0 amappl10 144 59 0 57 1 0 1 1 0 8 0 amappl9 136 873 0 872 1 0 1 1 0 8 0 amappl8 128 507 0 485 1 0 1 1 0 8 0 amappl7 120 59 0 52 1 0 1 1 0 8 0 amappl6 112 345 0 336 1 0 1 1 0 8 0 amappl5 104 461 0 451 1 0 1 1 0 8 0 amappl4 96 1371 0 1340 2 1 1 2 0 8 0 amappl3 88 438 0 431 1 0 1 1 0 8 0 amappl2 80 11401 0 11361 2 0 2 2 0 8 0 amappl1 72 35304 0 34925 26 17 9 19 0 8 0 amappl 72 3479 0 3453 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 95 0 3 2 0 2 2 0 8 0 uaddrrnd 24 1409 0 1398 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1409 0 1398 1 0 1 1 0 8 0 vmmpekpl 168 12981 0 12961 2 0 2 2 0 8 0 vmmpepl 168 153806 0 152907 142 90 52 74 0 357 1 vmsppl 264 1408 0 1398 6 5 1 2 0 8 0 pdppl 4096 2824 0 2796 7 2 5 6 0 8 0 pvpl 32 796615 0 790231 383 192 191 266 0 265 105 pmappl 200 1408 0 1398 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 694 0 136 16 0 16 16 0 8 0