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 *433735 28664 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(ffffffff821df5e1,ffffffff821f3c70,149,ffffffff821bcecf) at __assert+0x2e sys/kern/subr_prf.c:154 buf_free_pages(fffffd802b845f00) at buf_free_pages+0x1ee sys/kern/vfs_biomem.c:318 buf_dealloc_mem(fffffd802b845f00) at buf_dealloc_mem+0xe1 sys/kern/vfs_biomem.c:194 buf_put(fffffd802b845f00) at buf_put+0x172 sys/kern/vfs_bio.c:131 brelse(fffffd802b845f00) at brelse+0x257 sys/kern/vfs_bio.c:922 vinvalbuf(fffffd8036173e88,2,fffffd803f7c6ba0,ffff8000ffff9640,0,ffffffffffffffff) at vinvalbuf+0x3de sys/kern/vfs_subr.c:1974 ffs_truncate(fffffd80360b3e10,0,4,fffffd803f7c6ba0) at ffs_truncate+0xeb5 sys/ufs/ffs/ffs_inode.c:326 ufs_rmdir(ffff8000149082c8) at ufs_rmdir+0x3af sys/ufs/ufs/ufs_vnops.c:1357 VOP_RMDIR(fffffd802b808678,fffffd8036173e88,ffff8000149083c8) at VOP_RMDIR+0xf8 sys/kern/vfs_vops.c:473 dounlinkat(ffff8000ffff9640,b,c0017ddec0,8) at dounlinkat+0x14c sys/kern/vfs_syscalls.c:1818 syscall(ffff800014908540) at syscall+0x508 Xsyscall(0,145,c00002a000,145,100,f6) at Xsyscall+0x128 end of kernel end trace frame: 0xc000975808, 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(ffffffff821df5e1,ffffffff821f3c70,149,ffffffff821bcecf) at __assert+0x2e sys/kern/subr_prf.c:154 buf_free_pages(fffffd802b845f00) at buf_free_pages+0x1ee sys/kern/vfs_biomem.c:318 buf_dealloc_mem(fffffd802b845f00) at buf_dealloc_mem+0xe1 sys/kern/vfs_biomem.c:194 buf_put(fffffd802b845f00) at buf_put+0x172 sys/kern/vfs_bio.c:131 brelse(fffffd802b845f00) at brelse+0x257 sys/kern/vfs_bio.c:922 vinvalbuf(fffffd8036173e88,2,fffffd803f7c6ba0,ffff8000ffff9640,0,ffffffffffffffff) at vinvalbuf+0x3de sys/kern/vfs_subr.c:1974 ffs_truncate(fffffd80360b3e10,0,4,fffffd803f7c6ba0) at ffs_truncate+0xeb5 sys/ufs/ffs/ffs_inode.c:326 ufs_rmdir(ffff8000149082c8) at ufs_rmdir+0x3af sys/ufs/ufs/ufs_vnops.c:1357 VOP_RMDIR(fffffd802b808678,fffffd8036173e88,ffff8000149083c8) at VOP_RMDIR+0xf8 sys/kern/vfs_vops.c:473 dounlinkat(ffff8000ffff9640,b,c0017ddec0,8) at dounlinkat+0x14c sys/kern/vfs_syscalls.c:1818 syscall(ffff800014908540) at syscall+0x508 Xsyscall(0,145,c00002a000,145,100,f6) at Xsyscall+0x128 end of kernel end trace frame: 0xc000975808, count: -14 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff800014907da0 rbx 0xffff800014907e50 rdx 0x2 rcx 0 rax 0 r8 0xffff800014907d60 r9 0x1 r10 0 r11 0xd284fb5e2f833856 r12 0x3000000008 r13 0xffff800014907db0 r14 0x100 r15 0x1 rip 0xffffffff819109b8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800014907d90 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-fuzzer) pid=433735 stat=onproc flags process=2 proc=4000000 pri=17, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff53d0,0xffff8000ffff8290 process=0xffff8000148a2018 user=0xffff800014903000, vmspace=0xfffffd803f013770 estcpu=36, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 76096 83919 12593 0 3 0x80 nanosleep syz-executor.1 76096 251829 12593 0 3 0x4000080 poll syz-executor.1 76096 223598 12593 0 3 0x4000080 fsleep syz-executor.1 12593 69680 28664 0 3 0x82 nanosleep syz-executor.1 28041 149586 0 0 3 0x14200 bored sosplice 28664 338821 60233 0 3 0x82 thrsleep syz-fuzzer 28664 329024 60233 0 3 0x4000082 nanosleep syz-fuzzer 28664 415177 60233 0 3 0x4000082 thrsleep syz-fuzzer 28664 204681 60233 0 3 0x4000082 thrsleep syz-fuzzer 28664 21035 60233 0 3 0x4000082 thrsleep syz-fuzzer *28664 433735 60233 0 7 0x4000002 syz-fuzzer 28664 278214 60233 0 3 0x4000082 thrsleep syz-fuzzer 28664 97753 60233 0 3 0x4000082 thrsleep syz-fuzzer 60233 269463 58228 0 3 0x10008a pause ksh 58228 67691 41845 0 3 0x92 select sshd 55518 311607 1 0 3 0x100083 ttyin getty 41845 324896 1 0 3 0x80 select sshd 10028 129728 33443 73 3 0x100090 kqread syslogd 33443 165890 1 0 3 0x100082 netio syslogd 97345 207489 0 0 3 0x14200 pgzero zerothread 50152 77187 0 0 3 0x14200 aiodoned aiodoned 860 432249 0 0 3 0x14200 syncer update 53997 178580 0 0 3 0x14200 cleaner cleaner 11456 34466 0 0 3 0x14200 reaper reaper 34964 208373 0 0 3 0x14200 pgdaemon pagedaemon 71664 151111 0 0 3 0x14200 bored crynlk 49691 166924 0 0 3 0x14200 bored crypto 83226 237889 0 0 3 0x40014200 acpi0 acpi0 58149 245279 0 0 3 0x14200 bored softnet 63254 67016 0 0 3 0x14200 bored systqmp 34367 395155 0 0 3 0x14200 bored systq 95758 292977 0 0 3 0x40014200 bored softclock 44831 86339 0 0 3 0x40014200 idle0 48267 85844 0 0 3 0x14200 bored smr 1 97756 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 9551 6315K 7596K 78643K 31357 0 0 pcb 13 8K 8K 78643K 643 0 0 rtable 70 3K 4K 78643K 1976 0 0 ifaddr 64 16K 19K 78643K 867 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 359 0 0 iov 0 0K 32K 78643K 857 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1197 75K 77K 78643K 8810 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 113 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 0K 0K 78643K 789 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12645 0 0 file desc 4 9K 25K 78643K 8299 0 0 sigio 0 0K 0K 78643K 94 0 0 proc 42 30K 54K 78643K 2189 0 0 subproc 16 1K 2K 78643K 529 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 770 0 0 in_multi 11 0K 2K 78643K 592 0 0 ether_multi 1 0K 0K 78643K 33 0 0 mrt 0 0K 0K 78643K 18 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 108 477K 477K 78643K 108 0 0 exec 0 0K 1K 78643K 1208 0 0 pfkey data 0 0K 4K 78643K 2 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 86 12K 31K 78643K 20443 0 0 UVM aobj 130 5K 5K 78643K 140 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 443 0 0 NDP 16 0K 1K 78643K 276 0 0 temp 181 3535K 4176K 78643K 134294 0 0 kqueue 0 0K 0K 78643K 50 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 68 0 66 1 0 1 1 0 8 0 rtpcb 80 656 0 656 10 9 1 1 0 8 1 rtentry 112 374 0 351 2 0 2 2 0 8 0 unpcb 120 2608 0 2602 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 1696 0 1696 1 1 0 1 0 8 0 tcpcb 544 1258 0 1254 1 0 1 1 0 8 0 ipq 40 27 0 27 9 9 0 1 0 8 0 ipqe 40 60 0 60 9 9 0 1 0 8 0 inpcb 280 4133 0 4129 3 2 1 2 0 8 0 nd6 48 93 0 93 1 0 1 1 0 8 1 pkpcb 40 30 0 30 9 8 1 1 0 8 1 swfcl 56 11 0 0 1 0 1 1 0 8 0 ppxss 1128 113 0 113 26 25 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 1530 0 1433 24 11 13 13 0 8 6 art_table 32 1531 0 1433 2 0 2 2 0 8 1 art_node 16 368 0 348 1 0 1 1 0 8 0 sysvmsgpl 40 16 0 14 1 0 1 1 0 8 0 semapl 112 785 0 775 1 0 1 1 0 8 0 shmpl 112 138 0 10 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 14380 0 12963 46 0 46 46 0 8 0 ffsino 240 14380 0 12963 84 0 84 84 0 8 0 nchpl 144 25938 0 24313 61 0 61 61 0 8 0 uvmvnodes 72 7892 0 0 144 0 144 144 0 8 0 vnodes 200 7892 0 0 416 0 416 416 0 8 0 namei 1024 85351 0 85351 6 5 1 1 0 8 1 scsiplug 64 16 0 16 9 9 0 1 0 8 0 scxspl 192 93779 0 93779 19 17 2 7 0 8 2 plimitpl 152 732 0 727 1 0 1 1 0 8 0 sigapl 432 8383 0 8373 2 0 2 2 0 8 0 futexpl 56 132229 0 132228 10 9 1 1 0 8 0 knotepl 112 1951 0 1930 1 0 1 1 0 8 0 kqueuepl 104 1761 0 1759 1 0 1 1 0 8 0 pipepl 112 4396 0 4381 8 7 1 2 0 8 0 fdescpl 424 8384 0 8373 2 0 2 2 0 8 0 filepl 120 49901 0 49835 16 12 4 5 0 8 1 lockfpl 104 2741 0 2741 7 6 1 1 0 8 1 lockfspl 48 931 0 931 7 6 1 1 0 8 1 sessionpl 112 46 0 39 1 0 1 1 0 8 0 pgrppl 48 138 0 131 1 0 1 1 0 8 0 ucredpl 96 10271 0 10265 1 0 1 1 0 8 0 zombiepl 144 8378 0 8378 1 0 1 1 0 8 1 processpl 864 8404 0 8378 4 0 4 4 0 8 0 procpl 632 18268 0 18233 4 0 4 4 0 8 0 sosppl 128 93 0 93 21 21 0 1 0 8 0 sockpl 384 7525 0 7515 11 8 3 3 0 8 1 mcl64k 65536 1255 0 1255 126 125 1 33 0 8 1 mcl16k 16384 49 0 49 32 31 1 1 0 8 1 mcl12k 12288 157 0 157 23 22 1 1 0 8 1 mcl9k 9216 94 0 94 27 26 1 1 0 8 1 mcl8k 8192 151 0 151 24 23 1 1 0 8 1 mcl4k 4096 591 0 591 6 5 1 1 0 8 1 mcl2k2 2112 36 0 36 19 19 0 1 0 8 0 mcl2k 2048 70795 0 70755 19 13 6 13 0 8 0 mtagpl 80 230 0 230 7 6 1 1 0 8 1 mbufpl 256 153667 0 153617 77 70 7 23 0 8 0 bufpl 256 33224 0 24862 524 1 523 523 0 8 0 anonpl 16 796935 0 784995 237 172 65 73 0 62 8 amapchunkpl 152 38843 0 38747 110 102 8 18 0 158 3 amappl16 192 43809 0 43119 270 223 47 55 0 8 11 amappl15 184 1150 0 1150 8 8 0 1 0 8 0 amappl14 176 1076 0 1069 1 0 1 1 0 8 0 amappl13 168 1247 0 1247 7 6 1 1 0 8 1 amappl12 160 531 0 530 1 0 1 1 0 8 0 amappl11 152 1091 0 1087 1 0 1 1 0 8 0 amappl10 144 863 0 862 1 0 1 1 0 8 0 amappl9 136 3236 0 3234 1 0 1 1 0 8 0 amappl8 128 2720 0 2695 1 0 1 1 0 8 0 amappl7 120 903 0 895 1 0 1 1 0 8 0 amappl6 112 1043 0 1034 1 0 1 1 0 8 0 amappl5 104 1012 0 1005 1 0 1 1 0 8 0 amappl4 96 9135 0 9109 1 0 1 1 0 8 0 amappl3 88 1190 0 1180 1 0 1 1 0 8 0 amappl2 80 65709 0 65651 3 1 2 3 0 8 0 amappl1 72 156402 0 156023 30 22 8 19 0 8 0 amappl 80 18995 0 18966 1 0 1 1 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 139 0 10 3 0 3 3 0 8 0 uaddrrnd 24 8384 0 8373 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 8384 0 8373 1 0 1 1 0 8 0 vmmpekpl 168 50599 0 50577 2 0 2 2 0 8 0 vmmpepl 168 978550 0 976947 384 295 89 107 0 357 8 vmsppl 272 8383 0 8373 2 1 1 2 0 8 0 pdppl 4096 16774 0 16746 6 1 5 6 0 8 0 pvpl 32 2376419 0 2361552 722 487 235 268 0 265 99 pmappl 200 8383 0 8373 1 0 1 1 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 937 0 288 19 0 19 19 0 8 0