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 * 24733 26413 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(ffffffff821e5f7a,ffffffff821f8de9,149,ffffffff821c2769) at __assert+0x2b sys/kern/subr_prf.c:154 buf_free_pages(fffffd803ae9fd00) at buf_free_pages+0x1ee sys/kern/vfs_biomem.c:318 buf_dealloc_mem(fffffd803ae9fd00) at buf_dealloc_mem+0xe1 sys/kern/vfs_biomem.c:194 buf_put(fffffd803ae9fd00) at buf_put+0x16b sys/kern/vfs_bio.c:131 brelse(fffffd803ae9fd00) at brelse+0x257 sys/kern/vfs_bio.c:922 vinvalbuf(fffffd80295b5690,2,fffffd803f7c6c00,ffff8000ffff8770,0,ffffffffffffffff) at vinvalbuf+0x3b1 sys/kern/vfs_subr.c:1977 ffs_truncate(fffffd80360a3698,0,4,fffffd803f7c6c00) at ffs_truncate+0xeb1 sys/ufs/ffs/ffs_inode.c:326 ufs_rmdir(ffff80001490a788) at ufs_rmdir+0x3af sys/ufs/ufs/ufs_vnops.c:1357 VOP_RMDIR(fffffd80346054e8,fffffd80295b5690,ffff80001490a888) at VOP_RMDIR+0xf8 sys/kern/vfs_vops.c:474 dounlinkat(ffff8000ffff8770,b,c00313f820,8) at dounlinkat+0x14c sys/kern/vfs_syscalls.c:1818 syscall(ffff80001490aa00) at syscall+0x507 sys/arch/amd64/amd64/trap.c:555 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xc0025055c8, 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(ffffffff821e5f7a,ffffffff821f8de9,149,ffffffff821c2769) at __assert+0x2b sys/kern/subr_prf.c:154 buf_free_pages(fffffd803ae9fd00) at buf_free_pages+0x1ee sys/kern/vfs_biomem.c:318 buf_dealloc_mem(fffffd803ae9fd00) at buf_dealloc_mem+0xe1 sys/kern/vfs_biomem.c:194 buf_put(fffffd803ae9fd00) at buf_put+0x16b sys/kern/vfs_bio.c:131 brelse(fffffd803ae9fd00) at brelse+0x257 sys/kern/vfs_bio.c:922 vinvalbuf(fffffd80295b5690,2,fffffd803f7c6c00,ffff8000ffff8770,0,ffffffffffffffff) at vinvalbuf+0x3b1 sys/kern/vfs_subr.c:1977 ffs_truncate(fffffd80360a3698,0,4,fffffd803f7c6c00) at ffs_truncate+0xeb1 sys/ufs/ffs/ffs_inode.c:326 ufs_rmdir(ffff80001490a788) at ufs_rmdir+0x3af sys/ufs/ufs/ufs_vnops.c:1357 VOP_RMDIR(fffffd80346054e8,fffffd80295b5690,ffff80001490a888) at VOP_RMDIR+0xf8 sys/kern/vfs_vops.c:474 dounlinkat(ffff8000ffff8770,b,c00313f820,8) at dounlinkat+0x14c sys/kern/vfs_syscalls.c:1818 syscall(ffff80001490aa00) at syscall+0x507 sys/arch/amd64/amd64/trap.c:555 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xc0025055c8, count: -14 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80001490a260 rbx 0xffff80001490a310 rdx 0x2 rcx 0 rax 0 r8 0xffff80001490a220 r9 0x1 r10 0 r11 0xdd390f03dc11518e r12 0x3000000008 r13 0xffff80001490a270 r14 0x100 r15 0x1 rip 0xffffffff81038768 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80001490a250 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-fuzzer) pid=24733 stat=onproc flags process=2 proc=4000000 pri=17, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff5b38,0xffff8000ffff8ee8 process=0xffff8000148a2018 user=0xffff800014905000, vmspace=0xfffffd803f012aa0 estcpu=6, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 87649 193300 0 0 3 0x14200 bored sosplice 59261 386741 0 0 3 0x14200 acct acct 26413 92348 99023 0 3 0x82 thrsleep syz-fuzzer 26413 352789 99023 0 3 0x4000082 nanosleep syz-fuzzer 26413 97965 99023 0 3 0x4000082 thrsleep syz-fuzzer 26413 54656 99023 0 3 0x4000082 thrsleep syz-fuzzer 26413 145453 99023 0 3 0x4000082 thrsleep syz-fuzzer *26413 24733 99023 0 7 0x4000002 syz-fuzzer 26413 469065 99023 0 3 0x4000082 thrsleep syz-fuzzer 26413 294698 99023 0 3 0x4000082 thrsleep syz-fuzzer 26413 265147 99023 0 3 0x4000082 thrsleep syz-fuzzer 99023 405677 72839 0 3 0x10008a pause ksh 72839 234449 93386 0 3 0x92 select sshd 5727 493433 1 0 3 0x100083 ttyin getty 93386 378366 1 0 3 0x80 select sshd 92523 484123 22693 73 3 0x100010 biowait syslogd 22693 74443 1 0 3 0x100082 netio syslogd 56287 371854 0 0 3 0x14200 pgzero zerothread 21660 379430 0 0 3 0x14200 aiodoned aiodoned 24405 200515 0 0 3 0x14200 syncer update 68332 513859 0 0 3 0x14200 cleaner cleaner 46811 120609 0 0 3 0x14200 reaper reaper 43309 161350 0 0 3 0x14200 pgdaemon pagedaemon 41464 348845 0 0 3 0x14200 bored crynlk 23598 121612 0 0 3 0x14200 bored crypto 18973 300259 0 0 3 0x40014200 acpi0 acpi0 64561 307008 0 0 3 0x14200 bored softnet 66501 80233 0 0 3 0x14200 bored systqmp 624 422758 0 0 3 0x14200 bored systq 37760 367789 0 0 3 0x40014200 bored softclock 37543 347677 0 0 3 0x40014200 idle0 15733 198186 0 0 3 0x14200 bored smr 1 51115 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 6322K 8297K 78643K 20685 0 0 pcb 13 11K 12K 78643K 413 0 0 rtable 86 11K 13K 78643K 1333 0 0 ifaddr 151 20K 23K 78643K 453 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 130 0 0 iov 0 0K 28K 78643K 489 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1246 78K 78K 78643K 4116 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 35 0 0 VM map 23 5K 6K 78643K 36 0 0 sem 12 0K 1K 78643K 299 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1794 195K 288K 78643K 12646 0 0 file desc 2 1K 25K 78643K 1775 0 0 sigio 0 0K 0K 78643K 13 0 0 proc 44 30K 55K 78643K 972 0 0 subproc 0 0K 2K 78643K 238 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 189 0 0 in_multi 96 5K 6K 78643K 302 0 0 ether_multi 1 0K 0K 78643K 16 0 0 mrt 0 0K 0K 78643K 19 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 126 556K 556K 78643K 126 0 0 exec 0 0K 1K 78643K 554 0 0 pfkey data 0 0K 4K 78643K 1 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 139 177K 196K 78643K 5454 0 0 UVM aobj 130 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 0K 78643K 385 0 0 NDP 18 0K 1K 78643K 112 0 0 temp 123 3529K 4179K 78643K 108502 0 0 kqueue 0 0K 0K 78643K 25 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 53 0 50 1 0 1 1 0 8 0 rtpcb 80 247 0 247 1 1 0 1 0 8 0 rtentry 112 248 0 221 2 0 2 2 0 8 0 unpcb 120 1167 0 1161 2 1 1 2 0 8 0 syncache 264 10 0 10 4 4 0 1 0 8 0 tcpqe 32 69 0 69 2 2 0 1 0 8 0 tcpcb 544 2006 0 2002 31 30 1 15 0 8 0 ipq 40 31 0 31 7 7 0 1 0 8 0 ipqe 40 926 0 926 7 7 0 1 0 8 0 inpcb 280 4501 0 4497 22 21 1 9 0 8 0 rttmr 72 4 0 4 4 4 0 1 0 8 0 nd6 48 36 0 36 1 1 0 1 0 8 0 pkpcb 40 18 0 18 7 7 0 1 0 8 0 ppxss 1128 29 0 29 5 5 0 1 0 8 0 art_heap8 4096 3 0 0 3 0 3 3 0 8 0 art_heap4 256 1084 0 944 19 6 13 15 0 8 0 art_table 32 1087 0 944 2 0 2 2 0 8 0 art_node 16 247 0 222 1 0 1 1 0 8 0 sysvmsgpl 40 24 0 20 2 1 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 295 0 285 1 0 1 1 0 8 0 shmpl 112 132 0 4 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 4185 0 2786 46 0 46 46 0 8 0 ffsino 240 4185 0 2786 83 0 83 83 0 8 0 nchpl 144 7084 0 5485 60 0 60 60 0 8 0 uvmvnodes 72 6321 0 0 115 0 115 115 0 8 0 vnodes 208 6321 0 0 333 0 333 333 0 8 0 namei 1024 25470 0 25470 3 2 1 1 0 8 1 vcpupl 1984 21 0 0 3 0 3 3 0 8 0 vmpool 520 34 0 13 2 0 2 2 0 8 0 scsiplug 64 1 0 1 1 1 0 1 0 8 0 scxspl 192 24363 0 24362 16 15 1 7 0 8 0 plimitpl 152 155 0 151 1 0 1 1 0 8 0 sigapl 432 1909 0 1901 2 0 2 2 0 8 0 futexpl 56 63391 0 63391 3 3 0 1 0 8 0 knotepl 112 469 0 454 2 1 1 2 0 8 0 kqueuepl 104 890 0 888 7 6 1 4 0 8 0 pipepl 128 2066 0 2055 5 3 2 2 0 8 0 fdescpl 424 1910 0 1901 2 0 2 2 0 8 0 filepl 120 20521 0 20476 23 20 3 11 0 8 0 lockfpl 104 730 0 730 1 1 0 1 0 8 0 lockfspl 48 238 0 238 1 1 0 1 0 8 0 sessionpl 112 29 0 23 1 0 1 1 0 8 0 pgrppl 48 73 0 67 1 0 1 1 0 8 0 ucredpl 96 2046 0 2040 1 0 1 1 0 8 0 zombiepl 144 1901 0 1901 1 0 1 1 0 8 1 processpl 864 1926 0 1901 4 0 4 4 0 8 0 procpl 632 4072 0 4039 6 2 4 5 0 8 0 sosppl 128 15 0 15 6 6 0 1 0 8 0 sockpl 384 5978 0 5966 31 28 3 14 0 8 0 mcl64k 65536 346 0 346 15 15 0 7 0 8 0 mcl16k 16384 35 0 35 5 5 0 1 0 8 0 mcl12k 12288 92 0 92 3 3 0 1 0 8 0 mcl9k 9216 27 0 27 7 7 0 1 0 8 0 mcl8k 8192 120 0 120 3 3 0 1 0 8 0 mcl4k 4096 244 0 244 3 3 0 1 0 8 0 mcl2k2 2112 28 0 28 8 8 0 1 0 8 0 mcl2k 2048 71297 0 71250 19 12 7 15 0 8 0 mtagpl 80 130 0 130 2 2 0 1 0 8 0 mbufpl 256 134760 0 134701 86 79 7 39 0 8 0 bufpl 256 14073 0 7755 396 0 396 396 0 8 0 anonpl 16 288781 0 267493 146 41 105 105 0 62 15 amapchunkpl 152 11029 0 10871 60 43 17 20 0 158 10 amappl16 192 12102 0 10935 131 71 60 78 0 8 0 amappl15 184 238 0 238 3 2 1 1 0 8 1 amappl14 176 387 0 381 1 0 1 1 0 8 0 amappl13 168 2 0 1 2 1 1 1 0 8 0 amappl12 160 69 0 68 1 0 1 1 0 8 0 amappl11 152 495 0 491 1 0 1 1 0 8 0 amappl10 144 557 0 555 1 0 1 1 0 8 0 amappl9 136 801 0 800 1 0 1 1 0 8 0 amappl8 128 416 0 364 2 0 2 2 0 8 0 amappl7 120 646 0 637 1 0 1 1 0 8 0 amappl6 112 467 0 451 1 0 1 1 0 8 0 amappl5 104 335 0 328 1 0 1 1 0 8 0 amappl4 96 2121 0 2096 1 0 1 1 0 8 0 amappl3 88 258 0 251 1 0 1 1 0 8 0 amappl2 80 13947 0 13904 3 1 2 3 0 8 0 amappl1 72 45164 0 44812 26 17 9 20 0 8 0 amappl 80 4525 0 4479 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 dma128 128 253 0 253 1 1 0 1 0 8 0 dma64 64 6 0 6 1 1 0 1 0 8 0 dma32 32 7 0 7 1 1 0 1 0 8 0 dma16 16 18 0 17 1 0 1 1 0 8 0 aobjpl 64 133 0 4 3 0 3 3 0 8 0 uaddrrnd 24 1944 0 1901 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1944 0 1901 1 0 1 1 0 8 0 vmmpekpl 168 18231 0 18203 2 0 2 2 0 8 0 vmmpepl 168 244839 0 242863 231 102 129 151 0 357 25 vmsppl 272 1909 0 1901 4 3 1 2 0 8 0 pdppl 4096 3894 0 3849 11 4 7 8 0 8 0 pvpl 32 786118 0 762297 463 138 325 341 0 265 125 pmappl 200 1943 0 1914 2 0 2 2 0 8 0 extentpl 40 46 0 29 1 0 1 1 0 8 0 phpool 112 686 0 164 17 0 17 17 0 8 0