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 * 14929 64248 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(ffffffff821e7329,ffffffff821fc438,149,ffffffff821c5333) at __assert+0x2b sys/kern/subr_prf.c:154 buf_free_pages(fffffd8024b51400) at buf_free_pages+0x1ee sys/kern/vfs_biomem.c:318 buf_dealloc_mem(fffffd8024b51400) at buf_dealloc_mem+0xe1 sys/kern/vfs_biomem.c:194 buf_put(fffffd8024b51400) at buf_put+0x16b sys/kern/vfs_bio.c:131 brelse(fffffd8024b51400) at brelse+0x257 sys/kern/vfs_bio.c:922 vinvalbuf(fffffd802a618c38,2,fffffd803f7c6ba0,ffff800014914780,0,ffffffffffffffff) at vinvalbuf+0x3b1 sys/kern/vfs_subr.c:1977 ffs_truncate(fffffd803a2623d0,0,4,fffffd803f7c6ba0) at ffs_truncate+0xeb1 sys/ufs/ffs/ffs_inode.c:326 ufs_rmdir(ffff800016b31f38) at ufs_rmdir+0x3af sys/ufs/ufs/ufs_vnops.c:1357 VOP_RMDIR(fffffd8038a811a0,fffffd802a618c38,ffff800016b32038) at VOP_RMDIR+0xf8 sys/kern/vfs_vops.c:474 dounlinkat(ffff800014914780,b,c0014942c0,8) at dounlinkat+0x14c sys/kern/vfs_syscalls.c:1818 syscall(ffff800016b321b0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:555 Xsyscall(6,145,c000028000,145,100,16) at Xsyscall+0x128 end of kernel end trace frame: 0xc0031e3760, 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(ffffffff821e7329,ffffffff821fc438,149,ffffffff821c5333) at __assert+0x2b sys/kern/subr_prf.c:154 buf_free_pages(fffffd8024b51400) at buf_free_pages+0x1ee sys/kern/vfs_biomem.c:318 buf_dealloc_mem(fffffd8024b51400) at buf_dealloc_mem+0xe1 sys/kern/vfs_biomem.c:194 buf_put(fffffd8024b51400) at buf_put+0x16b sys/kern/vfs_bio.c:131 brelse(fffffd8024b51400) at brelse+0x257 sys/kern/vfs_bio.c:922 vinvalbuf(fffffd802a618c38,2,fffffd803f7c6ba0,ffff800014914780,0,ffffffffffffffff) at vinvalbuf+0x3b1 sys/kern/vfs_subr.c:1977 ffs_truncate(fffffd803a2623d0,0,4,fffffd803f7c6ba0) at ffs_truncate+0xeb1 sys/ufs/ffs/ffs_inode.c:326 ufs_rmdir(ffff800016b31f38) at ufs_rmdir+0x3af sys/ufs/ufs/ufs_vnops.c:1357 VOP_RMDIR(fffffd8038a811a0,fffffd802a618c38,ffff800016b32038) at VOP_RMDIR+0xf8 sys/kern/vfs_vops.c:474 dounlinkat(ffff800014914780,b,c0014942c0,8) at dounlinkat+0x14c sys/kern/vfs_syscalls.c:1818 syscall(ffff800016b321b0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:555 Xsyscall(6,145,c000028000,145,100,16) at Xsyscall+0x128 end of kernel end trace frame: 0xc0031e3760, count: -14 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff800016b31a10 rbx 0xffff800016b31ac0 rdx 0x2 rcx 0 rax 0 r8 0xffff800016b319d0 r9 0x1 r10 0 r11 0x53001a580db830a5 r12 0x3000000008 r13 0xffff800016b31a20 r14 0x100 r15 0x1 rip 0xffffffff816154e8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800016b31a00 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-fuzzer) pid=14929 stat=onproc flags process=2 proc=4000000 pri=17, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff800014915b40,0xffff800014915660 process=0xffff8000148a2378 user=0xffff800016b2d000, vmspace=0xfffffd803f014880 estcpu=36, cpticks=1, pctcpu=0.7 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 88710 33447 75280 0 2 0 syz-executor.0 88710 318595 75280 0 2 0x4000000 syz-executor.0 75280 181964 64248 0 3 0x82 nanosleep syz-executor.0 94093 310373 0 0 3 0x14200 acct acct 59878 99504 1 0 3 0x100083 ttyin getty 84414 24265 0 0 3 0x14200 bored sosplice 64248 182422 33256 0 3 0x82 thrsleep syz-fuzzer 64248 400785 33256 0 3 0x4000082 nanosleep syz-fuzzer 64248 63166 33256 0 3 0x4000082 thrsleep syz-fuzzer 64248 411298 33256 0 3 0x4000082 thrsleep syz-fuzzer 64248 15695 33256 0 3 0x4000082 thrsleep syz-fuzzer 64248 255854 33256 0 3 0x4000082 thrsleep syz-fuzzer 64248 43092 33256 0 3 0x4000082 thrsleep syz-fuzzer *64248 14929 33256 0 7 0x4000002 syz-fuzzer 64248 36304 33256 0 3 0x4000082 thrsleep syz-fuzzer 33256 256055 14533 0 3 0x10008a pause ksh 14533 326625 12692 0 3 0x92 select sshd 12692 95193 1 0 3 0x80 select sshd 89279 281423 68066 73 3 0x100010 biowait syslogd 68066 354660 1 0 3 0x100082 netio syslogd 84393 429320 1 77 3 0x100090 poll dhclient 19730 482787 1 0 3 0x80 poll dhclient 40126 383982 0 0 2 0x14200 zerothread 34855 293487 0 0 3 0x14200 aiodoned aiodoned 96381 499159 0 0 3 0x14200 syncer update 12627 207177 0 0 3 0x14200 cleaner cleaner 29055 187904 0 0 3 0x14200 reaper reaper 67520 32255 0 0 3 0x14200 pgdaemon pagedaemon 46276 410464 0 0 3 0x14200 bored crynlk 85475 27663 0 0 3 0x14200 bored crypto 244 296676 0 0 3 0x40014200 acpi0 acpi0 16126 40765 0 0 3 0x14200 bored softnet 96448 100918 0 0 3 0x14200 bored systqmp 85270 186449 0 0 3 0x14200 bored systq 19948 172653 0 0 3 0x40014200 bored softclock 30662 307242 0 0 3 0x40014200 idle0 95851 23222 0 0 3 0x14200 bored smr 1 116629 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 9550 7016K 7854K 78643K 18492 0 0 pcb 13 11K 13K 78643K 1233 0 0 rtable 122 12K 13K 78643K 2424 0 0 ifaddr 219 27K 28K 78643K 725 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 205 0 0 iov 0 0K 28K 78643K 5884 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1232 77K 78K 78643K 4410 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 41 0 0 VM map 30 7K 7K 78643K 56 0 0 sem 12 0K 1K 78643K 1849 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12645 0 0 file desc 4 9K 25K 78643K 3398 0 0 sigio 0 0K 0K 78643K 111 0 0 proc 49 38K 63K 78643K 1622 0 0 subproc 16 1K 2K 78643K 465 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 468 0 0 in_multi 33 2K 2K 78643K 463 0 0 ether_multi 1 0K 0K 78643K 36 0 0 mrt 1 0K 0K 78643K 33 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 90 397K 397K 78643K 90 0 0 exec 0 0K 1K 78643K 932 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 169 259K 278K 78643K 9629 0 0 UVM aobj 130 6K 6K 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 0K 78643K 717 0 0 NDP 20 0K 1K 78643K 198 0 0 temp 150 3534K 4175K 78643K 114041 0 0 kqueue 0 0K 0K 78643K 35 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 97 0 91 1 0 1 1 0 8 0 rtpcb 80 405 0 403 1 0 1 1 0 8 0 rtentry 112 457 0 413 2 0 2 2 0 8 0 unpcb 120 1965 0 1954 1 0 1 1 0 8 0 syncache 264 20 0 20 7 7 0 1 0 8 0 tcpqe 32 230 0 230 5 5 0 1 0 8 0 tcpcb 544 2382 0 2378 59 58 1 14 0 8 0 ipq 40 63 0 63 17 17 0 1 0 8 0 ipqe 40 1987 0 1987 17 17 0 1 0 8 0 inpcb 280 6201 0 6194 51 49 2 9 0 8 1 rttmr 72 11 0 11 6 6 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 61 0 57 2 1 1 1 0 8 0 pkpcb 40 20 0 20 8 8 0 1 0 8 0 ppxss 1128 74 0 74 23 22 1 1 0 8 1 art_heap8 4096 5 0 3 4 2 2 3 0 8 0 art_heap4 256 1863 0 1620 38 22 16 16 0 8 0 art_table 32 1868 0 1623 3 0 3 3 0 8 0 art_node 16 456 0 416 1 0 1 1 0 8 0 sysvmsgpl 40 5 0 0 1 0 1 1 0 8 0 semapl 112 1847 0 1837 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 6479 0 5078 46 0 46 46 0 8 0 ffsino 240 6479 0 5078 83 0 83 83 0 8 0 nchpl 144 13090 0 12654 60 39 21 60 0 8 1 uvmvnodes 72 8084 0 0 147 0 147 147 0 8 0 vnodes 208 8084 0 0 426 0 426 426 0 8 0 namei 1024 44509 0 44509 8 7 1 1 0 8 1 vcpupl 1984 29 0 1 4 0 4 4 0 8 0 vmpool 520 54 0 26 4 2 2 2 0 8 0 scsiplug 64 4 0 4 3 2 1 1 0 8 1 scxspl 192 52490 0 52489 30 28 2 7 0 8 1 plimitpl 152 348 0 342 1 0 1 1 0 8 0 sigapl 432 3494 0 3482 2 0 2 2 0 8 0 futexpl 56 110012 0 110012 9 8 1 1 0 8 1 knotepl 112 997 0 980 5 4 1 3 0 8 0 kqueuepl 104 2382 0 2380 13 12 1 4 0 8 0 pipepl 128 2418 0 2403 14 12 2 2 0 8 1 fdescpl 424 3495 0 3482 2 0 2 2 0 8 0 filepl 120 35207 0 35131 46 41 5 11 0 8 2 lockfpl 104 1410 0 1409 1 0 1 1 0 8 0 lockfspl 48 459 0 458 1 0 1 1 0 8 0 sessionpl 112 43 0 34 1 0 1 1 0 8 0 pgrppl 48 111 0 102 1 0 1 1 0 8 0 ucredpl 96 3894 0 3887 1 0 1 1 0 8 0 zombiepl 144 3484 0 3484 1 0 1 1 0 8 1 processpl 864 3513 0 3484 4 0 4 4 0 8 0 procpl 632 7563 0 7525 5 1 4 5 0 8 0 sosppl 128 61 0 61 16 15 1 1 0 8 1 sockpl 384 8711 0 8691 83 78 5 14 0 8 2 mcl64k 65536 672 0 672 45 44 1 33 0 8 1 mcl16k 16384 59 0 59 21 20 1 1 0 8 1 mcl12k 12288 111 0 111 13 12 1 1 0 8 1 mcl9k 9216 65 0 65 18 17 1 1 0 8 1 mcl8k 8192 203 0 203 12 11 1 1 0 8 1 mcl4k 4096 430 0 430 12 11 1 1 0 8 1 mcl2k2 2112 23 0 23 10 9 1 1 0 8 1 mcl2k 2048 76031 0 75985 20 13 7 14 0 8 0 mtagpl 80 152 0 150 8 7 1 1 0 8 0 mbufpl 256 167636 0 167557 214 205 9 33 0 8 1 bufpl 256 22333 0 14252 509 3 506 506 0 8 0 anonpl 16 513095 0 493084 195 93 102 103 0 62 11 amapchunkpl 152 21359 0 21174 110 91 19 22 0 158 9 amappl16 192 22708 0 21533 209 149 60 72 0 8 0 amappl15 184 107 0 107 1 1 0 1 0 8 0 amappl14 176 936 0 931 1 0 1 1 0 8 0 amappl13 168 545 0 543 1 0 1 1 0 8 0 amappl12 160 843 0 842 1 0 1 1 0 8 0 amappl11 152 415 0 404 1 0 1 1 0 8 0 amappl10 144 468 0 467 1 0 1 1 0 8 0 amappl9 136 1035 0 1033 1 0 1 1 0 8 0 amappl8 128 573 0 522 2 0 2 2 0 8 0 amappl7 120 560 0 550 1 0 1 1 0 8 0 amappl6 112 347 0 333 1 0 1 1 0 8 0 amappl5 104 1163 0 1153 1 0 1 1 0 8 0 amappl4 96 3884 0 3856 1 0 1 1 0 8 0 amappl3 88 667 0 662 1 0 1 1 0 8 0 amappl2 80 25978 0 25914 3 1 2 3 0 8 0 amappl1 72 75144 0 74740 28 19 9 20 0 8 0 amappl 80 8254 0 8196 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 138 0 9 3 0 3 3 0 8 0 uaddrrnd 24 3549 0 3482 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 3549 0 3482 1 0 1 1 0 8 0 vmmpekpl 168 26340 0 26303 2 0 2 2 0 8 0 vmmpepl 168 440284 0 438049 450 299 151 162 0 357 45 vmsppl 272 3494 0 3482 6 4 2 2 0 8 1 pdppl 4096 7104 0 7044 13 4 9 9 0 8 0 pvpl 32 1430711 0 1408142 644 330 314 335 0 265 106 pmappl 200 3548 0 3508 4 1 3 3 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 1049 0 406 20 0 20 20 0 8 0