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 *287222 41001 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(ffffffff821e514f,ffffffff821f64b4,149,ffffffff821bfa6d) at __assert+0x2b sys/kern/subr_prf.c:154 buf_free_pages(fffffd8024d68200) at buf_free_pages+0x1ee sys/kern/vfs_biomem.c:318 buf_dealloc_mem(fffffd8024d68200) at buf_dealloc_mem+0xe1 sys/kern/vfs_biomem.c:194 buf_put(fffffd8024d68200) at buf_put+0x16b sys/kern/vfs_bio.c:131 brelse(fffffd8024d68200) at brelse+0x257 sys/kern/vfs_bio.c:922 vinvalbuf(fffffd802e05ed00,2,fffffd803f7c6a80,ffff8000ffff98b8,0,ffffffffffffffff) at vinvalbuf+0x3b1 sys/kern/vfs_subr.c:1977 ffs_truncate(fffffd803ebb05a0,0,4,fffffd803f7c6a80) at ffs_truncate+0xeb1 sys/ufs/ffs/ffs_inode.c:326 ufs_rmdir(ffff80001490aa68) at ufs_rmdir+0x3af sys/ufs/ufs/ufs_vnops.c:1357 VOP_RMDIR(fffffd802e05edd0,fffffd802e05ed00,ffff80001490ab68) at VOP_RMDIR+0xf8 sys/kern/vfs_vops.c:474 dounlinkat(ffff8000ffff98b8,b,c003a60da0,8) at dounlinkat+0x14c sys/kern/vfs_syscalls.c:1818 syscall(ffff80001490ace0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:555 Xsyscall(6,145,c00002a000,145,100,6d) at Xsyscall+0x128 end of kernel end trace frame: 0xc00014b760, 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(ffffffff821e514f,ffffffff821f64b4,149,ffffffff821bfa6d) at __assert+0x2b sys/kern/subr_prf.c:154 buf_free_pages(fffffd8024d68200) at buf_free_pages+0x1ee sys/kern/vfs_biomem.c:318 buf_dealloc_mem(fffffd8024d68200) at buf_dealloc_mem+0xe1 sys/kern/vfs_biomem.c:194 buf_put(fffffd8024d68200) at buf_put+0x16b sys/kern/vfs_bio.c:131 brelse(fffffd8024d68200) at brelse+0x257 sys/kern/vfs_bio.c:922 vinvalbuf(fffffd802e05ed00,2,fffffd803f7c6a80,ffff8000ffff98b8,0,ffffffffffffffff) at vinvalbuf+0x3b1 sys/kern/vfs_subr.c:1977 ffs_truncate(fffffd803ebb05a0,0,4,fffffd803f7c6a80) at ffs_truncate+0xeb1 sys/ufs/ffs/ffs_inode.c:326 ufs_rmdir(ffff80001490aa68) at ufs_rmdir+0x3af sys/ufs/ufs/ufs_vnops.c:1357 VOP_RMDIR(fffffd802e05edd0,fffffd802e05ed00,ffff80001490ab68) at VOP_RMDIR+0xf8 sys/kern/vfs_vops.c:474 dounlinkat(ffff8000ffff98b8,b,c003a60da0,8) at dounlinkat+0x14c sys/kern/vfs_syscalls.c:1818 syscall(ffff80001490ace0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:555 Xsyscall(6,145,c00002a000,145,100,6d) at Xsyscall+0x128 end of kernel end trace frame: 0xc00014b760, count: -14 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80001490a540 rbx 0xffff80001490a5f0 rdx 0x2 rcx 0 rax 0 r8 0xffff80001490a500 r9 0x1 r10 0 r11 0x4e6ef9dc3c80bc25 r12 0x3000000008 r13 0xffff80001490a550 r14 0x100 r15 0x1 rip 0xffffffff81a00538 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80001490a530 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-fuzzer) pid=287222 stat=onproc flags process=2 proc=4000000 pri=17, usrpri=51, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff58c0,0xffff8000ffff8290 process=0xffff8000148a2018 user=0xffff800014905000, vmspace=0xfffffd803f012220 estcpu=36, cpticks=6, pctcpu=0.4 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 18499 212115 41001 0 2 0x2 syz-executor.1 18765 335216 1 0 3 0x100083 ttyin getty 58845 442678 0 0 3 0x14200 bored sosplice 41001 414781 41224 0 3 0x82 thrsleep syz-fuzzer 41001 113219 41224 0 3 0x4000082 nanosleep syz-fuzzer 41001 467388 41224 0 3 0x4000082 thrsleep syz-fuzzer 41001 323786 41224 0 3 0x4000082 thrsleep syz-fuzzer 41001 101975 41224 0 3 0x4000082 thrsleep syz-fuzzer *41001 287222 41224 0 7 0x4000002 syz-fuzzer 41001 33309 41224 0 3 0x4000082 thrsleep syz-fuzzer 41001 301244 41224 0 3 0x4000082 thrsleep syz-fuzzer 41224 184358 71024 0 3 0x10008a pause ksh 71024 183194 88455 0 3 0x92 select sshd 88455 204562 1 0 3 0x80 select sshd 91175 168400 65467 73 3 0x100090 kqread syslogd 65467 268948 1 0 3 0x100082 netio syslogd 61595 331453 0 0 3 0x14200 pgzero zerothread 40259 328166 0 0 3 0x14200 aiodoned aiodoned 20978 72634 0 0 3 0x14200 syncer update 66599 191343 0 0 3 0x14200 cleaner cleaner 2154 206580 0 0 3 0x14200 reaper reaper 76398 63219 0 0 3 0x14200 pgdaemon pagedaemon 10585 79440 0 0 3 0x14200 bored crynlk 63490 236815 0 0 3 0x14200 bored crypto 20626 87355 0 0 3 0x40014200 acpi0 acpi0 39679 423587 0 0 3 0x14200 bored softnet 29830 520885 0 0 3 0x14200 bored systqmp 76613 343246 0 0 3 0x14200 bored systq 53677 250112 0 0 3 0x40014200 bored softclock 8178 473437 0 0 3 0x40014200 idle0 59495 120905 0 0 3 0x14200 bored smr 1 400539 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 9592 6348K 9277K 78643K 36410 0 0 pcb 13 11K 12K 78643K 1223 0 0 rtable 109 12K 14K 78643K 1707 0 0 ifaddr 86 20K 22K 78643K 804 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 362 0 0 iov 0 0K 32K 78643K 1137 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1220 77K 77K 78643K 9415 0 0 UFS quota 1 32K 32K 78643K 1 0 0 UFS mount 5 36K 36K 78643K 5 0 0 shm 2 1K 5K 78643K 69 0 0 VM map 58 14K 14K 78643K 76 0 0 sem 12 0K 1K 78643K 2224 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1794 195K 288K 78643K 12646 0 0 file desc 3 5K 25K 78643K 4833 0 0 sigio 0 0K 0K 78643K 82 0 0 proc 44 30K 63K 78643K 1986 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 2284 0 0 in_multi 17 1K 2K 78643K 591 0 0 ether_multi 1 0K 0K 78643K 39 0 0 mrt 0 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 144 636K 636K 78643K 144 0 0 exec 0 0K 1K 78643K 1088 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 213 455K 464K 78643K 13201 0 0 UVM aobj 130 4K 4K 78643K 139 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 1148 0 0 NDP 20 0K 1K 78643K 267 0 0 temp 210 3543K 4185K 78643K 219159 0 0 kqueue 0 0K 0K 78643K 56 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 85 0 80 1 0 1 1 0 8 0 rtpcb 80 533 0 533 12 11 1 1 0 8 1 rtentry 112 517 0 479 2 0 2 2 0 8 0 unpcb 120 3403 0 3394 2 0 2 2 0 8 1 syncache 264 37 0 37 15 14 1 1 0 8 1 tcpqe 32 120 0 120 8 8 0 1 0 8 0 tcpcb 544 3826 0 3822 35 33 2 15 0 8 1 ipq 40 71 0 71 20 19 1 1 0 8 1 ipqe 40 1645 0 1645 20 19 1 1 0 8 1 inpcb 280 8160 0 8156 40 38 2 9 0 8 1 rttmr 72 12 0 12 8 8 0 1 0 8 0 ip6q 72 4 0 4 2 2 0 1 0 8 0 ip6af 40 12 0 12 2 2 0 1 0 8 0 nd6 48 80 0 80 10 9 1 1 0 8 1 pkpcb 40 24 0 24 9 9 0 1 0 8 0 ppxss 1128 86 0 86 18 17 1 1 0 8 1 art_heap8 4096 14 0 12 10 8 2 4 0 8 0 art_heap4 256 2155 0 2005 31 17 14 16 0 8 0 art_table 32 2169 0 2017 2 0 2 2 0 8 0 art_node 16 516 0 482 1 0 1 1 0 8 0 sysvmsgpl 40 27 0 11 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 2220 0 2210 1 0 1 1 0 8 0 shmpl 112 137 0 9 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 9233 0 7829 46 0 46 46 0 8 0 ffsino 240 9233 0 7829 83 0 83 83 0 8 0 nchpl 144 17324 0 16907 60 40 20 60 0 8 0 uvmvnodes 72 8217 0 0 150 0 150 150 0 8 0 vnodes 208 8217 0 0 433 0 433 433 0 8 0 namei 1024 62127 0 62127 6 5 1 1 0 8 1 vcpupl 1984 56 0 0 7 0 7 7 0 8 0 vmpool 520 74 0 18 4 0 4 4 0 8 0 scsiplug 64 6 0 6 3 3 0 1 0 8 0 scxspl 192 60769 0 60769 52 49 3 7 0 8 3 plimitpl 152 490 0 485 1 0 1 1 0 8 0 sigapl 432 4917 0 4908 2 0 2 2 0 8 0 futexpl 56 147340 0 147340 6 5 1 1 0 8 1 knotepl 112 1173 0 1156 3 2 1 2 0 8 0 kqueuepl 104 1849 0 1847 7 6 1 4 0 8 0 pipepl 112 3292 0 3277 10 8 2 2 0 8 1 fdescpl 424 4918 0 4908 2 0 2 2 0 8 0 filepl 120 48102 0 48036 38 33 5 11 0 8 2 lockfpl 104 3552 0 3552 6 5 1 1 0 8 1 lockfspl 48 1170 0 1170 6 5 1 1 0 8 1 sessionpl 112 47 0 40 1 0 1 1 0 8 0 pgrppl 48 457 0 450 1 0 1 1 0 8 0 ucredpl 96 5455 0 5448 1 0 1 1 0 8 0 zombiepl 144 4909 0 4909 1 0 1 1 0 8 1 processpl 864 4934 0 4909 4 0 4 4 0 8 0 procpl 632 10844 0 10812 4 0 4 4 0 8 0 sosppl 128 102 0 102 17 16 1 1 0 8 1 sockpl 384 12183 0 12170 45 39 6 14 0 8 3 mcl64k 65536 1425 0 1425 103 102 1 33 0 8 1 mcl16k 16384 86 0 86 21 20 1 1 0 8 1 mcl12k 12288 169 0 169 14 13 1 1 0 8 1 mcl9k 9216 63 0 63 18 17 1 1 0 8 1 mcl8k 8192 211 0 211 10 9 1 1 0 8 1 mcl4k 4096 574 0 574 10 9 1 1 0 8 1 mcl2k2 2112 38 0 38 20 19 1 1 0 8 1 mcl2k 2048 78430 0 78383 18 11 7 14 0 8 0 mtagpl 80 192 0 184 6 5 1 1 0 8 0 mbufpl 256 166937 0 166820 209 196 13 23 0 8 4 bufpl 256 29914 0 21696 514 0 514 514 0 8 0 anonpl 16 702622 0 682459 244 147 97 102 0 62 10 amapchunkpl 152 28672 0 28534 123 116 7 31 0 158 1 amappl16 192 33450 0 32264 256 190 66 73 0 8 5 amappl15 184 606 0 605 1 0 1 1 0 8 0 amappl14 176 1263 0 1256 1 0 1 1 0 8 0 amappl13 168 915 0 915 3 3 0 1 0 8 0 amappl12 160 215 0 215 6 6 0 1 0 8 0 amappl11 152 1140 0 1136 1 0 1 1 0 8 0 amappl10 144 65 0 63 1 0 1 1 0 8 0 amappl9 136 1412 0 1408 1 0 1 1 0 8 0 amappl8 128 1028 0 964 3 0 3 3 0 8 0 amappl7 120 212 0 205 1 0 1 1 0 8 0 amappl6 112 1075 0 1065 1 0 1 1 0 8 0 amappl5 104 628 0 619 1 0 1 1 0 8 0 amappl4 96 5471 0 5446 1 0 1 1 0 8 0 amappl3 88 1946 0 1938 1 0 1 1 0 8 0 amappl2 80 37184 0 37129 3 1 2 3 0 8 0 amappl1 72 100146 0 99786 28 20 8 20 0 8 0 amappl 80 11628 0 11563 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 138 0 9 3 0 3 3 0 8 0 uaddrrnd 24 4992 0 4908 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 4992 0 4908 1 0 1 1 0 8 0 vmmpekpl 168 32854 0 32816 3 0 3 3 0 8 0 vmmpepl 168 612949 0 610738 443 293 150 160 0 357 36 vmsppl 272 4917 0 4908 2 1 1 2 0 8 0 pdppl 4096 9990 0 9908 15 3 12 12 0 8 1 pvpl 32 1783643 0 1761668 602 337 265 328 0 265 72 pmappl 200 4991 0 4926 5 1 4 4 0 8 0 extentpl 40 46 0 29 1 0 1 1 0 8 0 phpool 112 1072 0 416 19 0 19 19 0 8 0