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 * 22739 5123 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(ffffffff821e403b,ffffffff821f6a86,149,ffffffff821bfb90) at __assert+0x2b sys/kern/subr_prf.c:154 buf_free_pages(fffffd80277bc600) at buf_free_pages+0x1ee sys/kern/vfs_biomem.c:318 buf_dealloc_mem(fffffd80277bc600) at buf_dealloc_mem+0xe1 sys/kern/vfs_biomem.c:194 buf_put(fffffd80277bc600) at buf_put+0x16b sys/kern/vfs_bio.c:131 brelse(fffffd80277bc600) at brelse+0x257 sys/kern/vfs_bio.c:922 vinvalbuf(fffffd8035caaec0,2,fffffd803f7c6b40,ffff8000ffff2ee8,0,ffffffffffffffff) at vinvalbuf+0x3b1 sys/kern/vfs_subr.c:1977 ffs_truncate(fffffd8039f56a58,0,4,fffffd803f7c6b40) at ffs_truncate+0xeb1 sys/ufs/ffs/ffs_inode.c:326 ufs_rmdir(ffff800015932808) at ufs_rmdir+0x3af sys/ufs/ufs/ufs_vnops.c:1357 VOP_RMDIR(fffffd8036728900,fffffd8035caaec0,ffff800015932908) at VOP_RMDIR+0xf8 sys/kern/vfs_vops.c:474 dounlinkat(ffff8000ffff2ee8,9,c00334c320,8) at dounlinkat+0x14c sys/kern/vfs_syscalls.c:1818 syscall(ffff800015932a80) at syscall+0x507 sys/arch/amd64/amd64/trap.c:555 Xsyscall(0,145,c00002a000,145,100,19) at Xsyscall+0x128 end of kernel end trace frame: 0xc001edd978, 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(ffffffff821e403b,ffffffff821f6a86,149,ffffffff821bfb90) at __assert+0x2b sys/kern/subr_prf.c:154 buf_free_pages(fffffd80277bc600) at buf_free_pages+0x1ee sys/kern/vfs_biomem.c:318 buf_dealloc_mem(fffffd80277bc600) at buf_dealloc_mem+0xe1 sys/kern/vfs_biomem.c:194 buf_put(fffffd80277bc600) at buf_put+0x16b sys/kern/vfs_bio.c:131 brelse(fffffd80277bc600) at brelse+0x257 sys/kern/vfs_bio.c:922 vinvalbuf(fffffd8035caaec0,2,fffffd803f7c6b40,ffff8000ffff2ee8,0,ffffffffffffffff) at vinvalbuf+0x3b1 sys/kern/vfs_subr.c:1977 ffs_truncate(fffffd8039f56a58,0,4,fffffd803f7c6b40) at ffs_truncate+0xeb1 sys/ufs/ffs/ffs_inode.c:326 ufs_rmdir(ffff800015932808) at ufs_rmdir+0x3af sys/ufs/ufs/ufs_vnops.c:1357 VOP_RMDIR(fffffd8036728900,fffffd8035caaec0,ffff800015932908) at VOP_RMDIR+0xf8 sys/kern/vfs_vops.c:474 dounlinkat(ffff8000ffff2ee8,9,c00334c320,8) at dounlinkat+0x14c sys/kern/vfs_syscalls.c:1818 syscall(ffff800015932a80) at syscall+0x507 sys/arch/amd64/amd64/trap.c:555 Xsyscall(0,145,c00002a000,145,100,19) at Xsyscall+0x128 end of kernel end trace frame: 0xc001edd978, count: -14 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff8000159322e0 rbx 0xffff800015932390 rdx 0x2 rcx 0 rax 0 r8 0xffff8000159322a0 r9 0x1 r10 0 r11 0xad21d540c65b5da0 r12 0x3000000008 r13 0xffff8000159322f0 r14 0x100 r15 0x1 rip 0xffffffff81fcda18 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000159322d0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-fuzzer) pid=22739 stat=onproc flags process=2 proc=4000000 pri=17, usrpri=52, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff29f8,0xffff8000ffff38d8 process=0xffff8000148a2378 user=0xffff80001592d000, vmspace=0xfffffd803f013990 estcpu=36, cpticks=9, pctcpu=0.11 user=0, sys=2, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 18545 179244 5123 0 3 0x82 nanosleep syz-executor.0 47048 83450 1 0 3 0x100083 ttyin getty 43472 276673 0 0 3 0x14200 acct acct 26700 354763 0 0 3 0x14200 bored sosplice 5123 14222 13651 0 3 0x82 thrsleep syz-fuzzer 5123 428079 13651 0 3 0x4000082 nanosleep syz-fuzzer 5123 55445 13651 0 3 0x4000082 thrsleep syz-fuzzer 5123 270957 13651 0 3 0x4000082 thrsleep syz-fuzzer 5123 149386 13651 0 3 0x4000082 thrsleep syz-fuzzer 5123 186213 13651 0 3 0x4000082 thrsleep syz-fuzzer 5123 414323 13651 0 3 0x4000082 thrsleep syz-fuzzer * 5123 22739 13651 0 7 0x4000002 syz-fuzzer 13651 312832 96317 0 3 0x10008a pause ksh 96317 202308 29733 0 3 0x92 select sshd 29733 300913 1 0 3 0x80 select sshd 43709 238780 12921 73 3 0x100090 kqread syslogd 12921 7137 1 0 3 0x100082 netio syslogd 34509 415632 1 77 3 0x100090 poll dhclient 81762 11177 1 0 3 0x80 poll dhclient 15896 140683 0 0 3 0x14200 pgzero zerothread 95865 478486 0 0 3 0x14200 aiodoned aiodoned 95216 93510 0 0 3 0x14200 syncer update 88912 74206 0 0 3 0x14200 cleaner cleaner 90623 1993 0 0 3 0x14200 reaper reaper 5280 374262 0 0 3 0x14200 pgdaemon pagedaemon 29175 484243 0 0 3 0x14200 bored crynlk 82842 347361 0 0 3 0x14200 bored crypto 86053 402851 0 0 3 0x40014200 acpi0 acpi0 47506 84170 0 0 3 0x14200 bored softnet 93146 440618 0 0 3 0x14200 bored systqmp 36468 456919 0 0 3 0x14200 bored systq 50677 27087 0 0 3 0x40014200 bored softclock 76315 471724 0 0 3 0x40014200 idle0 24048 353229 0 0 3 0x14200 bored smr 1 289952 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 9583 7134K 7587K 78643K 22592 0 0 pcb 13 12K 14K 78643K 585 0 0 rtable 96 4K 5K 78643K 2082 0 0 ifaddr 74 15K 17K 78643K 478 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 166 0 0 iov 0 0K 24K 78643K 659 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1220 77K 78K 78643K 4927 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 52 0 0 VM map 13 3K 3K 78643K 22 0 0 sem 12 0K 1K 78643K 522 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12645 0 0 file desc 3 5K 25K 78643K 2978 0 0 sigio 0 0K 0K 78643K 30 0 0 proc 50 38K 63K 78643K 1267 0 0 subproc 16 1K 2K 78643K 323 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 250 0 0 in_multi 19 1K 2K 78643K 385 0 0 ether_multi 1 0K 0K 78643K 34 0 0 mrt 0 0K 0K 78643K 21 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 78 344K 344K 78643K 78 0 0 exec 0 0K 1K 78643K 717 0 0 pfkey data 0 0K 0K 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 128 112K 130K 78643K 8345 0 0 UVM aobj 130 4K 4K 78643K 172 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 732 0 0 NDP 18 0K 0K 78643K 162 0 0 temp 196 3543K 4184K 78643K 67754 0 0 kqueue 0 0K 0K 78643K 20 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 95 0 89 1 0 1 1 0 8 0 rtpcb 80 307 0 305 1 0 1 1 0 8 0 rtentry 112 401 0 366 2 0 2 2 0 8 0 unpcb 120 3292 0 3282 11 10 1 2 0 8 0 syncache 264 19 0 19 5 5 0 1 0 8 0 sackhl 24 3 0 3 3 3 0 1 0 8 0 tcpqe 32 4524 0 4524 3 3 0 1 0 8 0 tcpcb 544 1633 0 1629 17 16 1 14 0 8 0 ipq 40 12 0 12 5 5 0 1 0 8 0 ipqe 40 33 0 33 5 5 0 1 0 8 0 inpcb 280 5757 0 5750 33 31 2 13 0 8 1 rttmr 72 5 0 5 3 3 0 1 0 8 0 ip6q 72 3 0 3 2 2 0 1 0 8 0 ip6af 40 7 0 7 2 2 0 1 0 8 0 nd6 48 48 0 47 2 1 1 1 0 8 0 pkpcb 40 11 0 11 3 3 0 1 0 8 0 swfcl 56 2 0 0 1 0 1 1 0 8 0 ppxss 1128 46 0 46 15 14 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 1578 0 1408 35 20 15 15 0 8 1 art_table 32 1579 0 1408 2 0 2 2 0 8 0 art_node 16 400 0 367 1 0 1 1 0 8 0 sysvmsgpl 40 65 0 47 1 0 1 1 0 8 0 semupl 112 2 0 2 1 1 0 1 0 8 0 semapl 112 518 0 508 1 0 1 1 0 8 0 shmpl 112 170 0 42 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 5824 0 4432 46 0 46 46 0 8 0 ffsino 240 5824 0 4432 83 0 83 83 0 8 0 nchpl 144 10619 0 9013 60 0 60 60 0 8 0 uvmvnodes 72 6400 0 0 117 0 117 117 0 8 0 vnodes 208 6400 0 0 337 0 337 337 0 8 0 namei 1024 38794 0 38794 6 5 1 1 0 8 1 vcpupl 1984 11 0 0 2 0 2 2 0 8 0 vmpool 520 20 0 9 1 0 1 1 0 8 0 scsiplug 64 3 0 3 1 1 0 1 0 8 0 scxspl 192 39546 0 39546 23 20 3 7 0 8 3 plimitpl 152 238 0 232 1 0 1 1 0 8 0 sigapl 432 3101 0 3090 2 0 2 2 0 8 0 futexpl 56 89748 0 89748 5 4 1 1 0 8 1 knotepl 112 1050 0 1031 2 1 1 2 0 8 0 kqueuepl 104 1242 0 1240 4 3 1 4 0 8 0 pipepl 112 3668 0 3653 14 12 2 2 0 8 1 fdescpl 424 3102 0 3090 2 0 2 2 0 8 0 filepl 120 31532 0 31457 36 30 6 11 0 8 3 lockfpl 104 843 0 842 1 0 1 1 0 8 0 lockfspl 48 283 0 282 1 0 1 1 0 8 0 sessionpl 112 37 0 28 1 0 1 1 0 8 0 pgrppl 48 940 0 931 1 0 1 1 0 8 0 ucredpl 96 3211 0 3204 1 0 1 1 0 8 0 zombiepl 144 3092 0 3091 3 2 1 1 0 8 0 processpl 864 3120 0 3091 4 0 4 4 0 8 0 procpl 632 6714 0 6678 4 0 4 4 0 8 0 sosppl 128 110 0 110 11 10 1 1 0 8 1 sockpl 384 9458 0 9439 60 55 5 22 0 8 2 mcl64k 65536 759 0 759 77 76 1 33 0 8 1 mcl16k 16384 34 0 34 13 13 0 1 0 8 0 mcl12k 12288 65 0 65 16 15 1 1 0 8 1 mcl9k 9216 52 0 52 16 15 1 1 0 8 1 mcl8k 8192 210 0 210 10 9 1 1 0 8 1 mcl4k 4096 350 0 350 7 6 1 1 0 8 1 mcl2k2 2112 23 0 23 10 9 1 1 0 8 1 mcl2k 2048 68591 0 68544 17 10 7 14 0 8 0 mtagpl 80 129 0 118 8 7 1 1 0 8 0 mbufpl 256 137645 0 137520 99 85 14 41 0 8 2 bufpl 256 17265 0 10865 401 0 401 401 0 8 0 anonpl 16 406312 0 389112 192 105 87 88 0 62 12 amapchunkpl 152 17162 0 17058 82 66 16 19 0 158 11 amappl16 192 19512 0 18501 194 134 60 64 0 8 8 amappl15 184 329 0 329 3 3 0 1 0 8 0 amappl14 176 796 0 792 2 1 1 1 0 8 0 amappl13 168 318 0 318 4 3 1 1 0 8 1 amappl12 160 348 0 346 1 0 1 1 0 8 0 amappl11 152 353 0 340 1 0 1 1 0 8 0 amappl10 144 298 0 298 3 3 0 1 0 8 0 amappl9 136 1304 0 1299 1 0 1 1 0 8 0 amappl8 128 883 0 833 2 0 2 2 0 8 0 amappl7 120 388 0 382 1 0 1 1 0 8 0 amappl6 112 328 0 317 1 0 1 1 0 8 0 amappl5 104 646 0 636 1 0 1 1 0 8 0 amappl4 96 3119 0 3091 1 0 1 1 0 8 0 amappl3 88 1019 0 1014 1 0 1 1 0 8 0 amappl2 80 23497 0 23437 3 1 2 3 0 8 0 amappl1 72 66581 0 66187 26 16 10 20 0 8 0 amappl 80 7262 0 7224 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 17 0 17 1 1 0 1 0 8 0 aobjpl 64 171 0 42 3 0 3 3 0 8 0 uaddrrnd 24 3122 0 3090 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 3122 0 3090 1 0 1 1 0 8 0 vmmpekpl 168 27141 0 27111 2 0 2 2 0 8 0 vmmpepl 168 387761 0 385799 399 269 130 143 0 357 27 vmsppl 272 3101 0 3090 6 5 1 2 0 8 0 pdppl 4096 6250 0 6209 10 4 6 7 0 8 0 pvpl 32 1049139 0 1029262 491 207 284 308 0 265 111 pmappl 200 3121 0 3099 2 0 2 2 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 787 0 251 17 1 16 17 0 8 0