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 *278944 46738 0 0x2 0 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(ffffffff81f449ad,ffffffff81f58c61,149,ffffffff81f25622) at __assert+0x2e sys/kern/subr_prf.c:155 buf_free_pages(fffffd803bf62300) at buf_free_pages+0x1ec sys/kern/vfs_biomem.c:318 buf_dealloc_mem(fffffd803bf62300) at buf_dealloc_mem+0xe1 sys/kern/vfs_biomem.c:194 buf_put(fffffd803bf62300) at buf_put+0x172 sys/kern/vfs_bio.c:130 brelse(fffffd803bf62300) at brelse+0x257 sys/kern/vfs_bio.c:926 vinvalbuf(fffffd802e67b680,2,ffffffffffffffff,ffff8000ffff5528,0,0) at vinvalbuf+0x36b sys/kern/vfs_subr.c:1937 ffs_truncate(fffffd803d236a58,0,0,ffffffffffffffff) at ffs_truncate+0xfad sys/ufs/ffs/ffs_inode.c:325 ufs_inactive(ffff80001499a8f0) at ufs_inactive+0x159 sys/ufs/ufs/ufs_inode.c:85 VOP_INACTIVE(fffffd802e67b680,ffff8000ffff5528) at VOP_INACTIVE+0x58 sys/kern/vfs_vops.c:572 vput(fffffd802e67b680) at vput+0xae sys/kern/vfs_subr.c:765 ufs_remove(ffff80001499a9e0) at ufs_remove+0x13c sys/ufs/ufs/ufs_vnops.c:620 VOP_REMOVE(fffffd802e67b4f0,fffffd802e67b680,ffff80001499aae0) at VOP_REMOVE+0x6d sys/kern/vfs_vops.c:378 end trace frame: 0xffff80001499ab70, count: 0 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(ffffffff81f449ad,ffffffff81f58c61,149,ffffffff81f25622) at __assert+0x2e sys/kern/subr_prf.c:155 buf_free_pages(fffffd803bf62300) at buf_free_pages+0x1ec sys/kern/vfs_biomem.c:318 buf_dealloc_mem(fffffd803bf62300) at buf_dealloc_mem+0xe1 sys/kern/vfs_biomem.c:194 buf_put(fffffd803bf62300) at buf_put+0x172 sys/kern/vfs_bio.c:130 brelse(fffffd803bf62300) at brelse+0x257 sys/kern/vfs_bio.c:926 vinvalbuf(fffffd802e67b680,2,ffffffffffffffff,ffff8000ffff5528,0,0) at vinvalbuf+0x36b sys/kern/vfs_subr.c:1937 ffs_truncate(fffffd803d236a58,0,0,ffffffffffffffff) at ffs_truncate+0xfad sys/ufs/ffs/ffs_inode.c:325 ufs_inactive(ffff80001499a8f0) at ufs_inactive+0x159 sys/ufs/ufs/ufs_inode.c:85 VOP_INACTIVE(fffffd802e67b680,ffff8000ffff5528) at VOP_INACTIVE+0x58 sys/kern/vfs_vops.c:572 vput(fffffd802e67b680) at vput+0xae sys/kern/vfs_subr.c:765 ufs_remove(ffff80001499a9e0) at ufs_remove+0x13c sys/ufs/ufs/ufs_vnops.c:620 VOP_REMOVE(fffffd802e67b4f0,fffffd802e67b680,ffff80001499aae0) at VOP_REMOVE+0x6d sys/kern/vfs_vops.c:378 dounlinkat(ffff8000ffff5528,e,c0010d2800,0) at dounlinkat+0x1a1 sys/kern/vfs_syscalls.c:1709 syscall(ffff80001499ac70) at syscall+0x541 Xsyscall(6,145,c00002c000,145,38,200) at Xsyscall+0x128 end of kernel end trace frame: 0xc0013055c0, count: -17 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80001499a3d0 rbx 0xffff80001499a480 rdx 0x2 rcx 0 rax 0 r8 0xffff80001499a390 r9 0x1 r10 0 r11 0x16acf84341daf7d6 r12 0x3000000008 r13 0xffff80001499a3e0 r14 0x100 r15 0x1 rip 0xffffffff8185e038 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80001499a3c0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-fuzzer) pid=278944 stat=onproc flags process=2 proc=0 pri=17, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff4718,0xffff8000ffff5088 process=0xffff8000149626a8 user=0xffff800014995000, vmspace=0xfffffd803f013420 estcpu=0, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 63224 490439 1 0 3 0x100083 ttyin getty 59914 24744 0 0 3 0x14200 bored sosplice *46738 278944 38643 0 7 0x2 syz-fuzzer 46738 512378 38643 0 3 0x4000082 nanosleep syz-fuzzer 46738 490322 38643 0 3 0x4000082 thrsleep syz-fuzzer 46738 197688 38643 0 3 0x4000082 thrsleep syz-fuzzer 46738 160992 38643 0 3 0x4000082 thrsleep syz-fuzzer 46738 79697 38643 0 3 0x4000082 thrsleep syz-fuzzer 46738 29752 38643 0 3 0x4000082 thrsleep syz-fuzzer 46738 498343 38643 0 3 0x4000082 thrsleep syz-fuzzer 38643 277653 78295 0 3 0x10008a pause ksh 78295 287131 64193 0 3 0x92 select sshd 64193 327746 1 0 3 0x80 select sshd 8983 91630 10842 73 3 0x100010 ffs_fsync syslogd 10842 251740 1 0 3 0x100082 netio syslogd 51561 405231 1 77 3 0x100090 poll dhclient 60633 401929 1 0 3 0x80 poll dhclient 99768 137742 0 0 3 0x14200 pgzero zerothread 27975 168170 0 0 3 0x14200 aiodoned aiodoned 42929 201122 0 0 3 0x14200 syncer update 62500 164525 0 0 3 0x14200 cleaner cleaner 51097 34192 0 0 3 0x14200 reaper reaper 16195 516821 0 0 3 0x14200 pgdaemon pagedaemon 89899 63048 0 0 3 0x14200 bored crynlk 33688 136375 0 0 3 0x14200 bored crypto 52613 451768 0 0 3 0x40014200 acpi0 acpi0 4998 99250 0 0 3 0x14200 bored softnet 59884 156041 0 0 3 0x14200 bored systqmp 40808 481856 0 0 3 0x14200 bored systq 92892 294814 0 0 3 0x40014200 bored softclock 72670 140438 0 0 3 0x40014200 idle0 61404 225156 0 0 3 0x14200 bored smr 1 470557 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 9514 6346K 6585K 78643K 11362 0 0 pcb 23 9K 10K 78643K 583 0 0 rtable 64 2K 3K 78643K 580 0 0 ifaddr 52 12K 15K 78643K 212 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 53 0 0 iov 0 0K 32K 78643K 158 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1195 75K 76K 78643K 2002 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 16 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 0K 0K 78643K 162 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12537 0 0 file desc 2 1K 21K 78643K 1126 0 0 sigio 0 0K 0K 78643K 33 0 0 proc 41 30K 46K 78643K 558 0 0 subproc 0 0K 67586K 78643K 273 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 138 0 0 in_multi 11 0K 2K 78643K 159 0 0 ether_multi 1 0K 0K 78643K 9 0 0 mrt 0 0K 0K 78643K 6 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 84 371K 371K 78643K 84 0 0 exec 0 0K 1K 78643K 325 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 69 4K 39K 78643K 3550 0 0 UVM aobj 67 3K 3K 78643K 82 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 95 0 0 NDP 12 0K 0K 78643K 64 0 0 temp 136 2357K 2999K 78643K 6438 0 0 kqueue 0 0K 0K 78643K 6 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 10 0 8 1 0 1 1 0 8 0 inpcbpl 280 559 0 552 1 0 1 1 0 8 0 plimitpl 152 56 0 51 1 0 1 1 0 8 0 rtentry 112 95 0 73 2 0 2 2 0 8 1 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpcb 544 198 0 194 1 0 1 1 0 8 0 nd6 48 16 0 16 1 0 1 1 0 8 1 ppxss 1128 24 0 24 6 6 0 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 440 0 344 12 0 12 12 0 8 6 art_table 32 441 0 344 2 0 2 2 0 8 1 art_node 16 94 0 74 1 0 1 1 0 8 0 sysvmsgpl 40 14 0 4 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 160 0 150 1 0 1 1 0 8 0 shmpl 112 80 0 15 2 0 2 2 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 3481 0 2031 47 0 47 47 0 8 0 ffsino 240 3481 0 2031 86 0 86 86 0 8 0 nchpl 144 5325 0 3674 62 0 62 62 0 8 0 uvmvnodes 72 3816 0 0 70 0 70 70 0 8 0 vnodes 200 3816 0 0 201 0 201 201 0 8 0 namei 1024 16597 0 16597 2 1 1 1 0 8 1 scsiplug 64 2 0 2 2 2 0 1 0 8 0 scxspl 192 20633 0 20632 17 16 1 6 0 8 0 sigapl 432 1280 0 1270 2 0 2 2 0 8 0 futexpl 56 19301 0 19301 1 1 0 1 0 8 0 knotepl 112 436 0 413 1 0 1 1 0 8 0 kqueuepl 104 327 0 325 1 0 1 1 0 8 0 pipepl 112 856 0 845 4 3 1 2 0 8 0 fdescpl 424 1281 0 1270 2 0 2 2 0 8 0 filepl 120 8314 0 8258 5 1 4 5 0 8 0 lockfpl 104 446 0 446 2 1 1 1 0 8 1 lockfspl 32 636 0 636 2 1 1 1 0 8 1 sessionpl 112 25 0 17 1 0 1 1 0 8 0 pgrppl 48 41 0 33 1 0 1 1 0 8 0 ucredpl 96 2216 0 2209 1 0 1 1 0 8 0 zombiepl 144 1270 0 1270 2 1 1 1 0 8 1 processpl 840 1296 0 1270 4 0 4 4 0 8 0 procpl 600 2791 0 2758 4 0 4 4 0 8 0 sosppl 128 4 0 4 2 2 0 1 0 8 0 sockpl 384 1036 0 1019 4 2 2 4 0 8 0 mcl64k 65536 41 0 41 8 8 0 1 0 8 0 mcl16k 16384 2 0 2 2 2 0 1 0 8 0 mcl12k 12288 16 0 16 7 7 0 1 0 8 0 mcl9k 9216 20 0 20 7 7 0 1 0 8 0 mcl8k 8192 21 0 21 6 6 0 1 0 8 0 mcl4k 4096 66 0 66 3 3 0 1 0 8 0 mcl2k2 2112 7 0 7 5 5 0 1 0 8 0 mcl2k 2048 49735 0 49697 15 9 6 11 0 8 0 mtagpl 80 6 0 6 2 1 1 1 0 8 1 mbufpl 256 87165 0 87114 14 7 7 7 0 8 1 bufpl 256 10060 0 4419 353 0 353 353 0 8 0 anonpl 16 155023 0 146804 90 37 53 54 0 62 13 amapchunkpl 152 5667 0 5588 17 2 15 15 0 158 10 amappl16 192 7273 0 6795 67 40 27 37 0 8 1 amappl15 184 56 0 51 1 0 1 1 0 8 0 amappl14 176 463 0 461 2 1 1 1 0 8 0 amappl13 168 298 0 295 1 0 1 1 0 8 0 amappl12 160 697 0 695 1 0 1 1 0 8 0 amappl11 152 16 0 5 1 0 1 1 0 8 0 amappl10 144 154 0 153 2 1 1 1 0 8 0 amappl9 136 558 0 556 1 0 1 1 0 8 0 amappl8 128 158 0 136 1 0 1 1 0 8 0 amappl7 120 129 0 123 1 0 1 1 0 8 0 amappl6 112 52 0 46 1 0 1 1 0 8 0 amappl5 104 450 0 440 1 0 1 1 0 8 0 amappl4 96 1337 0 1312 2 1 1 2 0 8 0 amappl3 88 996 0 991 1 0 1 1 0 8 0 amappl2 80 10290 0 10246 2 0 2 2 0 8 0 amappl1 72 31579 0 31196 26 17 9 19 0 8 0 amappl 72 3054 0 3027 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 81 0 15 2 0 2 2 0 8 0 uaddrrnd 24 1281 0 1270 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1281 0 1270 1 0 1 1 0 8 0 vmmpekpl 168 12508 0 12487 2 0 2 2 0 8 0 vmmpepl 168 146610 0 145374 148 78 70 94 0 357 4 vmsppl 264 1280 0 1270 3 2 1 2 0 8 0 pdppl 4096 2568 0 2540 5 0 5 5 0 8 0 pvpl 32 508763 0 497662 309 85 224 239 0 265 118 pmappl 200 1280 0 1270 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 513 0 38 14 0 14 14 0 8 0