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 *163302 16529 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(fffffd802c5c6c00) at buf_free_pages+0x1ee sys/kern/vfs_biomem.c:318 buf_dealloc_mem(fffffd802c5c6c00) at buf_dealloc_mem+0xe1 sys/kern/vfs_biomem.c:194 buf_put(fffffd802c5c6c00) at buf_put+0x16b sys/kern/vfs_bio.c:131 brelse(fffffd802c5c6c00) at brelse+0x257 sys/kern/vfs_bio.c:922 vinvalbuf(fffffd8028263750,2,fffffd803f7c6c00,ffff8000ffff2c70,0,ffffffffffffffff) at vinvalbuf+0x3b1 sys/kern/vfs_subr.c:1977 ffs_truncate(fffffd8034561a50,0,4,fffffd803f7c6c00) at ffs_truncate+0xeb1 sys/ufs/ffs/ffs_inode.c:326 ufs_rmdir(ffff800014920b08) at ufs_rmdir+0x3af sys/ufs/ufs/ufs_vnops.c:1357 VOP_RMDIR(fffffd803672caa0,fffffd8028263750,ffff800014920c08) at VOP_RMDIR+0xf8 sys/kern/vfs_vops.c:474 dounlinkat(ffff8000ffff2c70,9,c00316a360,8) at dounlinkat+0x14c sys/kern/vfs_syscalls.c:1818 syscall(ffff800014920d80) at syscall+0x507 sys/arch/amd64/amd64/trap.c:555 Xsyscall(6,145,c000028000,145,100,1b) at Xsyscall+0x128 end of kernel end trace frame: 0xc002329978, 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(fffffd802c5c6c00) at buf_free_pages+0x1ee sys/kern/vfs_biomem.c:318 buf_dealloc_mem(fffffd802c5c6c00) at buf_dealloc_mem+0xe1 sys/kern/vfs_biomem.c:194 buf_put(fffffd802c5c6c00) at buf_put+0x16b sys/kern/vfs_bio.c:131 brelse(fffffd802c5c6c00) at brelse+0x257 sys/kern/vfs_bio.c:922 vinvalbuf(fffffd8028263750,2,fffffd803f7c6c00,ffff8000ffff2c70,0,ffffffffffffffff) at vinvalbuf+0x3b1 sys/kern/vfs_subr.c:1977 ffs_truncate(fffffd8034561a50,0,4,fffffd803f7c6c00) at ffs_truncate+0xeb1 sys/ufs/ffs/ffs_inode.c:326 ufs_rmdir(ffff800014920b08) at ufs_rmdir+0x3af sys/ufs/ufs/ufs_vnops.c:1357 VOP_RMDIR(fffffd803672caa0,fffffd8028263750,ffff800014920c08) at VOP_RMDIR+0xf8 sys/kern/vfs_vops.c:474 dounlinkat(ffff8000ffff2c70,9,c00316a360,8) at dounlinkat+0x14c sys/kern/vfs_syscalls.c:1818 syscall(ffff800014920d80) at syscall+0x507 sys/arch/amd64/amd64/trap.c:555 Xsyscall(6,145,c000028000,145,100,1b) at Xsyscall+0x128 end of kernel end trace frame: 0xc002329978, count: -14 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff8000149205e0 rbx 0xffff800014920690 rdx 0x2 rcx 0 rax 0 r8 0xffff8000149205a0 r9 0x1 r10 0 r11 0xff36e1b35254f4ac r12 0x3000000008 r13 0xffff8000149205f0 r14 0x100 r15 0x1 rip 0xffffffff810661f8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000149205d0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-fuzzer) pid=163302 stat=onproc flags process=2 proc=4000000 pri=17, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff29f8,0xffff8000ffff3b50 process=0xffff8000148a2378 user=0xffff80001491b000, vmspace=0xfffffd803f014000 estcpu=36, cpticks=11, pctcpu=0.5 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 6351 40062 0 0 3 0x14200 acct acct 19574 59245 0 0 3 0x14200 bored sosplice 16529 70292 76324 0 3 0x82 thrsleep syz-fuzzer 16529 516591 76324 0 3 0x4000082 nanosleep syz-fuzzer 16529 405256 76324 0 3 0x4000082 thrsleep syz-fuzzer 16529 175728 76324 0 3 0x4000082 thrsleep syz-fuzzer 16529 229684 76324 0 3 0x4000082 thrsleep syz-fuzzer 16529 507840 76324 0 3 0x4000082 kqread syz-fuzzer 16529 383983 76324 0 3 0x4000082 thrsleep syz-fuzzer *16529 163302 76324 0 7 0x4000002 syz-fuzzer 16529 295945 76324 0 3 0x4000082 thrsleep syz-fuzzer 76324 232292 10251 0 3 0x10008a pause ksh 10251 119823 33580 0 3 0x92 select sshd 94983 88853 1 0 3 0x100083 ttyin getty 33580 69252 1 0 3 0x80 select sshd 81036 366969 81675 73 3 0x100090 kqread syslogd 81675 437371 1 0 3 0x100082 netio syslogd 85303 214025 1 77 3 0x100090 poll dhclient 5175 357524 1 0 3 0x80 poll dhclient 5715 146746 0 0 3 0x14200 pgzero zerothread 64963 452164 0 0 3 0x14200 aiodoned aiodoned 76949 213493 0 0 3 0x14200 syncer update 68953 458423 0 0 3 0x14200 cleaner cleaner 81940 233085 0 0 3 0x14200 reaper reaper 39923 52433 0 0 3 0x14200 pgdaemon pagedaemon 28792 416755 0 0 3 0x14200 bored crynlk 9304 353798 0 0 3 0x14200 bored crypto 67578 407660 0 0 3 0x40014200 acpi0 acpi0 26107 27514 0 0 3 0x14200 bored softnet 97409 483158 0 0 3 0x14200 bored systqmp 76305 507305 0 0 3 0x14200 bored systq 57493 406165 0 0 3 0x40014200 bored softclock 79885 353863 0 0 3 0x40014200 idle0 98658 46748 0 0 3 0x14200 bored smr 1 492255 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 9636 6397K 9137K 78643K 54995 0 0 pcb 13 12K 14K 78643K 1434 0 0 rtable 93 11K 13K 78643K 5388 0 0 ifaddr 102 25K 31K 78643K 1315 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 470 0 0 iov 0 0K 32K 78643K 1979 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1232 77K 78K 78643K 14574 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 97 0 0 VM map 2 0K 0K 78643K 81 0 0 sem 12 0K 1K 78643K 6615 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12645 0 0 file desc 2 1K 25K 78643K 8544 0 0 sigio 0 0K 0K 78643K 121 0 0 proc 50 38K 63K 78643K 3503 0 0 subproc 0 0K 2K 78643K 1056 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 612 0 0 in_multi 14 0K 2K 78643K 1027 0 0 ether_multi 1 0K 0K 78643K 65 0 0 mrt 2 0K 0K 78643K 61 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 174 768K 768K 78643K 174 0 0 exec 0 0K 1K 78643K 1977 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 108 6K 40K 78643K 22475 0 0 UVM aobj 130 4K 4K 78643K 134 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 1658 0 0 NDP 26 0K 1K 78643K 437 0 0 temp 236 3539K 4182K 78643K 337630 0 0 kqueue 0 0K 0K 78643K 59 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 233 0 230 1 0 1 1 0 8 0 rtpcb 80 898 0 896 1 0 1 1 0 8 0 rtentry 112 999 0 970 2 0 2 2 0 8 0 unpcb 120 13367 0 13351 8 6 2 3 0 8 0 syncache 264 51 0 51 21 20 1 1 0 8 1 sackhl 24 3 0 3 3 3 0 1 0 8 0 tcpqe 32 3896 0 3896 5 5 0 1 0 8 0 tcpcb 544 5920 0 5916 64 58 6 15 0 8 5 ipq 40 58 0 58 24 24 0 1 0 8 0 ipqe 40 536 0 536 24 24 0 1 0 8 0 inpcb 280 13926 0 13919 78 72 6 13 0 8 5 rttmr 72 23 0 23 10 10 0 1 0 8 0 ip6q 72 2 0 2 2 2 0 1 0 8 0 ip6af 40 2 0 2 1 1 0 1 0 8 0 nd6 48 137 0 137 4 3 1 1 0 8 1 pkpcb 40 30 0 30 12 12 0 1 0 8 0 swfcl 56 2 0 0 1 0 1 1 0 8 0 ppxss 1128 159 0 159 39 38 1 1 0 8 1 art_heap8 4096 8 0 6 8 5 3 3 0 8 1 art_heap4 256 4027 0 3865 54 38 16 18 0 8 2 art_table 32 4035 0 3871 4 1 3 3 0 8 0 art_node 16 993 0 966 1 0 1 1 0 8 0 sysvmsgpl 40 151 0 135 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 6612 0 6602 1 0 1 1 0 8 0 shmpl 112 132 0 4 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 14878 0 13473 46 0 46 46 0 8 0 ffsino 240 14878 0 13473 85 1 84 84 0 8 0 nchpl 144 27739 0 26151 62 0 62 62 0 8 0 uvmvnodes 72 9094 0 0 166 0 166 166 0 8 0 vnodes 208 9094 0 0 479 0 479 479 0 8 0 namei 1024 111683 0 111683 14 13 1 1 0 8 1 vmpool 520 79 0 79 23 23 0 1 0 8 0 scsiplug 64 7 0 7 6 6 0 1 0 8 0 scxspl 192 127714 0 127714 41 39 2 7 0 8 2 plimitpl 152 759 0 754 1 0 1 1 0 8 0 sigapl 432 8535 0 8525 2 0 2 2 0 8 0 futexpl 56 370168 0 370168 15 14 1 1 0 8 1 knotepl 112 2263 0 2250 4 3 1 3 0 8 0 kqueuepl 104 2919 0 2917 15 14 1 4 0 8 0 pipepl 112 10066 0 10057 32 30 2 2 0 8 1 fdescpl 424 8536 0 8525 2 0 2 2 0 8 0 filepl 120 91076 0 91024 92 84 8 11 0 8 5 lockfpl 104 3050 0 3049 1 0 1 1 0 8 0 lockfspl 48 1029 0 1028 1 0 1 1 0 8 0 sessionpl 112 77 0 69 1 0 1 1 0 8 0 pgrppl 48 131 0 123 1 0 1 1 0 8 0 ucredpl 96 12506 0 12499 1 0 1 1 0 8 0 zombiepl 144 8536 0 8536 6 5 1 1 0 8 1 processpl 864 8563 0 8536 4 0 4 4 0 8 0 procpl 632 18749 0 18714 5 1 4 5 0 8 0 sosppl 128 120 0 120 28 28 0 1 0 8 0 sockpl 384 28375 0 28350 134 125 9 22 0 8 5 mcl64k 65536 2658 0 2658 238 237 1 64 0 8 1 mcl16k 16384 289 0 289 33 32 1 1 0 8 1 mcl12k 12288 555 0 555 30 29 1 1 0 8 1 mcl9k 9216 179 0 179 36 35 1 1 0 8 1 mcl8k 8192 1220 0 1220 23 22 1 1 0 8 1 mcl4k 4096 776 0 776 28 27 1 1 0 8 1 mcl2k2 2112 49 0 49 23 23 0 1 0 8 0 mcl2k 2048 81486 0 81444 46 40 6 13 0 8 0 mtagpl 80 4760 0 4760 39 38 1 7 0 8 1 mbufpl 256 243396 0 243327 350 328 22 62 0 8 5 bufpl 256 42581 0 33489 569 0 569 569 0 8 0 anonpl 16 1220408 0 1205136 345 267 78 88 0 62 1 amapchunkpl 152 48503 0 48398 163 155 8 19 0 158 1 amappl16 192 61775 0 60813 414 363 51 68 0 8 1 amappl15 184 1579 0 1579 10 10 0 1 0 8 0 amappl14 176 2416 0 2412 2 1 1 1 0 8 0 amappl13 168 507 0 507 11 10 1 1 0 8 1 amappl12 160 703 0 703 12 12 0 1 0 8 0 amappl11 152 1603 0 1592 1 0 1 1 0 8 0 amappl10 144 297 0 294 1 0 1 1 0 8 0 amappl9 136 1846 0 1841 1 0 1 1 0 8 0 amappl8 128 1326 0 1283 3 1 2 2 0 8 0 amappl7 120 589 0 581 1 0 1 1 0 8 0 amappl6 112 1508 0 1496 1 0 1 1 0 8 0 amappl5 104 1645 0 1635 1 0 1 1 0 8 0 amappl4 96 9020 0 8992 1 0 1 1 0 8 0 amappl3 88 2591 0 2585 1 0 1 1 0 8 0 amappl2 80 65836 0 65784 3 1 2 3 0 8 0 amappl1 72 168499 0 168122 30 21 9 20 0 8 0 amappl 80 20000 0 19969 2 1 1 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 133 0 4 3 0 3 3 0 8 0 uaddrrnd 24 8615 0 8525 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 8615 0 8525 1 0 1 1 0 8 0 vmmpekpl 168 67062 0 67040 2 0 2 2 0 8 0 vmmpepl 168 1082492 0 1080699 672 548 124 155 0 357 31 vmsppl 272 8535 0 8525 14 13 1 2 0 8 0 pdppl 4096 17236 0 17208 9 4 5 6 0 8 0 pvpl 32 3528875 0 3510699 1020 743 277 309 0 265 102 pmappl 200 8614 0 8604 1 0 1 1 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 1540 0 820 23 1 22 23 0 8 0