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 *237926 27894 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(ffffffff821e4d3c,ffffffff821f99fd,149,ffffffff821c32ca) at __assert+0x2b sys/kern/subr_prf.c:154 buf_free_pages(fffffd803cdbe600) at buf_free_pages+0x1ee sys/kern/vfs_biomem.c:318 buf_dealloc_mem(fffffd803cdbe600) at buf_dealloc_mem+0xe1 sys/kern/vfs_biomem.c:194 buf_put(fffffd803cdbe600) at buf_put+0x16b sys/kern/vfs_bio.c:131 brelse(fffffd803cdbe600) at brelse+0x257 sys/kern/vfs_bio.c:922 vinvalbuf(fffffd803923e278,2,fffffd803f7c6a80,ffff8000ffff5b38,0,ffffffffffffffff) at vinvalbuf+0x3b1 sys/kern/vfs_subr.c:1977 ffs_truncate(fffffd80249c0c40,0,4,fffffd803f7c6a80) at ffs_truncate+0xeb1 sys/ufs/ffs/ffs_inode.c:326 ufs_rmdir(ffff800014904518) at ufs_rmdir+0x3af sys/ufs/ufs/ufs_vnops.c:1357 VOP_RMDIR(fffffd803923e5b8,fffffd803923e278,ffff800014904618) at VOP_RMDIR+0xf8 sys/kern/vfs_vops.c:474 dounlinkat(ffff8000ffff5b38,b,c0016ced60,8) at dounlinkat+0x14c sys/kern/vfs_syscalls.c:1818 syscall(ffff800014904790) at syscall+0x507 sys/arch/amd64/amd64/trap.c:555 Xsyscall(0,145,c00002a000,145,100,6b) at Xsyscall+0x128 end of kernel end trace frame: 0xc000fe17e8, 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(ffffffff821e4d3c,ffffffff821f99fd,149,ffffffff821c32ca) at __assert+0x2b sys/kern/subr_prf.c:154 buf_free_pages(fffffd803cdbe600) at buf_free_pages+0x1ee sys/kern/vfs_biomem.c:318 buf_dealloc_mem(fffffd803cdbe600) at buf_dealloc_mem+0xe1 sys/kern/vfs_biomem.c:194 buf_put(fffffd803cdbe600) at buf_put+0x16b sys/kern/vfs_bio.c:131 brelse(fffffd803cdbe600) at brelse+0x257 sys/kern/vfs_bio.c:922 vinvalbuf(fffffd803923e278,2,fffffd803f7c6a80,ffff8000ffff5b38,0,ffffffffffffffff) at vinvalbuf+0x3b1 sys/kern/vfs_subr.c:1977 ffs_truncate(fffffd80249c0c40,0,4,fffffd803f7c6a80) at ffs_truncate+0xeb1 sys/ufs/ffs/ffs_inode.c:326 ufs_rmdir(ffff800014904518) at ufs_rmdir+0x3af sys/ufs/ufs/ufs_vnops.c:1357 VOP_RMDIR(fffffd803923e5b8,fffffd803923e278,ffff800014904618) at VOP_RMDIR+0xf8 sys/kern/vfs_vops.c:474 dounlinkat(ffff8000ffff5b38,b,c0016ced60,8) at dounlinkat+0x14c sys/kern/vfs_syscalls.c:1818 syscall(ffff800014904790) at syscall+0x507 sys/arch/amd64/amd64/trap.c:555 Xsyscall(0,145,c00002a000,145,100,6b) at Xsyscall+0x128 end of kernel end trace frame: 0xc000fe17e8, count: -14 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff800014903ff0 rbx 0xffff8000149040a0 rdx 0x2 rcx 0 rax 0 r8 0xffff800014903fb0 r9 0x1 r10 0 r11 0x3c9d32415efac5da r12 0x3000000008 r13 0xffff800014904000 r14 0x100 r15 0x1 rip 0xffffffff815c9928 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800014903fe0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-fuzzer) pid=237926 stat=onproc flags process=2 proc=4000000 pri=17, usrpri=52, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff5648,0xffff8000ffff98c8 process=0xffff8000148a26d8 user=0xffff8000148ff000, vmspace=0xfffffd803f014110 estcpu=36, cpticks=10, pctcpu=0.0 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 22968 331120 27894 0 2 0x2 syz-executor.0 28948 50205 1 0 3 0x100083 ttyin getty 48859 388213 0 0 3 0x14200 bored sosplice 27894 165681 15071 0 3 0x82 thrsleep syz-fuzzer 27894 239816 15071 0 3 0x4000082 nanosleep syz-fuzzer 27894 334925 15071 0 3 0x4000082 thrsleep syz-fuzzer 27894 128821 15071 0 3 0x4000082 thrsleep syz-fuzzer *27894 237926 15071 0 7 0x4000002 syz-fuzzer 27894 233242 15071 0 3 0x4000082 thrsleep syz-fuzzer 27894 406323 15071 0 3 0x4000082 thrsleep syz-fuzzer 27894 13551 15071 0 3 0x4000082 thrsleep syz-fuzzer 15071 491564 81538 0 3 0x10008a pause ksh 81538 92717 8123 0 3 0x92 select sshd 8123 176232 1 0 3 0x80 select sshd 79586 113023 84574 73 3 0x100090 kqread syslogd 84574 7378 1 0 3 0x100082 netio syslogd 97119 506262 1 77 3 0x100090 poll dhclient 70644 48796 1 0 3 0x80 poll dhclient 47800 200845 0 0 3 0x14200 pgzero zerothread 29266 334920 0 0 3 0x14200 aiodoned aiodoned 90094 61933 0 0 3 0x14200 syncer update 59290 126528 0 0 3 0x14200 cleaner cleaner 45615 124697 0 0 3 0x14200 reaper reaper 85398 508920 0 0 3 0x14200 pgdaemon pagedaemon 890 363125 0 0 3 0x14200 bored crynlk 36635 191035 0 0 3 0x14200 bored crypto 80855 144306 0 0 3 0x40014200 acpi0 acpi0 63921 221901 0 0 3 0x14200 bored softnet 84390 509519 0 0 3 0x14200 bored systqmp 95857 289548 0 0 3 0x14200 bored systq 17319 246239 0 0 3 0x40014200 bored softclock 53990 52251 0 0 3 0x40014200 idle0 23148 187469 0 0 3 0x14200 bored smr 1 418338 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 7020K 15322K 78643K 21885 0 0 pcb 13 11K 13K 78643K 4976 0 0 rtable 88 11K 13K 78643K 3221 0 0 ifaddr 83 18K 22K 78643K 908 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 349 0 0 iov 0 0K 24K 78643K 1297 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1220 77K 77K 78643K 5815 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 90 0 0 VM map 48 12K 12K 78643K 73 0 0 sem 12 0K 1K 78643K 1391 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12645 0 0 file desc 3 5K 25K 78643K 5031 0 0 sigio 0 0K 0K 78643K 456 0 0 proc 50 38K 63K 78643K 2090 0 0 subproc 16 1K 2K 78643K 548 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 813 0 0 in_multi 16 1K 2K 78643K 679 0 0 ether_multi 1 0K 0K 78643K 40 0 0 mrt 0 0K 0K 78643K 15 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 1086 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 170 373K 382K 78643K 13637 0 0 UVM aobj 130 6K 7K 78643K 147 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 2586 0 0 NDP 21 0K 1K 78643K 299 0 0 temp 218 3540K 4188K 78643K 188092 0 0 kqueue 0 0K 0K 78643K 48 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 106 0 102 1 0 1 1 0 8 0 rtpcb 80 627 0 625 1 0 1 1 0 8 0 rtentry 112 544 0 518 2 0 2 2 0 8 0 unpcb 120 2771 0 2762 2 1 1 2 0 8 0 syncache 264 40 0 40 16 16 0 1 0 8 0 sackhl 24 1 0 1 1 1 0 1 0 8 0 tcpqe 32 127 0 127 11 11 0 1 0 8 0 tcpcb 544 4474 0 4470 41 40 1 15 0 8 0 ipq 40 45 0 45 20 19 1 1 0 8 1 ipqe 40 790 0 790 20 19 1 1 0 8 1 inpcb 280 13007 0 13000 48 46 2 9 0 8 1 rttmr 72 3 0 3 2 2 0 1 0 8 0 ip6q 72 1 0 1 1 1 0 1 0 8 0 nd6 48 83 0 83 3 2 1 1 0 8 1 pkpcb 40 26 0 26 10 9 1 1 0 8 1 swfcl 56 5 0 0 1 0 1 1 0 8 0 ppxss 1128 124 0 124 22 21 1 1 0 8 1 art_heap8 4096 5 0 4 4 3 1 3 0 8 0 art_heap4 256 2407 0 2277 39 25 14 16 0 8 4 art_table 32 2412 0 2281 3 1 2 3 0 8 0 art_node 16 543 0 519 1 0 1 1 0 8 0 sysvmsgpl 40 73 0 41 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 1385 0 1375 1 0 1 1 0 8 0 shmpl 112 145 0 17 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 9173 0 7763 46 0 46 46 0 8 0 ffsino 240 9173 0 7763 84 0 84 84 0 8 0 nchpl 144 17546 0 17068 60 41 19 60 0 8 0 uvmvnodes 72 8425 0 0 154 0 154 154 0 8 0 vnodes 208 8425 0 0 444 0 444 444 0 8 0 namei 1024 61100 0 61100 7 6 1 1 0 8 1 vcpupl 1984 48 0 2 6 0 6 6 0 8 0 vmpool 520 71 0 25 4 0 4 4 0 8 0 scsiplug 64 6 0 6 5 5 0 1 0 8 0 scxspl 192 63151 0 63151 31 30 1 7 0 8 1 plimitpl 152 446 0 440 1 0 1 1 0 8 0 sigapl 432 5113 0 5102 2 0 2 2 0 8 0 futexpl 56 145905 0 145905 6 5 1 1 0 8 1 knotepl 112 1460 0 1439 2 1 1 2 0 8 0 kqueuepl 104 1762 0 1760 7 6 1 4 0 8 0 pipepl 112 2958 0 2943 10 9 1 2 0 8 0 fdescpl 424 5114 0 5102 2 0 2 2 0 8 0 filepl 120 49739 0 49662 41 37 4 11 0 8 1 lockfpl 104 1724 0 1723 1 0 1 1 0 8 0 lockfspl 48 578 0 577 1 0 1 1 0 8 0 sessionpl 112 48 0 39 1 0 1 1 0 8 0 pgrppl 48 98 0 89 1 0 1 1 0 8 0 ucredpl 96 7899 0 7892 1 0 1 1 0 8 0 zombiepl 144 5107 0 5107 1 0 1 1 0 8 1 processpl 864 5134 0 5107 4 0 4 4 0 8 0 procpl 632 11318 0 11284 5 1 4 5 0 8 0 sosppl 128 63 0 63 13 12 1 1 0 8 1 sockpl 384 16657 0 16639 67 62 5 14 0 8 2 mcl64k 65536 1229 0 1229 108 75 33 33 0 8 33 mcl16k 16384 76 0 76 23 22 1 1 0 8 1 mcl12k 12288 124 0 124 19 18 1 1 0 8 1 mcl9k 9216 67 0 67 22 21 1 1 0 8 1 mcl8k 8192 253 0 253 13 12 1 1 0 8 1 mcl4k 4096 661 0 661 9 8 1 1 0 8 1 mcl2k2 2112 55 0 55 17 17 0 1 0 8 0 mcl2k 2048 76654 0 76605 19 12 7 14 0 8 0 mtagpl 80 300 0 300 5 4 1 1 0 8 1 mbufpl 256 174643 0 174556 158 135 23 29 0 8 11 bufpl 256 25871 0 17301 536 0 536 536 0 8 0 anonpl 16 736980 0 717900 235 139 96 100 0 62 10 amapchunkpl 152 28462 0 28327 109 92 17 17 0 158 10 amappl16 192 34762 0 33569 307 234 73 73 0 8 11 amappl15 184 768 0 768 6 6 0 1 0 8 0 amappl14 176 1893 0 1886 1 0 1 1 0 8 0 amappl13 168 437 0 437 9 8 1 1 0 8 1 amappl12 160 1143 0 1139 1 0 1 1 0 8 0 amappl11 152 140 0 129 1 0 1 1 0 8 0 amappl10 144 361 0 361 8 8 0 1 0 8 0 amappl9 136 1525 0 1520 1 0 1 1 0 8 0 amappl8 128 1062 0 1019 2 0 2 2 0 8 0 amappl7 120 465 0 458 1 0 1 1 0 8 0 amappl6 112 95 0 84 1 0 1 1 0 8 0 amappl5 104 1532 0 1521 1 0 1 1 0 8 0 amappl4 96 5137 0 5108 1 0 1 1 0 8 0 amappl3 88 1647 0 1638 1 0 1 1 0 8 0 amappl2 80 38675 0 38615 3 1 2 3 0 8 0 amappl1 72 103507 0 103119 26 17 9 20 0 8 0 amappl 80 12104 0 12046 3 1 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 146 0 17 3 0 3 3 0 8 0 uaddrrnd 24 5185 0 5102 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 5185 0 5102 1 0 1 1 0 8 0 vmmpekpl 168 32312 0 32271 2 0 2 2 0 8 0 vmmpepl 168 635369 0 633157 465 314 151 161 0 357 40 vmsppl 272 5113 0 5102 4 2 2 2 0 8 1 pdppl 4096 10376 0 10300 13 2 11 11 0 8 0 pvpl 32 1865155 0 1843651 646 342 304 323 0 265 107 pmappl 200 5184 0 5127 4 0 4 4 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 1063 0 344 21 0 21 21 0 8 0