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 *224060 16228 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(ffffffff821e33fa,ffffffff821f52ea,149,ffffffff821be34e) at __assert+0x2b sys/kern/subr_prf.c:154 buf_free_pages(fffffd8026fa2300) at buf_free_pages+0x1ee sys/kern/vfs_biomem.c:318 buf_dealloc_mem(fffffd8026fa2300) at buf_dealloc_mem+0xe1 sys/kern/vfs_biomem.c:194 buf_put(fffffd8026fa2300) at buf_put+0x16b sys/kern/vfs_bio.c:131 brelse(fffffd8026fa2300) at brelse+0x257 sys/kern/vfs_bio.c:922 vinvalbuf(fffffd80361ad9e0,2,fffffd803f7c6ba0,ffff8000ffff2018,0,ffffffffffffffff) at vinvalbuf+0x3b1 sys/kern/vfs_subr.c:1977 ffs_truncate(fffffd803864e008,0,4,fffffd803f7c6ba0) at ffs_truncate+0xeb1 sys/ufs/ffs/ffs_inode.c:326 ufs_rmdir(ffff800015916bc8) at ufs_rmdir+0x3af sys/ufs/ufs/ufs_vnops.c:1357 VOP_RMDIR(fffffd8004a1b910,fffffd80361ad9e0,ffff800015916cc8) at VOP_RMDIR+0xf8 sys/kern/vfs_vops.c:474 dounlinkat(ffff8000ffff2018,b,c000debb36,8) at dounlinkat+0x14c sys/kern/vfs_syscalls.c:1818 syscall(ffff800015916e40) at syscall+0x507 sys/arch/amd64/amd64/trap.c:555 Xsyscall(0,145,c00002a000,145,38,9622ee) at Xsyscall+0x128 end of kernel end trace frame: 0xc001a03658, 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(ffffffff821e33fa,ffffffff821f52ea,149,ffffffff821be34e) at __assert+0x2b sys/kern/subr_prf.c:154 buf_free_pages(fffffd8026fa2300) at buf_free_pages+0x1ee sys/kern/vfs_biomem.c:318 buf_dealloc_mem(fffffd8026fa2300) at buf_dealloc_mem+0xe1 sys/kern/vfs_biomem.c:194 buf_put(fffffd8026fa2300) at buf_put+0x16b sys/kern/vfs_bio.c:131 brelse(fffffd8026fa2300) at brelse+0x257 sys/kern/vfs_bio.c:922 vinvalbuf(fffffd80361ad9e0,2,fffffd803f7c6ba0,ffff8000ffff2018,0,ffffffffffffffff) at vinvalbuf+0x3b1 sys/kern/vfs_subr.c:1977 ffs_truncate(fffffd803864e008,0,4,fffffd803f7c6ba0) at ffs_truncate+0xeb1 sys/ufs/ffs/ffs_inode.c:326 ufs_rmdir(ffff800015916bc8) at ufs_rmdir+0x3af sys/ufs/ufs/ufs_vnops.c:1357 VOP_RMDIR(fffffd8004a1b910,fffffd80361ad9e0,ffff800015916cc8) at VOP_RMDIR+0xf8 sys/kern/vfs_vops.c:474 dounlinkat(ffff8000ffff2018,b,c000debb36,8) at dounlinkat+0x14c sys/kern/vfs_syscalls.c:1818 syscall(ffff800015916e40) at syscall+0x507 sys/arch/amd64/amd64/trap.c:555 Xsyscall(0,145,c00002a000,145,38,9622ee) at Xsyscall+0x128 end of kernel end trace frame: 0xc001a03658, count: -14 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff8000159166a0 rbx 0xffff800015916750 rdx 0x2 rcx 0 rax 0 r8 0xffff800015916660 r9 0x1 r10 0 r11 0x3e778023c1d2ea4c r12 0x3000000008 r13 0xffff8000159166b0 r14 0x100 r15 0x1 rip 0xffffffff810661f8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800015916690 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-fuzzer) pid=224060 stat=onproc flags process=2 proc=4000000 pri=17, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff38c8,0xffffffff8256b218 process=0xffff8000148a2018 user=0xffff800015911000, vmspace=0xfffffd803f014440 estcpu=0, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 50131 100382 1 0 3 0x100083 ttyin getty 48223 52207 0 0 3 0x14200 bored sosplice 16228 337565 4204 0 3 0x82 thrsleep syz-fuzzer 16228 447099 4204 0 3 0x4000082 nanosleep syz-fuzzer 16228 114859 4204 0 3 0x4000082 thrsleep syz-fuzzer 16228 10303 4204 0 3 0x4000082 thrsleep syz-fuzzer 16228 145730 4204 0 3 0x4000082 thrsleep syz-fuzzer 16228 54324 4204 0 3 0x4000082 thrsleep syz-fuzzer 16228 106662 4204 0 3 0x4000082 thrsleep syz-fuzzer *16228 224060 4204 0 7 0x4000002 syz-fuzzer 4204 93146 98799 0 3 0x10008a pause ksh 98799 161324 35666 0 3 0x92 select sshd 35666 442141 1 0 3 0x80 select sshd 48121 367966 61702 73 3 0x100010 biowait syslogd 61702 484840 1 0 3 0x100082 netio syslogd 16155 38816 1 77 3 0x100090 poll dhclient 39372 10594 1 0 3 0x80 poll dhclient 5905 376934 0 0 3 0x14200 pgzero zerothread 46666 192059 0 0 3 0x14200 aiodoned aiodoned 47290 393109 0 0 3 0x14200 syncer update 2823 454936 0 0 3 0x14200 cleaner cleaner 56747 18059 0 0 3 0x14200 reaper reaper 30629 54141 0 0 3 0x14200 pgdaemon pagedaemon 11132 150099 0 0 3 0x14200 bored crynlk 63277 400699 0 0 3 0x14200 bored crypto 26772 499850 0 0 3 0x40014200 acpi0 acpi0 26154 398140 0 0 3 0x14200 bored softnet 18862 249723 0 0 3 0x14200 bored systqmp 10702 289819 0 0 3 0x14200 bored systq 61479 306877 0 0 3 0x40014200 bored softclock 33677 4099 0 0 3 0x40014200 idle0 99476 64463 0 0 3 0x14200 bored smr 1 227577 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 9599 6398K 8296K 78643K 26703 0 0 pcb 13 12K 14K 78643K 1349 0 0 rtable 92 11K 13K 78643K 4049 0 0 ifaddr 93 24K 29K 78643K 1164 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 345 0 0 iov 0 0K 32K 78643K 1766 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1228 77K 78K 78643K 8293 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 89 0 0 VM map 2 0K 0K 78643K 34 0 0 sem 11 1K 1K 78643K 13 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12645 0 0 file desc 2 1K 25K 78643K 7403 0 0 sigio 0 0K 0K 78643K 129 0 0 proc 50 38K 63K 78643K 2472 0 0 subproc 0 0K 2K 78643K 612 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 1018 0 0 in_multi 12 0K 2K 78643K 729 0 0 ether_multi 1 0K 0K 78643K 50 0 0 mrt 1 0K 0K 78643K 36 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 1500 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 110 6K 40K 78643K 19062 0 0 UVM aobj 130 4K 4K 78643K 136 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 1518 0 0 NDP 23 0K 1K 78643K 364 0 0 temp 214 3539K 4181K 78643K 213898 0 0 kqueue 0 0K 0K 78643K 62 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 146 0 142 1 0 1 1 0 8 0 rtpcb 80 695 0 693 1 0 1 1 0 8 0 rtentry 112 697 0 669 2 0 2 2 0 8 0 unpcb 120 3142 0 3120 6 5 1 2 0 8 0 syncache 264 32 0 32 16 16 0 1 0 8 0 tcpqe 32 5612 0 5612 7 7 0 1 0 8 0 tcpcb 544 3056 0 3052 24 23 1 14 0 8 0 ipq 40 53 0 53 19 19 0 1 0 8 0 ipqe 40 514 0 514 19 19 0 1 0 8 0 inpcb 280 18902 0 18895 60 59 1 13 0 8 0 rttmr 72 12 0 12 9 9 0 1 0 8 0 ip6q 72 1 0 1 1 1 0 1 0 8 0 ip6af 40 2 0 2 1 1 0 1 0 8 0 nd6 48 90 0 90 8 8 0 1 0 8 0 pkpcb 40 24 0 24 9 9 0 1 0 8 0 swfcl 56 4 0 0 1 0 1 1 0 8 0 ppxss 1128 159 0 159 20 20 0 1 0 8 0 art_heap8 4096 15 0 14 10 9 1 3 0 8 0 art_heap4 256 2869 0 2711 60 46 14 17 0 8 0 art_table 32 2884 0 2725 5 2 3 3 0 8 0 art_node 16 689 0 663 1 0 1 1 0 8 0 sysvmsgpl 40 178 0 138 1 0 1 1 0 8 0 semupl 112 3 0 3 1 1 0 1 0 8 0 semapl 112 9 0 0 1 0 1 1 0 8 0 shmpl 112 134 0 6 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 14109 0 12704 46 0 46 46 0 8 0 ffsino 240 14109 0 12704 83 0 83 83 0 8 0 nchpl 144 26804 0 25159 64 2 62 62 0 8 0 uvmvnodes 72 8107 0 0 148 0 148 148 0 8 0 vnodes 208 8107 0 0 427 0 427 427 0 8 0 namei 1024 93032 0 93032 6 5 1 1 0 8 1 vmpool 520 32 0 32 12 12 0 1 0 8 0 scxspl 192 84271 0 84270 45 44 1 7 0 8 0 plimitpl 152 651 0 646 1 0 1 1 0 8 0 sigapl 432 7476 0 7466 2 0 2 2 0 8 0 futexpl 56 262326 0 262326 3 3 0 1 0 8 0 knotepl 112 1779 0 1758 6 5 1 3 0 8 0 kqueuepl 104 1791 0 1789 4 3 1 4 0 8 0 pipepl 112 4418 0 4407 22 21 1 2 0 8 0 fdescpl 424 7477 0 7466 2 0 2 2 0 8 0 filepl 120 73988 0 73932 49 46 3 11 0 8 0 lockfpl 104 2660 0 2659 1 0 1 1 0 8 0 lockfspl 48 899 0 898 1 0 1 1 0 8 0 sessionpl 112 55 0 47 1 0 1 1 0 8 0 pgrppl 48 115 0 107 1 0 1 1 0 8 0 ucredpl 96 8013 0 8006 1 0 1 1 0 8 0 zombiepl 144 7476 0 7476 3 2 1 1 0 8 1 processpl 864 7502 0 7476 4 0 4 4 0 8 0 procpl 632 16475 0 16442 4 0 4 4 0 8 0 sosppl 128 118 0 118 24 24 0 1 0 8 0 sockpl 384 22812 0 22781 83 78 5 22 0 8 0 mcl64k 65536 2447 0 2447 217 217 0 64 0 8 0 mcl16k 16384 155 0 155 23 23 0 1 0 8 0 mcl12k 12288 253 0 253 13 13 0 1 0 8 0 mcl9k 9216 196 0 196 16 16 0 1 0 8 0 mcl8k 8192 836 0 836 4 4 0 1 0 8 0 mcl4k 4096 1098 0 1098 5 5 0 1 0 8 0 mcl2k2 2112 88 0 88 20 20 0 1 0 8 0 mcl2k 2048 70063 0 70015 28 21 7 17 0 8 0 mtagpl 80 328 0 328 9 9 0 1 0 8 0 mbufpl 256 192979 0 192870 201 188 13 41 0 8 0 bufpl 256 38251 0 30041 514 0 514 514 0 8 0 anonpl 16 915181 0 899132 237 153 84 87 0 62 7 amapchunkpl 152 40279 0 40155 137 121 16 19 0 158 10 amappl16 192 44780 0 43784 292 240 52 65 0 8 0 amappl15 184 534 0 534 6 6 0 1 0 8 0 amappl14 176 1885 0 1883 2 1 1 1 0 8 0 amappl13 168 525 0 525 8 8 0 1 0 8 0 amappl12 160 1266 0 1263 1 0 1 1 0 8 0 amappl11 152 871 0 859 1 0 1 1 0 8 0 amappl10 144 514 0 514 7 6 1 1 0 8 1 amappl9 136 2192 0 2187 1 0 1 1 0 8 0 amappl8 128 1724 0 1679 2 0 2 2 0 8 0 amappl7 120 658 0 649 1 0 1 1 0 8 0 amappl6 112 830 0 820 1 0 1 1 0 8 0 amappl5 104 1815 0 1806 1 0 1 1 0 8 0 amappl4 96 7091 0 7061 1 0 1 1 0 8 0 amappl3 88 2428 0 2423 1 0 1 1 0 8 0 amappl2 80 58251 0 58198 4 2 2 3 0 8 0 amappl1 72 144787 0 144406 28 19 9 20 0 8 0 amappl 80 17337 0 17302 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 135 0 6 3 0 3 3 0 8 0 uaddrrnd 24 7509 0 7466 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 7509 0 7466 1 0 1 1 0 8 0 vmmpekpl 168 47957 0 47937 2 0 2 2 0 8 0 vmmpepl 168 904165 0 902331 487 373 114 137 0 357 10 vmsppl 272 7476 0 7466 4 3 1 2 0 8 0 pdppl 4096 15024 0 14996 6 1 5 6 0 8 0 pvpl 32 2507351 0 2488429 701 414 287 303 0 265 106 pmappl 200 7508 0 7498 1 0 1 1 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 1190 0 547 22 3 19 20 0 8 0