vfs: race condition in write cache causes File.Rename to fail
Author: HarmfulBreezeCreated Sep 18, 2026Updated Sep 25, 2026
Labelsbug
Before you start
- I have searched the forum and the existing issues for this problem.
- I have tested with the latest beta or stable release and can still reproduce the problem.
- This is a reproducible bug, not a usage question (questions belong on the forum).
Associated forum post URL
What is the problem you are having with rclone?
When editing a file's tags in foobar2000 (a music player), sometimes (quite randomly) rclone throws the following:
2026/09/18 15:50:32 INFO : <album path>/temp-85B2B722123322D2716935308FE52144.tmp: vfs cache: queuing for upload in 5s
2026/09/18 15:50:32 INFO : <album path>/01. The Subway.flac: File.Rename failed in Cache: failed to rename in cache: <album path>\temp-85B2B722123322D2716935308FE52144.tmp to <album path>\01. The Subway.flac: rename <album path>\temp-85B2B722123322D2716935308FE52144.tmp <album path>\01. The Subway.flac: Accès refusé.
2026/09/18 15:50:32 INFO : <album path>/01. The Subway.flac: vfs cache: removed cache file as stale (remote deleted)
2026/09/18 15:50:37 INFO : <album path>/01. The Subway.flac: Copied (new)
2026/09/18 15:50:37 INFO : <album path>/01. The Subway.flac: vfs cache: upload succeeded try #1This effectively results in the file being truncated to 0 inside the mount. The temporary file is kept inside the VFS cache and simply copying it to the mount usually fixes the edited file.
rclone version
rclone v1.75.1
- os/version: Microsoft Windows 11 Pro 25H2 25H2 (64 bit)
- os/kernel: 10.0.26200.9457 (x86_64)
- os/type: windows
- os/arch: amd64
- go/version: go1.26.8
- go/linking: static
- go/tags: cmount
Operating system
Windows
Which cloud storage system are you using?
Pixeldrain
Output of rclone config redacted
[pixeldrainfs]
type = pixeldrain
api_key = XXX
global.disable_http2 = true
Env:
RCLONE_VOLNAME=Pixeldrain
RCLONE_VERBOSE=1
RCLONE_LINKS=true
RCLONE_VFS_CACHE_MODE=full
RCLONE_VFS_CACHE_MAX_AGE=3d
RCLONE_CACHE_DIR=C:\Users\<user>\AppData\Local\rclone\PixeldrainService
RCLONE_BUFFER_SIZE=4M
RCLONE_VFS_READ_AHEAD=128M
RCLONE_VFS_DISK_SPACE_TOTAL_SIZE=2T
RCLONE_EXCLUDE_FROM=C:\Users\<user>\AppData\Local\rclone\PixeldrainService\exclude-file.txtThe command you were trying to run
rclone mount pixeldrainfs P:A log from the command with the -vv flag
I couldn't reproduce it after setting RCLONE_VERBOSE=2. I will share it when it happens again.Anything else?
The forum post I shared is not my own but I do believe this is the same issue.
Source: rclone/rclone