Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arm64 build for Windows #5828

Open
unintended-consequences opened this issue Nov 19, 2021 · 36 comments
Open

Arm64 build for Windows #5828

unintended-consequences opened this issue Nov 19, 2021 · 36 comments
Assignees
Milestone

Comments

@unintended-consequences

The associated forum post URL from https://forum.rclone.org

https://forum.rclone.org/t/arm-64-bit-for-windows/27559/3

What is your current rclone version (output from rclone version)?

rclone v1.58.0-beta.5896.f9321fccb

What problem are you are trying to solve?

Trying to get a native build for Microsoft Surface Pro X (running on Microsoft SQ1 ARM processor)

How do you think rclone should be changed to solve that?

The beta build that ncw posted in the forum works!

How to use GitHub

  • Please use the 👍 reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.
@ivandeex
Copy link
Member

The latest release of golang can cross-compile for windows/arm64,
but the CI infrastructure is not completely ready for that step yet.
Can't find any mentions of windows/arm64 on the github runners page
https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-software
The WinFSP project does not yet release install packages for windows/arm64
Don't yet know if chocolatey release dev packages for the platform

@ncw
Copy link
Member

ncw commented Nov 19, 2021

It will be relatively straight forward to build a cross compiled version of rclone which will not have rclone mount support but otherwise be fully functional.

In fact @unintended-consequences tested a version of that for me in the forum.

I think we should probably do that for the moment while we wait for WinFSP and GitHub actions to catch up.

@ncw
Copy link
Member

ncw commented Nov 19, 2021

I had a go at that... If it goes to plan a windows/arm64 build will end up here...

v1.58.0-beta.5900.2346497f8.fix-5828-windows-arm64 on branch fix-5828-windows-arm64 (uploaded in 15-30 mins)

@ncw
Copy link
Member

ncw commented Nov 22, 2021

OK here is the next attempt!

v1.58.0-beta.5903.aa406ce6b.fix-5828-windows-arm64 on branch fix-5828-windows-arm64 (uploaded in 15-30 mins)

@ncw ncw self-assigned this Nov 22, 2021
@ncw
Copy link
Member

ncw commented Nov 25, 2021

@ncw
Copy link
Member

ncw commented Mar 3, 2022

I've merged this to master now which means it will be in the latest beta in 15-30 minutes and we will officially support windows/arm64 binaries in v1.58 but without WinFsp/mount support for the moment.

@ncw
Copy link
Member

ncw commented Apr 24, 2022

If anyone with a windows/arm64 device would like to try this binary which should support rclone mount and the new WinFSP which supports arm64 I'd be very interested in the results.

v1.59.0-beta.6084.8920feefc.fix-cmount-windows-nocgo on branch fix-cmount-windows-nocgo

@Jovines
Copy link

Jovines commented May 3, 2022

If anyone with a windows/arm64 device would like to try this binary which should support rclone mount and the new WinFSP which supports arm64 I'd be very interested in the results.

v1.59.0-beta.6084.8920feefc.fix-cmount-windows-nocgo on branch fix-cmount-windows-nocgo

I am trying your version using Windows ARM64. It does not seem to be working properly, and the disk is displayed after being mounted, but is kept waiting and cannot be viewed.

无标题
Just like this, Q is the disk I mounted with rclone.

I used WinFsp 2022+ARM64 Beta2.

@ncw
Copy link
Member

ncw commented May 4, 2022

@Jovines

Thanks for testing.

Can you attach a log made like this please?

rclone mount ... -vv --debug-fuse --log-file rclone.log

@hellvy-github
Copy link

hellvy-github commented Jun 28, 2022

Hello, I have the same result as Jovines, the disk is displayed, but is kept waiting and cannot be viewed. The rclone console is stuck after enter password and forced restart needed. Sometimes I've got no drive at all, but rclone console exit to prompt and working.

Here's log file when drive is displayed but can not be viewed. I'm looking forward to use this feature on my surface pro x, Thank you :)

I'm using rclone-v1.59.0-beta.6089.cdb40336b.fix-cmount-windows-nocgo-windows-arm64 and winfsp-1.11.22176
rclone-withdrive.log

@ncw
Copy link
Member

ncw commented Jun 28, 2022

@hellvy-github for completeness sake, can you try the latest beta - this code has been merged to master now. I'm not sure it will make a difference but we'll all be trying the same thing anyway.

It looks like it is working in the log - at least I can't see any obvious errors.

How are you starting rclone? Just running as your user in a command prompt? That would be recommended for testing.

It might be worth supplying a specific drive name or a folder to mount on to see if that makes a difference.

@hellvy-github
Copy link

Hello, @ncw, thank you for your reply. I've tried the latest beta build, still have no luck. I've disabled windows firewall for testing and tried few mount options. I've attached some screen and log files for you guys to investigate.

Sorry for messing test options. It's my first time trying rclone mount. Just rclone copy all the time before.

rclone-console-misc-testing-20220629-01-Clipboard01
rclone-console-network-share-20220629-01-Clipboard01
explorer-20220629-01-Clipboard01rclone-20220629-mount-drive.log
rclone-20220629-network-share-3.log
rclone-20220629-network-share-2.log
rclone-20220629-mount-dir.log
rclone-20220629-network-share.log

@hellvy-github
Copy link

Hello, I've compared log file from working Intel PC with log from Surface Pro X.
Log file from working Intel PC,

...
2022/07/01 20:38:05 DEBUG : Google drive root '': root_folder_id = "0AMMeTj1Fmu7pUk9PVA" - save this in the config to speed up startup
2022/07/01 20:38:06 NOTICE: Assigning drive letter "Z:"
2022/07/01 20:38:06 DEBUG : Network mode mounting is disabled
2022/07/01 20:38:06 DEBUG : Mounting on "Z:" ("gd")
2022/07/01 20:38:06 DEBUG : Google drive root '': Mounting with options: ["-o" "attr_timeout=1" "-o" "debug" "-o" "uid=-1" "-o" "gid=-1" "--FileSystemName=rclone" "-o" "volname=gd"]
2022/07/01 20:38:06 DEBUG : Google drive root '': Init:
2022/07/01 20:38:06 DEBUG : Google drive root '': >Init:
2022/07/01 20:38:06 DEBUG : /: Statfs:
2022/07/01 20:38:06 DEBUG : /: >Statfs: stat={Bsize:4096 Frsize:4096 Blocks:307067065061 Bfree:274877906944 Bavail:274877906944 Files:1000000000 Ffree:1000000000 Favail:0 Fsid:0 Flag:0 Namemax:255}, errc=0
2022/07/01 20:38:06 DEBUG : /: Getattr: fh=0xFFFFFFFFFFFFFFFF
2022/07/01 20:38:06 DEBUG : /: >Getattr: errc=0
2022/07/01 20:38:06 DEBUG : /: Readlink:
2022/07/01 20:38:06 DEBUG : /: >Readlink: linkPath="", errc=-40
The service rclone has been started.
rclone[TID=05e8]: FFFF858B8C34D050: >>QueryVolumeInformation
2022/07/01 20:38:06 DEBUG : /: Statfs:
2022/07/01 20:38:06 DEBUG : /: >Statfs: stat={Bsize:4096 Frsize:4096 Blocks:307067065061 Bfree:274877906944 Bavail:274877906944 Files:1000000000 Ffree:1000000000 Favail:0 Fsid:0 Flag:0 Namemax:255}, errc=0
rclone[TID=05e8]: FFFF858B8C34D050: <<QueryVolumeInformation IoStatus=0[0] VolumeInfo={TotalSize=477e9:f92e5000, FreeSize=40000:0, VolumeLabel="gd"}
rclone[TID=05e8]: FFFF858B8C2C2A90: >>Create [UT---C] "", FILE_OPEN, CreateOptions=21, FileAttributes=10, Security=NULL, AllocationSize=0:0, AccessToken=00000000000005BC[PID=820], DesiredAccess=100000, GrantedAccess=0, ShareAccess=3
2022/07/01 20:38:06 DEBUG : /: Getattr: fh=0xFFFFFFFFFFFFFFFF
2022/07/01 20:38:06 DEBUG : /: >Getattr: errc=0
...

Log file from Surface Pro X

...
2022/07/03 09:14:01 DEBUG : Google drive root '': 'root_folder_id = 0AMMeTj1Fmu7pUk9PVA' - save this in the config to speed up startup
2022/07/03 09:14:01 NOTICE: Assigning drive letter "Z:"
2022/07/03 09:14:01 DEBUG : Network mode mounting is disabled
2022/07/03 09:14:01 DEBUG : Mounting on "Z:" ("gd")
2022/07/03 09:14:01 DEBUG : Google drive root '': Mounting with options: ["-o" "attr_timeout=1" "-o" "debug" "-o" "uid=-1" "-o" "gid=-1" "--FileSystemName=rclone" "-o" "volname=gd"]
2022/07/03 09:14:02 DEBUG : Google drive root '': Init:
2022/07/03 09:14:02 DEBUG : Google drive root '': >Init:
2022/07/03 09:14:02 DEBUG : /: Statfs:
2022/07/03 09:14:02 DEBUG : /: >Statfs: stat={Bsize:4096 Frsize:4096 Blocks:307067065061 Bfree:274877906944 Bavail:274877906944 Files:1000000000 Ffree:1000000000 Favail:0 Fsid:0 Flag:0 Namemax:255}, errc=0
2022/07/03 09:14:02 DEBUG : /: Getattr: fh=0xFFFFFFFFFFFFFFFF
2022/07/03 09:14:02 DEBUG : /: >Getattr: errc=0
2022/07/03 09:14:02 DEBUG : /: Readlink:
2022/07/03 09:14:02 DEBUG : /: >Readlink: linkPath="", errc=-40
2022/07/03 09:14:02 DEBUG : /: Getxattr: name="non-existant-a11ec902d22f4ec49003af15282d3b00"
2022/07/03 09:14:02 DEBUG : /: >Getxattr: errc=-40, value=""
rclone[TID=3444]: FFFF868BEA915DD0: >>QueryVolumeInformation
2022/07/03 09:14:02 DEBUG : /: Statfs:
2022/07/03 09:14:02 DEBUG : /: >Statfs: stat={Bsize:4096 Frsize:4096 Blocks:307067065061 Bfree:274877906944 Bavail:274877906944 Files:1000000000 Ffree:1000000000 Favail:0 Fsid:0 Flag:0 Namemax:255}, errc=0
rclone[TID=3444]: FFFF868BEA915DD0: <<QueryVolumeInformation IoStatus=0[0] VolumeInfo={TotalSize=477e9:f92e5000, FreeSize=40000:0, VolumeLabel="gd"}
rclone[TID=3444]: FFFF868BECEDFDC0: >>Create [UT---C] "", FILE_OPEN, CreateOptions=21, FileAttributes=10, Security=NULL, AllocationSize=0:0, AccessToken=00000000000005BC[PID=2694], DesiredAccess=100000, GrantedAccess=0, ShareAccess=3
2022/07/03 09:14:02 DEBUG : /: Getattr: fh=0xFFFFFFFFFFFFFFFF
2022/07/03 09:14:02 DEBUG : /: >Getattr: errc=0
..

I've noticed some different in log files. While Intel PC got "The service rclone has been started." after "Readlink: linkPath="", errc=-40". Surface Pro X got "Getxattr: name="non-existant-a11ec902d22f4ec49003af15282d3b00"" instead.

Is there any clue from this? Is there anything to do with WinFsp?

Ps. rclone on Interl PC version is v1.55.1 while on Surface Pro X is v1.59.0-beta.6309.73e3bb09d.

@ncw
Copy link
Member

ncw commented Jul 4, 2022

I'm really not sure what is going on here. I think we are going to have to ask @billziss-gh for help. Those two startups don't look very different to me but the ARM64 one is missing the "The service rclone has been started." line which is suspicious.

The Getxattr: name="non-existant-a11ec902d22f4ec49003af15282d3b00" is from something probing to see if xattrs are supported.

@billziss-gh
Copy link
Contributor

Unfortunately I am on vacation and unable to look into this in detail.

I had a brief look at the cgofuse code and it appears that it knows how to correctly load the ARM64 version of the WinFsp DLL. @ncw are you using the cgo or nocgo variant of cgofuse?

BTW, if you do not see the message: “The service rclone has been started.” then FUSE has not been started, which is definitely a problem.

@hellvy-github
Copy link

Hello @billziss-gh, thank you for checking this issue out. According to this comment of mine #5828 (comment), I think it's nocgo variant .

Thank you and have a great vacation :)

@ncw
Copy link
Member

ncw commented Jul 6, 2022

Unfortunately I am on vacation and unable to look into this in detail.

Enjoy your vacation :-)

I had a brief look at the cgofuse code and it appears that it knows how to correctly load the ARM64 version of the WinFsp DLL. @ncw are you using the cgo or nocgo variant of cgofuse?

We are now using the nocgo variant which has simplified a lot of the build infrastructure :-)

BTW, if you do not see the message: “The service rclone has been started.” then FUSE has not been started, which is definitely a problem.

OK.

@hellvy-github
Copy link

Hello, any update for this issue? Should we try cgo variant of cgofuse as @ivandeex mentioned? Is there something that surface pro x user with zero coding and low compiling experience can help?

@ncw
Copy link
Member

ncw commented Jul 20, 2022

@hellvy-github if you are able to compile go programs on the surface pro directly, then you'll be using CGO by default. So downloading the rclone source and just running go build -tags cmount should build it with CGO. You'll need the fuse header files and a C compiler so it isn't trivial to set up. There are some hints here: https://github.com/rclone/rclone/blob/master/bin/win-build.bat

@hellvy-github
Copy link

Thank you @ncw for your information, I'll try it asap.
Don't worry about compiler tools, I guess I have plenty. I have 2 variants of ninja, compiled by go and compiled by CC variant. I also have 3 variants of LLVM. The one come with Visual Studio I've installed, other one is binary installed because I don't know it already come with Visual Studio. And the one I manually compiled because I don't know it's the same tool I've already installed. I just don't know what ninja and LLVM actually are.

@hellvy-github
Copy link

Hello @ncw , I've tried building rclone form source and got this error..

C:_Silo_build\rclone>go build -trimpath -ldflags -s -tags cmount
runtime/cgo
In file included from _cgo_export.c:4:
cgo-gcc-export-header-prolog:25:55: error: '_check_for_64_bit_pointer_matching_GoInt' declared as an array with a negative size

C:_Silo_build\rclone>

But when I set CGO_ENABLED=0, It can build successfully but the same result when mount.

Do you have any idea about this error?

@ncw
Copy link
Member

ncw commented Jul 25, 2022

Try setting the env vars

CGO_CFLAGS="-arch arm64"
CGO_LDFLAGS="-arch arm64"

I think that the compiler might be being invoked as a 32 bit compiler.

@hellvy-github
Copy link

Hello, @ncw. When I tried compiling it again, there's no error

"cgo-gcc-export-header-prolog:25:55: error: '_check_for_64_bit_pointer_matching_GoInt' declared as an array with a negative size"

anymore, I don't know why. Then I can proceed to get other error. With or without adding CGO_CFLAGS and CGO_LDFLAGS, I got

go build -trimpath -ldflags -s -tags cmount
github.com/winfsp/cgofuse/fuse
In file included from _cgo_export.c:4:
cgo-gcc-export-header-prolog:43:34: error: redeclaration of 'go_hostGetattr' cannot add 'dllexport' attribute
host_cgo.go:322:12: note: previous declaration is here
cgo-gcc-export-header-prolog:44:34: error: redeclaration of 'go_hostReadlink' cannot add 'dllexport' attribute
host_cgo.go:323:12: note: previous declaration is here
......
......
cgo-gcc-export-header-prolog:61:34: error: redeclaration of 'go_hostFsync' cannot add 'dllexport' attribute
host_cgo.go:342:12: note: previous declaration is here
fatal error: too many errors emitted, stopping now [-ferror-limit=]

Here're some go env and variables I've set

C:_Silo_build\rclone-1.59.0-1>go env
set GOARCH=arm64
set GOHOSTARCH=arm64
set GOHOSTOS=windows
set GOVERSION=go1.18.4
set GCCGO=gccgo
set AR=ar
set CC=clang.exe
set CXX=clang.exe
set CGO_ENABLED=1
set CGO_CFLAGS=-g -O2 -arch arm64
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2 -arch arm64
set GOGCCFLAGS=-mthreads -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=C:_Silo\tmps\go-build3711696058=/tmp/go-build -gno-record-gcc-switches

clang -v
clang version 14.0.6
Target: arm64-pc-windows-msvc
Thread model: posix

Thank you.

@unintended-consequences
Copy link
Author

Sorry, just checking in to see if there any further consideration for progress on rclone mount ?

@hellvy-github
Copy link

Hi @unintended-consequences, not much progress on my side due to lack of knowledge and free time. Still got same error but knowing that this error

cgo-gcc-export-header-prolog:25:55: error: '_check_for_64_bit_pointer_matching_GoInt' declared as an array with a negative size

and this

cgo-gcc-export-header-prolog:43:34: error: redeclaration of 'go_hostGetattr' cannot add 'dllexport' attribute
host_cgo.go:322:12: note: previous declaration is here

occurred in difference variant of LLVM's clang I used.

I tried to make the most of my free time by building rclone mount with different variant of clang at the same time. Ending with different errors for each variant. I think I should try to solve error one at a time.

@billziss-gh
Copy link
Contributor

I am back from vacation and will be look at this in the next day or two. Sorry for the long delay.

@billziss-gh
Copy link
Contributor

I set up a minimal development environment on a new Win11 ARM64 VM and was able to build the nocgo version of rclone.

When I run a command such as rclone mount xps:Projects X: (xps is an SFTP remote on my Windows laptop) I see that the X: drive is created, but it is not functional. It appears that Explorer is never able to open the root directory on the drive.

PROBLEMS

In my attempts to troubleshoot this problem I seem to have stumbled upon multiple other problems:

  • Sometimes rclone exits immediately and does not create the drive at all. Other times it manages to create the drive, but as mentioned it does not function correctly. I suspect some sort of race on startup.

  • Sometimes I get a warning/error about "poll_interval". Passing --poll_interval 0 seems to quieten this message.

  • It is not clear to me how to get full debug logs from rclone. When I use -v --debug-fuse I seem to get the WinFsp debug logs. When I use -vv --debug-fuse I seem to get rclone's own debug logs. @ncw what is the proper way to invoke rclone to get full debug logs? (Ideally I would like to get both WinFsp and rclone debug logs if that is possible.)

  • Unfortunately the Delve debugger does not currently support Windows/ARM64 so it is not possible to run rclone under the debugger.

SPECULATION

On a couple of runs with -v --debug-fuse I was able to get somewhat usable WinFsp debug logs. These showed that the drive was created properly and the system attempted to get information about the drive (QueryVolumeInformation) and then open its root directory (Create "\"). In at least one of those debug logs, rclone never returned from the Create "\" call.

This means that some system component was stuck waiting for the root directory of the drive to be opened. Naturally if a file system does not complete open requests, its drive appears non-functional.

@hellvy-github
Copy link

Hello @billziss-gh, It's great having you here and see practical investigation :) So you think the problem doesn't come from cgo and nocgo variant right?

I'd like to tell that I've sorted my testing procedure out and lead all of my 3 variants of clang to the same error which is

go build -trimpath -ldflags -s -tags cmount
github.com/winfsp/cgofuse/fuse
In file included from _cgo_export.c:4:
cgo-gcc-export-header-prolog:43:34: error: redeclaration of 'go_hostGetattr' cannot add 'dllexport' attribute
host_cgo.go:322:12: note: previous declaration is here
......
......
cgo-gcc-export-header-prolog:61:34: error: redeclaration of 'go_hostFsync' cannot add 'dllexport' attribute
host_cgo.go:342:12: note: previous declaration is here
fatal error: too many errors emitted, stopping now [-ferror-limit=]

And I can't do anything further, so I'll just sit here watching and hoping there's something I can help :)

@ncw
Copy link
Member

ncw commented Sep 6, 2022

I set up a minimal development environment on a new Win11 ARM64 VM and was able to build the nocgo version of rclone.

Thanks for having a look at this @billziss-gh

  • Sometimes I get a warning/error about "poll_interval". Passing --poll_interval 0 seems to quieten this message.

You can ignore these - the are harmless

  • It is not clear to me how to get full debug logs from rclone. When I use -v --debug-fuse I seem to get the WinFsp debug logs. When I use -vv --debug-fuse I seem to get rclone's own debug logs. @ncw what is the proper way to invoke rclone to get full debug logs? (Ideally I would like to get both WinFsp and rclone debug logs if that is possible.)

-vv --debug-fuse should be the right incantation to get both rclone debug logs and enable the WinFsp debug logs. The rclone debug logs can be quite noisy.

On a couple of runs with -v --debug-fuse I was able to get somewhat usable WinFsp debug logs. These showed that the drive was created properly and the system attempted to get information about the drive (QueryVolumeInformation) and then open its root directory (Create "\"). In at least one of those debug logs, rclone never returned from the Create "\" call.

This means that some system component was stuck waiting for the root directory of the drive to be opened. Naturally if a file system does not complete open requests, its drive appears non-functional.

It would be insteresting to see the -vv --debug-fuse logs here to see how far rclone got.

Running rclone with the --rc flag as well and then looking at http://localhost:5572/debug/pprof/goroutine?debug=1 will show what go routines are executing and where rclone is stuck which would be very useful info - that should help pinpoint the problem.

@billziss-gh
Copy link
Contributor

billziss-gh commented Oct 6, 2022

SUMMARY

Investigation has shown that this issue is a result of two problems in the Golang runtime:

  • The Golang runtime captures all Windows exceptions using AddVectoredExceptionHandler. Vectored Exception Handlers run prior to the regular Structured Exception Handlers in Windows. This means that Golang will see and consider fatal exceptions that are normal in the regular execution of a Windows program; such exceptions would have been handled just fine if SEH was allowed to run.

  • The Windows ARM64 version of runtime.badsignal2 has a serious bug that results in an Access Violation crash in WriteFile.

I will report these problems to Golang and possibly also provide patches for them (if my CLA with Google is still valid).

IN DETAIL

badsignal2

I eventually found time to look into this problem again. After trying a couple of times with rclone I decided to try with the memfs sample from cgofuse and sure enough I was able to reproduce the problem. Under WinDbg I would get an Access Violation inside WriteFile with a minimal stack:

0:008> k
 # Child-SP          RetAddr               Call Site
00 00000086`77ffe450 00007ff7`5d1ffa38     KERNELBASE!WriteFile+0x3c
01 00000086`77ffe4b0 00000000`00000000     memfs+0x5fa38

This stack is not very useful as WinDbg does not understand the Golang symbol format and does not know how to walk the Golang stack.

Eventually I was able to figure out that the crash would happen within WinFsp's FspServiceLoop and specifically while calling the Windows API StartServiceCtrlDispatcherW. WinFsp uses this API to switch a process into a service if possible; the call is expected to fail in the case of running a FUSE file system from the command line, but this failure is benign.

At this point I had a bit of hair-pulling and even started doubting my tools: how did calling a Windows API in a non-Golang thread result in a Golang crash in WriteFile? Eventually it dawned on me that perhaps the WriteFile buffer might contain some useful information and I should try to see what is in it. I looked up the AArch64 calling convention, which says that registers x0-x7 are used for passing arguments. With this information and the WriteFile prototype we get:

BOOL WriteFile(
  [in]                HANDLE       hFile,
  [in]                LPCVOID      lpBuffer,
  [in]                DWORD        nNumberOfBytesToWrite,
  [out, optional]     LPDWORD      lpNumberOfBytesWritten,
  [in, out, optional] LPOVERLAPPED lpOverlapped
);

/*
 * x0 -> hFile
 * x1 -> lpBuffer
 * x2 -> nNumberOfBytesToWrite
 * x3 -> lpNumberOfBytesWritten
 * x4 -> lpOverlapped
 */

So what are the values of the registers at the time of the crash?

0:008> r
 x0=000000000000006c   x1=00007ff75d3759c0   x2=0000000000000036   x3=0000000000000007
 x4=0000000000000000   x5=00007ff75d3759c0   x6=00007ff75d203f10   x7=00007ffd95a46ad8
 x8=0000008677ffe480   x9=0000023efbe03c90  x10=00007ff7a7f42901  x11=0000000000000000
x12=00007ffd94eee7a0  x13=0000000000000007  x14=00007ffd959fe5a4  x15=00007ff75d1ffa60
x16=00007ffd915b9c60  x17=0000000000000000  x18=0000000000000000  x19=0000000000000007
x20=0000000000000000  x21=000000000000006c  x22=0000000000000000  x23=00007ffd95d2ba20
x24=00007ffd95d2ba28  x25=0000023efbe15150  x26=00007ff75d1ffa60  x27=00007ff75d308180
x28=0000000000000000   fp=0000008677ffe460   lr=00007ff75d1ffa38   sp=0000008677ffe450
 pc=00007ffd915b9c9c  psr=00000040 ---- EL0

So the crash happens because register x3 which is supposed to contain the pointer lpNumberOfBytesWritten contains the bogus value 7.

And just what does register x1 which contains the lpBuffer contain?

0:008> d x1
00007ff7`5d3759c0  72 75 6e 74 69 6d 65 3a-20 73 69 67 6e 61 6c 20  runtime: signal 
00007ff7`5d3759d0  72 65 63 65 69 76 65 64-20 6f 6e 20 74 68 72 65  received on thre
00007ff7`5d3759e0  61 64 20 6e 6f 74 20 63-72 65 61 74 65 64 20 62  ad not created b
00007ff7`5d3759f0  79 20 47 6f 2e 0a 00 00-00 00 00 00 00 00 00 00  y Go............
00007ff7`5d375a00  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
00007ff7`5d375a10  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
00007ff7`5d375a20  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
00007ff7`5d375a30  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................

Aha! Now we are getting somewhere.

It looks like the Golang runtime has received a "bad signal" and is trying to say so on stderr. Let us look in the Golang source where this string is defined and used. We find it in setBadSignalMsg:

func setBadSignalMsg() {
	const msg = "runtime: signal received on thread not created by Go.\n"
	for i, c := range msg {
		badsignalmsg[i] = byte(c)
		badsignallen++
	}
}

So where is badsignalmsg used from? We find it in badsignal2:

TEXT runtime·badsignal2(SB),NOSPLIT,$16-0
	NO_LOCAL_POINTERS

	// stderr
	MOVD	runtime·_GetStdHandle(SB), R1
	MOVD	$-12, R0
	SUB	$16, RSP	// skip over saved frame pointer below RSP
	BL	(R1)
	ADD	$16, RSP

	// handle in R0 already
	MOVD	$runtime·badsignalmsg(SB), R1	// lpBuffer
	MOVD	$runtime·badsignallen(SB), R2	// lpNumberOfBytesToWrite
	MOVD	(R2), R2
	MOVD	R13, R3		// lpNumberOfBytesWritten
	MOVD	$0, R4			// lpOverlapped
	MOVD	runtime·_WriteFile(SB), R12
	SUB	$16, RSP	// skip over saved frame pointer below RSP
	BL	(R12)

	// Does not return.
	B	runtime·abort(SB)

	RET

Notice here how "R3" (really ARM64 x3) is initialized using a bogus value from "R13" (really ARM64 x13). This is what causes the Access Violation in WriteFile.

The fix for badsignal2 is to properly initialize x3.

initExceptionHandler

So we found the source of the crash, but the question remains: why does Golang think that it got a "bad signal" (not to mention that we are on Windows)?

Searching for badsignal2 reveals a few places where this routine is called. Importantly we find that sigtramp calls badsignal2 if there is no "current g" (i.e. this thread is not a Golang thread).

And just who calls sigtramp? A few places actually, but importantly one of the following: exceptiontramp, firstcontinuetramp, lastcontinuetramp.

So this looks like part of some generic exception handling that the Golang runtime sets up. Indeed we find that the Golang runtime sets it up in initExceptionHandler:

func initExceptionHandler() {
	stdcall2(_AddVectoredExceptionHandler, 1, abi.FuncPCABI0(exceptiontramp))
	if _AddVectoredContinueHandler == nil || GOARCH == "386" {
		// use SetUnhandledExceptionFilter for windows-386 or
		// if VectoredContinueHandler is unavailable.
		// note: SetUnhandledExceptionFilter handler won't be called, if debugging.
		stdcall1(_SetUnhandledExceptionFilter, abi.FuncPCABI0(lastcontinuetramp))
	} else {
		stdcall2(_AddVectoredContinueHandler, 1, abi.FuncPCABI0(firstcontinuetramp))
		stdcall2(_AddVectoredContinueHandler, 0, abi.FuncPCABI0(lastcontinuetramp))
	}
}

The initExceptionHandler uses AddVectoredExceptionHandler to add a Vectored Exception Handler. This use looks ill-advised. Windows components (and some third party applications and DLLs) regularly use Structured Exception Handling to report benign errrors, such as "Access Denied". Vectored Exception Handlers run prior to the regular Structured Exception Handlers in Windows. This means that the Golang runtime preempts the regular processing of benign errors and thinks that an unrecoverable error has happened.

Let's confirm our suspicion by re-running memfs all the way to StartServiceCtrlDispatcherW. We then set a breakpoint at RaiseException (bp KernelBase!RaiseException) and continue the program.

The debugger stops on entry to RaiseException. Let's examine our call stack:

0:009> k
 # Child-SP          RetAddr               Call Site
00 00000060`f85ff050 00007ffd`91fc3108     KERNELBASE!RaiseException
01 00000060`f85ff050 00007ffd`91fc30c0     RPCRT4!RpcpRaiseException+0x40
02 00000060`f85ff070 00007ffd`91f92208     RPCRT4!RpcRaiseException+0x20
03 00000060`f85ff090 00007ffd`92112d5c     RPCRT4!NdrpSendReceive+0x118
04 00000060`f85ff0d0 00007ffd`92113244     RPCRT4!NdrpClientCall2+0x33c
05 00000060`f85ff6f0 00007ffd`9509976c     RPCRT4!NdrClientCall2+0x24
06 00000060`f85ff730 00007ffd`950996d0     sechost!ScOpenServiceChannelHandle+0x4c
07 00000060`f85ff760 00007ffd`81551000     sechost!StartServiceCtrlDispatcherW+0x70
08 00000060`f85ff7a0 00007ffd`81550be0     winfsp_a64!FspServiceLoop+0xf0 [C:\Users\billziss\Projects\winfsp\src\dll\service.c @ 241] 
09 00000060`f85ff800 00007ffd`81528b54     winfsp_a64!FspServiceRunEx+0xa0 [C:\Users\billziss\Projects\winfsp\src\dll\service.c @ 92] 
0a 00000060`f85ff850 00007ffd`81528dbc     winfsp_a64!FspServiceRun+0x3c [C:\Users\billziss\Projects\winfsp\inc\winfsp\winfsp.h @ 1952] 
0b 00000060`f85ff880 00007ffd`94e91fa0     winfsp_a64!fsp_fuse_svcmain+0x34 [C:\Users\billziss\Projects\winfsp\src\dll\fuse\fuse_loop.c @ 42] 
0c 00000060`f85ff8a0 00007ffd`95a22bdc     KERNEL32!BaseThreadInitThunk+0x30
0d 00000060`f85ff8e0 00000000`00000000     ntdll!RtlUserThreadStart+0x3c

What is the ExceptionCode passed to RaiseException (first argument in register x0)?

0:009> r x0
x0=0000000000000005

The value 5 is familiar and is indeed the error code for ERROR_ACCESS_DENIED. So it looks that StartServiceCtrlDispatcherW is unable to convert the process into a service, because we are not running in the Windows service context; this is an expected and benign error. It reports this error as an exception, which then the Golang runtime converts into a badsignal2, which crashes in WriteFile.

Sure enough if I use the debugger to arrive at RtlDispatchException (which is the actual function that dispatches exceptions to exception handlers) and then arrange things in the debugger so that the Golang vectored exception handler is never called, StartServiceCtrlDispatcherW returns and the file system starts and runs just fine.

The fix for initExceptionHandler is to remove the line that calls AddVectoredExceptionHandler.

@hellvy-github
Copy link

Wow, nice investigation @billziss-gh :)
I haven't read it through because it might take some time for me. Just come to say thank you first.

@ncw
Copy link
Member

ncw commented Oct 7, 2022

@billziss-gh superb sleuthing and a great read - thank you for writing it up :-)

I will report these problems to Golang and possibly also provide patches for them (if my CLA with Google is still valid).

Great idea. The individual CLA is very easy to sign - all online. I made several contributions like that when I found bugs and made a CL to fix them!

If your debug was a crime movie, this would be the bit when the detective goes, "Ahhhh" even if the audience haven't figured it out quite yet :-)

And just what does register x1 which contains the lpBuffer contain?

0:008> d x1
00007ff7`5d3759c0  72 75 6e 74 69 6d 65 3a-20 73 69 67 6e 61 6c 20  runtime: signal 
00007ff7`5d3759d0  72 65 63 65 69 76 65 64-20 6f 6e 20 74 68 72 65  received on thre
00007ff7`5d3759e0  61 64 20 6e 6f 74 20 63-72 65 61 74 65 64 20 62  ad not created b
00007ff7`5d3759f0  79 20 47 6f 2e 0a 00 00-00 00 00 00 00 00 00 00  y Go............

@billziss-gh
Copy link
Contributor

If your debug was a crime movie, this would be the bit when the detective goes, "Ahhhh" even if the audience haven't figured it out quite yet :-)

Indeed that was the moment that I realized that I was going to be able to figure this out :-)

@hellvy-github
Copy link

Hello, we're waiting Go project to check this issue right ? What issue number I should follow ?

@hellvy-github
Copy link

Hi, just come to check it out :)

@darthShadow
Copy link
Member

golang/go#56082 is the currently open issue.

netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this issue Oct 30, 2023
## v1.64.2 - 2023-10-19


* Bug Fixes
    * selfupdate: Fix "invalid hashsum signature" error (Nick Craig-Wood)
    * build: Fix docker build running out of space (Nick Craig-Wood)

## v1.64.1 - 2023-10-17


* Bug Fixes
    * cmd: Make `--progress` output logs in the same format as without (Nick Craig-Wood)
    * docs fixes (Dimitri Papadopoulos Orfanos, Herby Gillot, Manoj Ghosh, Nick Craig-Wood)
    * lsjson: Make sure we set the global metadata flag too (Nick Craig-Wood)
    * operations
        * Ensure concurrency is no greater than the number of chunks (Pat Patterson)
        * Fix OpenOptions ignored in copy if operation was a multiThreadCopy (Vitor Gomes)
        * Fix error message on delete to have file name (Nick Craig-Wood)
    * serve sftp: Return not supported error for not supported commands (Nick Craig-Wood)
    * build: Upgrade golang.org/x/net to v0.17.0 to fix HTTP/2 rapid reset (Nick Craig-Wood)
    * pacer: Fix b2 deadlock by defaulting max connections to unlimited (Nick Craig-Wood)
* Mount
    * Fix automount not detecting drive is ready (Nick Craig-Wood)
* VFS
    * Fix update dir modification time (Saleh Dindar)
* Azure Blob
    * Fix "fatal error: concurrent map writes" (Nick Craig-Wood)
* B2
    * Fix multipart upload: corrupted on transfer: sizes differ XXX vs 0 (Nick Craig-Wood)
    * Fix locking window when getting mutipart upload URL (Nick Craig-Wood)
    * Fix server side copies greater than 4GB (Nick Craig-Wood)
    * Fix chunked streaming uploads (Nick Craig-Wood)
    * Reduce default `--b2-upload-concurrency` to 4 to reduce memory usage (Nick Craig-Wood)
* Onedrive
    * Fix the configurator to allow `/teams/ID` in the config (Nick Craig-Wood)
* Oracleobjectstorage
    * Fix OpenOptions being ignored in uploadMultipart with chunkWriter (Nick Craig-Wood)
* S3
    * Fix slice bounds out of range error when listing (Nick Craig-Wood)
    * Fix OpenOptions being ignored in uploadMultipart with chunkWriter (Vitor Gomes)
* Storj
    * Update storj.io/uplink to v1.12.0 (Kaloyan Raev)

## v1.64.0 - 2023-09-11


* New backends
    * [Proton Drive](/protondrive/) (Chun-Hung Tseng)
    * [Quatrix](/quatrix/) (Oksana, Volodymyr Kit)
    * New S3 providers
        * [Synology C2](/s3/#synology-c2) (BakaWang)
        * [Leviia](/s3/#leviia) (Benjamin)
    * New Jottacloud providers
        * [Onlime](/jottacloud/) (Fjodor42)
        * [Telia Sky](/jottacloud/) (NoLooseEnds)
* Major changes
    * Multi-thread transfers (Vitor Gomes, Nick Craig-Wood, Manoj Ghosh, Edwin Mackenzie-Owen)
        * Multi-thread transfers are now available when transferring to:
            * `local`, `s3`, `azureblob`, `b2`, `oracleobjectstorage` and `smb`
        * This greatly improves transfer speed between two network sources.
        * In memory buffering has been unified between all backends and should share memory better.
        * See [--multi-thread docs](/docs/#multi-thread-cutoff) for more info
* New commands
    * `rclone config redacted` support mechanism for showing redacted config (Nick Craig-Wood)
* New Features
    * accounting
        * Show server side stats in own lines and not as bytes transferred (Nick Craig-Wood)
    * bisync
        * Add new `--ignore-listing-checksum` flag to distinguish from `--ignore-checksum` (nielash)
        * Add experimental `--resilient` mode to allow recovery from self-correctable errors (nielash)
        * Add support for `--create-empty-src-dirs` (nielash)
        * Dry runs no longer commit filter changes (nielash)
        * Enforce `--check-access` during `--resync` (nielash)
        * Apply filters correctly during deletes (nielash)
        * Equality check before renaming (leave identical files alone) (nielash)
        * Fix `dryRun` rc parameter being ignored (nielash)
    * build
        * Update to `go1.21` and make `go1.19` the minimum required version (Anagh Kumar Baranwal, Nick Craig-Wood)
        * Update dependencies (Nick Craig-Wood)
        * Add snap installation (hideo aoyama)
        * Change Winget Releaser job to `ubuntu-latest` (sitiom)
    * cmd: Refactor and use sysdnotify in more commands (eNV25)
    * config: Add `--multi-thread-chunk-size` flag (Vitor Gomes)
    * doc updates (antoinetran, Benjamin, Bjørn Smith, Dean Attali, gabriel-suela, James Braza, Justin Hellings, kapitainsky, Mahad, Masamune3210, Nick Craig-Wood, Nihaal Sangha, Niklas Hambüchen, Raymond Berger, r-ricci, Sawada Tsunayoshi, Tiago Boeing, Vladislav Vorobev)
    * fs
        * Use atomic types everywhere (Roberto Ricci)
        * When `--max-transfer` limit is reached exit with code (10) (kapitainsky)
        * Add rclone completion powershell - basic implementation only (Nick Craig-Wood)
    * http servers: Allow CORS to be set with `--allow-origin` flag (yuudi)
    * lib/rest: Remove unnecessary `nil` check (Eng Zer Jun)
    * ncdu: Add keybinding to rescan filesystem (eNV25)
    * rc
        * Add `executeId` to job listings (yuudi)
        * Add `core/du` to measure local disk usage (Nick Craig-Wood)
        * Add `operations/settier` to API (Drew Stinnett)
    * rclone test info: Add `--check-base32768` flag to check can store all base32768 characters (Nick Craig-Wood)
    * rmdirs: Remove directories concurrently controlled by `--checkers` (Nick Craig-Wood)
* Bug Fixes
    * accounting: Don't stop calculating average transfer speed until the operation is complete (Jacob Hands)
    * fs: Fix `transferTime` not being set in JSON logs (Jacob Hands)
    * fshttp: Fix `--bind 0.0.0.0` allowing IPv6 and `--bind ::0` allowing IPv4 (Nick Craig-Wood)
    * operations: Fix overlapping check on case insensitive file systems (Nick Craig-Wood)
    * serve dlna: Fix MIME type if backend can't identify it (Nick Craig-Wood)
    * serve ftp: Fix race condition when using the auth proxy (Nick Craig-Wood)
    * serve sftp: Fix hash calculations with `--vfs-cache-mode full` (Nick Craig-Wood)
    * serve webdav: Fix error: Expecting fs.Object or fs.Directory, got `nil` (Nick Craig-Wood)
    * sync: Fix lockup with `--cutoff-mode=soft` and `--max-duration` (Nick Craig-Wood)
* Mount
    * fix: Mount parsing for linux (Anagh Kumar Baranwal)
* VFS
    * Add `--vfs-cache-min-free-space` to control minimum free space on the disk containing the cache (Nick Craig-Wood)
    * Added cache cleaner for directories to reduce memory usage (Anagh Kumar Baranwal)
    * Update parent directory modtimes on vfs actions (David Pedersen)
    * Keep virtual directory status accurate and reduce deadlock potential (Anagh Kumar Baranwal)
    * Make sure struct field is aligned for atomic access (Roberto Ricci)
* Local
    * Rmdir return an error if the path is not a dir (zjx20)
* Azure Blob
    * Implement `OpenChunkWriter` and multi-thread uploads (Nick Craig-Wood)
    * Fix creation of directory markers (Nick Craig-Wood)
    * Fix purging with directory markers (Nick Craig-Wood)
* B2
    * Implement `OpenChunkWriter` and multi-thread uploads (Nick Craig-Wood)
    * Fix rclone link when object path contains special characters (Alishan Ladhani)
* Box
    * Add polling support (David Sze)
    * Add `--box-impersonate` to impersonate a user ID (Nick Craig-Wood)
    * Fix unhelpful decoding of error messages into decimal numbers (Nick Craig-Wood)
* Chunker
    * Update documentation to mention issue with small files (Ricardo D'O. Albanus)
* Compress
    * Fix ChangeNotify (Nick Craig-Wood)
* Drive
    * Add `--drive-fast-list-bug-fix` to control ListR bug workaround (Nick Craig-Wood)
* Fichier
    * Implement `DirMove` (Nick Craig-Wood)
    * Fix error code parsing (alexia)
* FTP
    * Add socks_proxy support for SOCKS5 proxies (Zach)
    * Fix 425 "TLS session of data connection not resumed" errors (Nick Craig-Wood)
* Hdfs
    * Retry "replication in progress" errors when uploading (Nick Craig-Wood)
    * Fix uploading to the wrong object on Update with overridden remote name (Nick Craig-Wood)
* HTTP
    * CORS should not be sent if not set (yuudi)
    * Fix webdav OPTIONS response (yuudi)
* Opendrive
    * Fix List on a just deleted and remade directory (Nick Craig-Wood)
* Oracleobjectstorage
    * Use rclone's rate limiter in multipart transfers (Manoj Ghosh)
    * Implement `OpenChunkWriter` and multi-thread uploads (Manoj Ghosh)
* S3
    * Refactor multipart upload to use `OpenChunkWriter` and `ChunkWriter` (Vitor Gomes)
    * Factor generic multipart upload into `lib/multipart` (Nick Craig-Wood)
    * Fix purging of root directory with `--s3-directory-markers` (Nick Craig-Wood)
    * Add `rclone backend set` command to update the running config (Nick Craig-Wood)
    * Add `rclone backend restore-status` command (Nick Craig-Wood)
* SFTP
    * Stop uploads re-using the same ssh connection to improve performance (Nick Craig-Wood)
    * Add `--sftp-ssh` to specify an external ssh binary to use (Nick Craig-Wood)
    * Add socks_proxy support for SOCKS5 proxies (Zach)
    * Support dynamic `--sftp-path-override` (nielash)
    * Fix spurious warning when using `--sftp-ssh` (Nick Craig-Wood)
* Smb
    * Implement multi-threaded writes for copies to smb (Edwin Mackenzie-Owen)
* Storj
    * Performance improvement for large file uploads (Kaloyan Raev)
* Swift
    * Fix HEADing 0-length objects when `--swift-no-large-objects` set (Julian Lepinski)
* Union
    * Add `:writback` to act as a simple cache (Nick Craig-Wood)
* WebDAV
    * Nextcloud: fix segment violation in low-level retry (Paul)
* Zoho
    * Remove Range requests workarounds to fix integration tests (Nick Craig-Wood)

## v1.63.1 - 2023-07-17


* Bug Fixes
    * build: Fix macos builds for versions < 12 (Anagh Kumar Baranwal)
    * dirtree: Fix performance with large directories of directories and `--fast-list` (Nick Craig-Wood)
    * operations
        * Fix deadlock when using `lsd`/`ls` with `--progress` (Nick Craig-Wood)
        * Fix `.rclonelink` files not being converted back to symlinks (Nick Craig-Wood)
    * doc fixes (Dean Attali, Mahad, Nick Craig-Wood, Sawada Tsunayoshi, Vladislav Vorobev)
* Local
    * Fix partial directory read for corrupted filesystem (Nick Craig-Wood)
* Box
    * Fix reconnect failing with HTTP 400 Bad Request (albertony)
* Smb
    * Fix "Statfs failed: bucket or container name is needed" when mounting (Nick Craig-Wood)
* WebDAV
    * Nextcloud: fix must use /dav/files/USER endpoint not /webdav error (Paul)
    * Nextcloud chunking: add more guidance for the user to check the config (darix)

## v1.63.0 - 2023-06-30


* New backends
    * [Pikpak](/pikpak/) (wiserain)
    * New S3 providers
        * [petabox.io](/s3/#petabox) (Andrei Smirnov)
        * [Google Cloud Storage](/s3/#google-cloud-storage) (Anthony Pessy)
    * New WebDAV providers
        * [Fastmail](/webdav/#fastmail-files) (Arnavion)
* Major changes
    * Files will be copied to a temporary name ending in `.partial` when copying to `local`,`ftp`,`sftp` then renamed at the end of the transfer. (Janne Hellsten, Nick Craig-Wood)
        * This helps with data integrity as we don't delete the existing file until the new one is complete.
        * It can be disabled with the [--inplace](/docs/#inplace) flag.
        * This behaviour will also happen if the backend is wrapped, for example `sftp` wrapped with `crypt`.
    * The [s3](/s3/#s3-directory-markers), [azureblob](/azureblob/#azureblob-directory-markers) and [gcs](/googlecloudstorage/#gcs-directory-markers) backends now support directory markers so empty directories are supported (Jānis Bebrītis, Nick Craig-Wood)
    * The [--default-time](/docs/#default-time-time) flag now controls the unknown modification time of files/dirs (Nick Craig-Wood)
        * If a file or directory does not have a modification time rclone can read then rclone will display this fixed time instead.
        * For the old behaviour use `--default-time 0s` which will set this time to the time rclone started up.
* New Features
    * build
        * Modernise linters in use and fixup all affected code (albertony)
        * Push docker beta to GHCR (GitHub container registry) (Richard Tweed)
    * cat: Add `--separator` option to cat command (Loren Gordon)
    * config
        * Do not remove/overwrite other files during config file save (albertony)
        * Do not overwrite config file symbolic link (albertony)
        * Stop `config create` making invalid config files (Nick Craig-Wood)
    * doc updates (Adam K, Aditya Basu, albertony, asdffdsazqqq, Damo, danielkrajnik, Dimitri Papadopoulos, dlitster, Drew Parsons, jumbi77, kapitainsky, mac-15, Mariusz Suchodolski, Nick Craig-Wood, NickIAm, Rintze Zelle, Stanislav Gromov, Tareq Sharafy, URenko, yuudi, Zach Kipp)
    * fs
        * Add `size` to JSON logs when moving or copying an object (Nick Craig-Wood)
        * Allow boolean features to be enabled with `--disable !Feature` (Nick Craig-Wood)
    * genautocomplete: Rename to `completion` with alias to the old name (Nick Craig-Wood)
    * librclone: Added example on using `librclone` with Go (alankrit)
    * lsjson: Make `--stat` more efficient (Nick Craig-Wood)
    * operations
        * Implement `--multi-thread-write-buffer-size` for speed improvements on downloads (Paulo Schreiner)
        * Reopen downloads on error when using `check --download` and `cat` (Nick Craig-Wood)
    * rc: `config/listremotes` includes remotes defined with environment variables (kapitainsky)
    * selfupdate: Obey `--no-check-certificate` flag (Nick Craig-Wood)
    * serve restic: Trigger systemd notify (Shyim)
    * serve webdav: Implement owncloud checksum and modtime extensions (WeidiDeng)
    * sync: `--suffix-keep-extension` preserve 2 part extensions like .tar.gz (Nick Craig-Wood)
* Bug Fixes
    * accounting
        * Fix Prometheus metrics to be the same as `core/stats` (Nick Craig-Wood)
        * Bwlimit signal handler should always start (Sam Lai)
    * bisync: Fix `maxDelete` parameter being ignored via the rc (Nick Craig-Wood)
    * cmd/ncdu: Fix screen corruption when logging (eNV25)
    * filter: Fix deadlock with errors on `--files-from` (douchen)
    * fs
        * Fix interaction between `--progress` and `--interactive` (Nick Craig-Wood)
        * Fix infinite recursive call in pacer ModifyCalculator (fixes issue reported by the staticcheck linter) (albertony)
    * lib/atexit: Ensure OnError only calls cancel function once (Nick Craig-Wood)
    * lib/rest: Fix problems re-using HTTP connections (Nick Craig-Wood)
    * rc
        * Fix `operations/stat` with trailing `/` (Nick Craig-Wood)
        * Fix missing `--rc` flags (Nick Craig-Wood)
        * Fix output of Time values in `options/get` (Nick Craig-Wood)
    * serve dlna: Fix potential data race (Nick Craig-Wood)
    * version: Fix reported os/kernel version for windows (albertony)
* Mount
    * Add `--mount-case-insensitive` to force the mount to be case insensitive (Nick Craig-Wood)
    * Removed unnecessary byte slice allocation for reads (Anagh Kumar Baranwal)
    * Clarify rclone mount error when installed via homebrew (Nick Craig-Wood)
    * Added _netdev to the example mount so it gets treated as a remote-fs rather than local-fs (Anagh Kumar Baranwal)
* Mount2
    * Updated go-fuse version (Anagh Kumar Baranwal)
    * Fixed statfs (Anagh Kumar Baranwal)
    * Disable xattrs (Anagh Kumar Baranwal)
* VFS
    * Add MkdirAll function to make a directory and all beneath (Nick Craig-Wood)
    * Fix reload: failed to add virtual dir entry: file does not exist (Nick Craig-Wood)
    * Fix writing to a read only directory creating spurious directory entries (WeidiDeng)
    * Fix potential data race (Nick Craig-Wood)
    * Fix backends being Shutdown too early when startup takes a long time (Nick Craig-Wood)
* Local
    * Fix filtering of symlinks with `-l`/`--links` flag (Nick Craig-Wood)
    * Fix /path/to/file.rclonelink when `-l`/`--links` is in use (Nick Craig-Wood)
    * Fix crash with `--metadata` on Android (Nick Craig-Wood)
* Cache
    * Fix backends shutting down when in use when used via the rc (Nick Craig-Wood)
* Crypt
    * Add `--crypt-suffix` option to set a custom suffix for encrypted files (jladbrook)
    * Add `--crypt-pass-bad-blocks` to allow corrupted file output (Nick Craig-Wood)
    * Fix reading 0 length files (Nick Craig-Wood)
    * Try not to return "unexpected EOF" error (Nick Craig-Wood)
    * Reduce allocations (albertony)
    * Recommend Dropbox for `base32768` encoding (Nick Craig-Wood)
* Azure Blob
    * Empty directory markers (Nick Craig-Wood)
    * Support azure workload identities (Tareq Sharafy)
    * Fix azure blob uploads with multiple bits of metadata (Nick Craig-Wood)
    * Fix azurite compatibility by sending nil tier if set to empty string (Roel Arents)
* Combine
    * Implement missing methods (Nick Craig-Wood)
    * Fix goroutine stack overflow on bad object (Nick Craig-Wood)
* Drive
    * Add `--drive-env-auth` to get IAM credentials from runtime (Peter Brunner)
    * Update drive service account guide (Juang, Yi-Lin)
    * Fix change notify picking up files outside the root (Nick Craig-Wood)
    * Fix trailing slash mis-identificaton of folder as file (Nick Craig-Wood)
    * Fix incorrect remote after Update on object (Nick Craig-Wood)
* Dropbox
    * Implement `--dropbox-pacer-min-sleep` flag (Nick Craig-Wood)
    * Fix the dropbox batcher stalling (Misty)
* Fichier
    * Add `--ficicher-cdn` option to use the CDN for download (Nick Craig-Wood)
* FTP
    * Lower log message priority when `SetModTime` is not supported to debug (Tobias Gion)
    * Fix "unsupported LIST line" errors on startup (Nick Craig-Wood)
    * Fix "501 Not a valid pathname." errors when creating directories (Nick Craig-Wood)
* Google Cloud Storage
    * Empty directory markers (Jānis Bebrītis, Nick Craig-Wood)
    * Added `--gcs-user-project` needed for requester pays (Christopher Merry)
* HTTP
    * Add client certificate user auth middleware. This can auth `serve restic` from the username in the client cert. (Peter Fern)
* Jottacloud
    * Fix vfs writeback stuck in a failed upload loop with file versioning disabled (albertony)
* Onedrive
    * Add `--onedrive-av-override` flag to download files flagged as virus (Nick Craig-Wood)
    * Fix quickxorhash on 32 bit architectures (Nick Craig-Wood)
    * Report any list errors during `rclone cleanup` (albertony)
* Putio
    * Fix uploading to the wrong object on Update with overridden remote name (Nick Craig-Wood)
    * Fix modification times not being preserved for server side copy and move (Nick Craig-Wood)
    * Fix server side copy failures (400 errors) (Nick Craig-Wood)
* S3
    * Empty directory markers (Jānis Bebrītis, Nick Craig-Wood)
    * Update Scaleway storage classes (Brian Starkey)
    * Fix `--s3-versions` on individual objects (Nick Craig-Wood)
    * Fix hang on aborting multipart upload with iDrive e2 (Nick Craig-Wood)
    * Fix missing "tier" metadata (Nick Craig-Wood)
    * Fix V3sign: add missing subresource delete (cc)
    * Fix Arvancloud Domain and region changes and alphabetise the provider (Ehsan Tadayon)
    * Fix Qiniu KODO quirks virtualHostStyle is false (zzq)
* SFTP
    * Add `--sftp-host-key-algorithms ` to allow specifying SSH host key algorithms (Joel)
    * Fix using `--sftp-key-use-agent` and `--sftp-key-file` together needing private key file (Arnav Singh)
    * Fix move to allow overwriting existing files (Nick Craig-Wood)
    * Don't stat directories before listing them (Nick Craig-Wood)
    * Don't check remote points to a file if it ends with / (Nick Craig-Wood)
* Sharefile
    * Disable streamed transfers as they no longer work (Nick Craig-Wood)
* Smb
    * Code cleanup to avoid overwriting ctx before first use (fixes issue reported by the staticcheck linter) (albertony)
* Storj
    * Fix "uplink: too many requests" errors when uploading to the same file (Nick Craig-Wood)
    * Fix uploading to the wrong object on Update with overridden remote name (Nick Craig-Wood)
* Swift
    * Ignore 404 error when deleting an object (Nick Craig-Wood)
* Union
    * Implement missing methods (Nick Craig-Wood)
    * Allow errors to be unwrapped for inspection (Nick Craig-Wood)
* Uptobox
    * Add `--uptobox-private` flag to make all uploaded files private (Nick Craig-Wood)
    * Fix improper regex (Aaron Gokaslan)
    * Fix Update returning the wrong object (Nick Craig-Wood)
    * Fix rmdir declaring that directories weren't empty (Nick Craig-Wood)
* WebDAV
    * nextcloud: Add support for chunked uploads (Paul)
    * Set modtime using propset for owncloud and nextcloud (WeidiDeng)
    * Make pacer minSleep configurable with `--webdav-pacer-min-sleep` (ed)
    * Fix server side copy/move not overwriting (WeidiDeng)
    * Fix modtime on server side copy for owncloud and nextcloud (Nick Craig-Wood)
* Yandex
    * Fix 400 Bad Request on transfer failure (Nick Craig-Wood)
* Zoho
    * Fix downloads with `Range:` header returning the wrong data (Nick Craig-Wood)

## v1.62.2 - 2023-03-16


* Bug Fixes
    * docker volume plugin: Add missing fuse3 dependency (Nick Craig-Wood)
    * docs: Fix size documentation (asdffdsazqqq)
* FTP
    * Fix 426 errors on downloads with vsftpd (Lesmiscore)

## v1.62.1 - 2023-03-15


* Bug Fixes
    * docker: Add missing fuse3 dependency (cycneuramus)
    * build: Update release docs to be more careful with the tag (Nick Craig-Wood)
    * build: Set Github release to draft while uploading binaries (Nick Craig-Wood)

## v1.62.0 - 2023-03-14


* New Features
    * accounting: Make checkers show what they are doing (Nick Craig-Wood)
    * authorize: Add support for custom templates (Hunter Wittenborn)
    * build
        * Update to go1.20 (Nick Craig-Wood, Anagh Kumar Baranwal)
        * Add winget releaser workflow (Ryan Caezar Itang)
        * Add dependabot (Ryan Caezar Itang)
    * doc updates (albertony, Bryan Kaplan, Gerard Bosch, IMTheNachoMan, Justin Winokur, Manoj Ghosh, Nick Craig-Wood, Ole Frost, Peter Brunner, piyushgarg, Ryan Caezar Itang, Simmon Li, ToBeFree)
    * filter: Emit INFO message when can't work out directory filters (Nick Craig-Wood)
    * fs
        * Added multiple ca certificate support. (alankrit)
        * Add `--max-delete-size` a delete size threshold (Leandro Sacchet)
    * fspath: Allow the symbols `@` and `+` in remote names (albertony)
    * lib/terminal: Enable windows console virtual terminal sequences processing (ANSI/VT100 colors) (albertony)
    * move: If `--check-first` and `--order-by` are set then delete with perfect ordering (Nick Craig-Wood)
    * serve http: Support `--auth-proxy` (Matthias Baur)
* Bug Fixes
    * accounting
        * Avoid negative ETA values for very slow speeds (albertony)
        * Limit length of ETA string (albertony)
        * Show human readable elapsed time when longer than a day (albertony)
    * all: Apply codeql fixes (Aaron Gokaslan)
    * build
        * Fix condition for manual workflow run (albertony)
        * Fix building for ARMv5 and ARMv6 (albertony)
            * selfupdate: Consider ARM version
            * install.sh: fix ARMv6 download
            * version: Report ARM version
    * deletefile: Return error code 4 if file does not exist (Nick Craig-Wood)
    * docker: Fix volume plugin does not remount volume on docker restart (logopk)
    * fs: Fix race conditions in `--max-delete` and `--max-delete-size` (Nick Craig-Wood)
    * lib/oauthutil: Handle fatal errors better (Alex Chen)
    * mount2: Fix `--allow-non-empty` (Nick Craig-Wood)
    * operations: Fix concurrency: use `--checkers` unless transferring files (Nick Craig-Wood)
    * serve ftp: Fix timestamps older than 1 year in listings (Nick Craig-Wood)
    * sync: Fix concurrency: use `--checkers` unless transferring files (Nick Craig-Wood)
    * tree
        * Fix nil pointer exception on stat failure (Nick Craig-Wood)
        * Fix colored output on windows (albertony)
        * Fix display of files with illegal Windows file system names (Nick Craig-Wood)
* Mount
    * Fix creating and renaming files on case insensitive backends (Nick Craig-Wood)
    * Do not treat `\\?\` prefixed paths as network share paths on windows (albertony)
    * Fix check for empty mount point on Linux (Nick Craig-Wood)
    * Fix `--allow-non-empty` (Nick Craig-Wood)
    * Avoid incorrect or premature overlap check on windows (albertony)
    * Update to fuse3 after bazil.org/fuse update (Nick Craig-Wood)
* VFS
    * Make uploaded files retain modtime with non-modtime backends (Nick Craig-Wood)
    * Fix incorrect modtime on fs which don't support setting modtime (Nick Craig-Wood)
    * Fix rename of directory containing files to be uploaded (Nick Craig-Wood)
* Local
    * Fix `%!w(<nil>)` in "failed to read directory" error (Marks Polakovs)
    * Fix exclusion of dangling symlinks with -L/--copy-links (Nick Craig-Wood)
* Crypt
    * Obey `--ignore-checksum` (Nick Craig-Wood)
    * Fix for unencrypted directory names on case insensitive remotes (Ole Frost)
* Azure Blob
    * Remove workarounds for SDK bugs after v0.6.1 update (Nick Craig-Wood)
* B2
    * Fix uploading files bigger than 1TiB (Nick Craig-Wood)
* Drive
    * Note that `--drive-acknowledge-abuse` needs SA Manager permission (Nick Craig-Wood)
    * Make `--drive-stop-on-upload-limit` to respond to storageQuotaExceeded (Ninh Pham)
* FTP
    * Retry 426 errors (Nick Craig-Wood)
    * Retry errors when initiating downloads (Nick Craig-Wood)
    * Revert to upstream `github.com/jlaffaye/ftp` now fix is merged (Nick Craig-Wood)
* Google Cloud Storage
    * Add `--gcs-env-auth` to pick up IAM credentials from env/instance (Peter Brunner)
* Mega
    * Add `--mega-use-https` flag (NodudeWasTaken)
* Onedrive
    * Default onedrive personal to QuickXorHash as Microsoft is removing SHA1 (Nick Craig-Wood)
    * Add `--onedrive-hash-type` to change the hash in use (Nick Craig-Wood)
    * Improve speed of QuickXorHash (LXY)
* Oracle Object Storage
    * Speed up operations by using S3 pacer and setting minsleep to 10ms (Manoj Ghosh)
    * Expose the `storage_tier` option in config (Manoj Ghosh)
    * Bring your own encryption keys (Manoj Ghosh)
* S3
    * Check multipart upload ETag when `--s3-no-head` is in use (Nick Craig-Wood)
    * Add `--s3-sts-endpoint` to specify STS endpoint (Nick Craig-Wood)
    * Fix incorrect tier support for StorJ and IDrive when pointing at a file (Ole Frost)
    * Fix AWS STS failing if `--s3-endpoint` is set (Nick Craig-Wood)
    * Make purge remove directory markers too (Nick Craig-Wood)
* Seafile
    * Renew library password (Fred)
* SFTP
    * Fix uploads being 65% slower than they should be with crypt (Nick Craig-Wood)
* Smb
    * Allow SPN (service principal name) to be configured (Nick Craig-Wood)
    * Check smb connection is closed (happyxhw)
* Storj
    * Implement `rclone link` (Kaloyan Raev)
    * Implement `rclone purge` (Kaloyan Raev)
    * Update satellite urls and labels (Kaloyan Raev)
* WebDAV
    * Fix interop with davrods server (Nick Craig-Wood)

## v1.61.1 - 2022-12-23


* Bug Fixes
    * docs:
        * Show only significant parts of version number in version introduced label (albertony)
        * Fix unescaped HTML (Nick Craig-Wood)
    * lib/http: Shutdown all servers on exit to remove unix socket (Nick Craig-Wood)
    * rc: Fix `--rc-addr` flag (which is an alternate for `--url`) (Anagh Kumar Baranwal)
    * serve restic
        * Don't serve via http if serving via `--stdio` (Nick Craig-Wood)
        * Fix immediate exit when not using stdio (Nick Craig-Wood)
    * serve webdav
        * Fix `--baseurl` handling after `lib/http` refactor (Nick Craig-Wood)
        * Fix running duplicate Serve call (Nick Craig-Wood)
* Azure Blob
    * Fix "409 Public access is not permitted on this storage account" (Nick Craig-Wood)
* S3
    * storj: Update endpoints (Kaloyan Raev)

## v1.61.0 - 2022-12-20


* New backends
    * New S3 providers
        * [Liara LOS](/s3/#liara-cloud) (MohammadReza)
* New Features
    * build: Add vulnerability testing using govulncheck (albertony)
    * cmd: Enable `SIGINFO` (Ctrl-T) handler on FreeBSD, NetBSD, OpenBSD and Dragonfly BSD (x3-apptech)
    * config: Add [config/setpath](/rc/#config-setpath) for setting config path via rc/librclone (Nick Craig-Wood)
    * dedupe
        * Count Checks in the stats while scanning for duplicates (Nick Craig-Wood)
        * Make dedupe obey the filters (Nick Craig-Wood)
    * dlna: Properly attribute code used from https://github.com/anacrolix/dms (Nick Craig-Wood)
    * docs
        * Add minimum versions and status badges to backend and command docs (Nick Craig-Wood, albertony)
        * Remote names may not start or end with space (albertony)
    * filter: Add metadata filters [--metadata-include/exclude/filter](/filtering/#metadata) and friends (Nick Craig-Wood)
    * fs
        * Make all duration flags take `y`, `M`, `w`, `d` etc suffixes (Nick Craig-Wood)
        * Add global flag `--color` to control terminal colors (Kevin Verstaen)
    * fspath: Allow unicode numbers and letters in remote names (albertony)
    * lib/file: Improve error message for creating dir on non-existent network host on windows (albertony)
    * lib/http: Finish port of rclone servers to `lib/http` (Tom Mombourquette, Nick Craig-Wood)
    * lib/oauthutil: Improved usability of config flows needing web browser (Ole Frost)
    * ncdu
        * Add support for modification time (albertony)
        * Fallback to sort by name also for sort by average size (albertony)
        * Rework to use tcell directly instead of the termbox wrapper (eNV25)
    * rc: Add commands to set [GC Percent](/rc/#debug-set-gc-percent) & [Memory Limit](/rc/#debug-set-soft-memory-limit) (go 1.19+) (Anagh Kumar Baranwal)
    * rcat: Preserve metadata when Copy falls back to Rcat (Nick Craig-Wood)
    * rcd: Refactor rclone rc server to use `lib/http` (Nick Craig-Wood)
    * rcserver: Avoid generating default credentials with htpasswd (Kamui)
    * restic: Refactor to use `lib/http` (Nolan Woods)
    * serve http: Support unix sockets and multiple listeners (Tom Mombourquette)
    * serve webdav: Refactor to use `lib/http` (Nick Craig-Wood)
    * test: Replace defer cleanup with `t.Cleanup` (Eng Zer Jun)
    * test memory: Read metadata if `-M` flag is specified (Nick Craig-Wood)
    * wasm: Comply with `wasm_exec.js` licence terms (Matthew Vernon)
* Bug Fixes
    * build: Update `golang.org/x/net/http2` to fix GO-2022-1144 (Nick Craig-Wood)
    * restic: Fix typo in docs 'remove' should be 'remote' (asdffdsazqqq)
    * serve dlna: Fix panic: Logger uninitialized. (Nick Craig-Wood)
* Mount
    * Update cgofuse for FUSE-T support for mounting volumes on Mac (Nick Craig-Wood)
* VFS
    * Windows: fix slow opening of exe files by not truncating files when not necessary (Nick Craig-Wood)
    * Fix IO Error opening a file with `O_CREATE|O_RDONLY` in `--vfs-cache-mode` not full (Nick Craig-Wood)
* Crypt
    * Fix compress wrapping crypt giving upload errors (Nick Craig-Wood)
* Azure Blob
    * Port to new SDK (Nick Craig-Wood)
        * Revamp authentication to include all methods and docs (Nick Craig-Wood)
        * Port old authentication methods to new SDK (Nick Craig-Wood, Brad Ackerman)
        * Thanks to [Stonebranch](https://www.stonebranch.com/) for sponsoring this work.
    * Add `--azureblob-no-check-container` to assume container exists (Nick Craig-Wood)
    * Add `--use-server-modtime` support (Abdullah Saglam)
    * Add support for custom upload headers (rkettelerij)
    * Allow emulator account/key override (Roel Arents)
    * Support simple "environment credentials" (Nathaniel Wesley Filardo)
    * Ignore `AuthorizationFailure` when trying to create a create a container (Nick Craig-Wood)
* Box
    * Added note on Box API rate limits (Ole Frost)
* Drive
    * Handle shared drives with leading/trailing space in name (related to) (albertony)
* FTP
    * Update help text of implicit/explicit TLS options to refer to FTPS instead of FTP (ycdtosa)
    * Improve performance to speed up `--files-from` and `NewObject` (Anthony Pessy)
* HTTP
    * Parse GET responses when `no_head` is set (Arnie97)
    * Do not update object size based on `Range` requests (Arnie97)
    * Support `Content-Range` response header (Arnie97)
* Onedrive
    * Document workaround for shared with me files (vanplus)
* S3
    * Add Liara LOS to provider list (MohammadReza)
    * Add DigitalOcean Spaces regions `sfo3`, `fra1`, `syd1` (Jack)
    * Avoid privileged `GetBucketLocation` to resolve s3 region (Anthony Pessy)
    * Stop setting object and bucket ACL to `private` if it is an empty string (Philip Harvey)
    * If bucket or object ACL is empty string then don't add `X-Amz-Acl:` header (Nick Craig-Wood)
    * Reduce memory consumption for s3 objects (Erik Agterdenbos)
    * Fix listing loop when using v2 listing on v1 server (Nick Craig-Wood)
    * Fix nil pointer exception when using Versions (Nick Craig-Wood)
    * Fix excess memory usage when using versions (Nick Craig-Wood)
    * Ignore versionIDs from uploads unless using `--s3-versions` or `--s3-versions-at` (Nick Craig-Wood)
* SFTP
    * Add configuration options to set ssh Ciphers / MACs / KeyExchange (dgouju)
    * Auto-detect shell type for fish (albertony)
    * Fix NewObject with leading / (Nick Craig-Wood)
* Smb
    * Fix issue where spurious dot directory is created (albertony)
* Storj
    * Implement server side Copy (Kaloyan Raev)

## v1.60.1 - 2022-11-17


* Bug Fixes
    * lib/cache: Fix alias backend shutting down too soon (Nick Craig-Wood)
    * wasm: Fix walltime link error by adding up-to-date wasm_exec.js (João Henrique Franco)
    * docs
        * Update faq.md with bisync (Samuel Johnson)
        * Corrected download links in windows install docs (coultonluke)
        * Add direct download link for windows arm64 (albertony)
        * Remove link to rclone slack as it is no longer supported (Nick Craig-Wood)
        * Faq: how to use a proxy server that requires a username and password (asdffdsazqqq)
        * Oracle-object-storage: doc fix (Manoj Ghosh)
        * Fix typo `remove` in rclone_serve_restic command (Joda Stößer)
        * Fix character that was incorrectly interpreted as markdown (Clément Notin)
* VFS
    * Fix deadlock caused by cache cleaner and upload finishing (Nick Craig-Wood)
* Local
    * Clean absolute paths (albertony)
    * Fix -L/--copy-links with filters missing directories (Nick Craig-Wood)
* Mailru
    * Note that an app password is now needed (Nick Craig-Wood)
    * Allow timestamps to be before the epoch 1970-01-01 (Nick Craig-Wood)
* S3
    * Add provider quirk `--s3-might-gzip` to fix corrupted on transfer: sizes differ (Nick Craig-Wood)
    * Allow Storj to server side copy since it seems to work now (Nick Craig-Wood)
    * Fix for unchecked err value in s3 listv2 (Aaron Gokaslan)
    * Add additional Wasabi locations (techknowlogick)
* Smb
    * Fix `Failed to sync: context canceled` at the end of syncs (Nick Craig-Wood)
* WebDAV
    * Fix Move/Copy/DirMove when using -server-side-across-configs (Nick Craig-Wood)

## v1.60.0 - 2022-10-21


* New backends
    * [Oracle object storage](/oracleobjectstorage/) (Manoj Ghosh)
    * [SMB](/smb/) / CIFS (Windows file sharing) (Lesmiscore)
    * New S3 providers
        * [IONOS Cloud Storage](/s3/#ionos) (Dmitry Deniskin)
        * [Qiniu KODO](/s3/#qiniu) (Bachue Zhou)
* New Features
    * build
        * Update to go1.19 and make go1.17 the minimum required version (Nick Craig-Wood)
        * Install.sh: fix arm-v7 download (Ole Frost)
    * fs: Warn the user when using an existing remote name without a colon (Nick Craig-Wood)
    * httplib: Add `--xxx-min-tls-version` option to select minimum TLS version for HTTP servers (Robert Newson)
    * librclone: Add PHP bindings and test program (Jordi Gonzalez Muñoz)
    * operations
        * Add `--server-side-across-configs` global flag for any backend (Nick Craig-Wood)
        * Optimise `--copy-dest` and `--compare-dest` (Nick Craig-Wood)
    * rc: add `job/stopgroup` to stop group (Evan Spensley)
    * serve dlna
        * Add `--announce-interval` to control SSDP Announce Interval (YanceyChiew)
        * Add `--interface` to Specify SSDP interface names line (Simon Bos)
        * Add support for more external subtitles (YanceyChiew)
        * Add verification of addresses (YanceyChiew)
    * sync: Optimise `--copy-dest` and `--compare-dest` (Nick Craig-Wood)
    * doc updates (albertony, Alexander Knorr, anonion, João Henrique Franco, Josh Soref, Lorenzo Milesi, Marco Molteni, Mark Trolley, Ole Frost, partev, Ryan Morey, Tom Mombourquette, YFdyh000)
* Bug Fixes
    * filter
        * Fix incorrect filtering with `UseFilter` context flag and wrapping backends (Nick Craig-Wood)
        * Make sure we check `--files-from` when looking for a single file (Nick Craig-Wood)
    * rc
        * Fix `mount/listmounts` not returning the full Fs entered in `mount/mount` (Tom Mombourquette)
        * Handle external unmount when mounting (Isaac Aymerich)
        * Validate Daemon option is not set when mounting a volume via RC (Isaac Aymerich)
    * sync: Update docs and error messages to reflect fixes to overlap checks (Nick Naumann)
* VFS
    * Reduce memory use by embedding `sync.Cond` (Nick Craig-Wood)
    * Reduce memory usage by re-ordering commonly used structures (Nick Craig-Wood)
    * Fix excess CPU used by VFS cache cleaner looping (Nick Craig-Wood)
* Local
    * Obey file filters in listing to fix errors on excluded files (Nick Craig-Wood)
    * Fix "Failed to read metadata: function not implemented" on old Linux kernels (Nick Craig-Wood)
* Compress
    * Fix crash due to nil metadata (Nick Craig-Wood)
    * Fix error handling to not use or return nil objects (Nick Craig-Wood)
* Drive
    * Make `--drive-stop-on-upload-limit` obey quota exceeded error (Steve Kowalik)
* FTP
    * Add `--ftp-force-list-hidden` option to show hidden items (Øyvind Heddeland Instefjord)
    * Fix hang when using ExplicitTLS to certain servers. (Nick Craig-Wood)
* Google Cloud Storage
    * Add `--gcs-endpoint` flag and config parameter (Nick Craig-Wood)
* Hubic
    * Remove backend as service has now shut down (Nick Craig-Wood)
* Onedrive
    * Rename Onedrive(cn) 21Vianet to Vnet Group (Yen Hu)
    * Disable change notify in China region since it is not supported (Nick Craig-Wood)
* S3
    * Implement `--s3-versions` flag to show old versions of objects if enabled (Nick Craig-Wood)
    * Implement `--s3-version-at` flag to show versions of objects at a particular time (Nick Craig-Wood)
    * Implement `backend versioning` command to get/set bucket versioning (Nick Craig-Wood)
    * Implement `Purge` to purge versions and `backend cleanup-hidden` (Nick Craig-Wood)
    * Add `--s3-decompress` flag to decompress gzip-encoded files (Nick Craig-Wood)
    * Add `--s3-sse-customer-key-base64` to supply keys with binary data (Richard Bateman)
    * Try to keep the maximum precision in ModTime with `--user-server-modtime` (Nick Craig-Wood)
    * Drop binary metadata with an ERROR message as it can't be stored (Nick Craig-Wood)
    * Add `--s3-no-system-metadata` to suppress read and write of system metadata (Nick Craig-Wood)
* SFTP
    * Fix directory creation races (Lesmiscore)
* Swift
    * Add `--swift-no-large-objects` to reduce HEAD requests (Nick Craig-Wood)
* Union
    * Propagate SlowHash feature to fix hasher interaction (Lesmiscore)

## v1.59.2 - 2022-09-15


* Bug Fixes
    * config: Move locking to fix fatal error: concurrent map read and map write (Nick Craig-Wood)
* Local
    * Disable xattr support if the filesystems indicates it is not supported (Nick Craig-Wood)
* Azure Blob
    * Fix chunksize calculations producing too many parts (Nick Craig-Wood)
* B2
    * Fix chunksize calculations producing too many parts (Nick Craig-Wood)
* S3
    * Fix chunksize calculations producing too many parts (Nick Craig-Wood)

## v1.59.1 - 2022-08-08


* Bug Fixes
    * accounting: Fix panic in core/stats-reset with unknown group (Nick Craig-Wood)
    * build: Fix android build after GitHub actions change (Nick Craig-Wood)
    * dlna: Fix SOAP action header parsing (Joram Schrijver)
    * docs: Fix links to mount command from install docs (albertony)
    * dropbox: Fix ChangeNotify was unable to decrypt errors (Nick Craig-Wood)
    * fs: Fix parsing of times and durations of the form "YYYY-MM-DD HH:MM:SS" (Nick Craig-Wood)
    * serve sftp: Fix checksum detection (Nick Craig-Wood)
    * sync: Add accidentally missed filter-sensitivity to --backup-dir option (Nick Naumann)
* Combine
    * Fix docs showing `remote=` instead of `upstreams=` (Nick Craig-Wood)
    * Throw error if duplicate directory name is specified (Nick Craig-Wood)
    * Fix errors with backends shutting down while in use (Nick Craig-Wood)
* Dropbox
    * Fix hang on quit with --dropbox-batch-mode off (Nick Craig-Wood)
    * Fix infinite loop on uploading a corrupted file (Nick Craig-Wood)
* Internetarchive
    * Ignore checksums for files using the different method (Lesmiscore)
    * Handle hash symbol in the middle of filename (Lesmiscore)
* Jottacloud
    * Fix working with whitelabel Elgiganten Cloud
    * Do not store username in config when using standard auth (albertony)
* Mega
    * Fix nil pointer exception when bad node received (Nick Craig-Wood)
* S3
    * Fix --s3-no-head panic: reflect: Elem of invalid type s3.PutObjectInput (Nick Craig-Wood)
* SFTP
    * Fix issue with WS_FTP by working around failing RealPath (albertony)
* Union
    * Fix duplicated files when using directories with leading / (Nick Craig-Wood)
    * Fix multiple files being uploaded when roots don't exist (Nick Craig-Wood)
    * Fix panic due to misalignment of struct field in 32 bit architectures (r-ricci)

## v1.59.0 - 2022-07-09


* New backends
    * [Combine](/combine) multiple remotes in one directory tree (Nick Craig-Wood)
    * [Hidrive](/hidrive/) (Ovidiu Victor Tatar)
    * [Internet Archive](/internetarchive/) (Lesmiscore (Naoya Ozaki))
    * New S3 providers
        * [ArvanCloud AOS](/s3/#arvan-cloud) (ehsantdy)
        * [Cloudflare R2](/s3/#cloudflare-r2) (Nick Craig-Wood)
        * [Huawei OBS](/s3/#huawei-obs) (m00594701)
        * [IDrive e2](/s3/#idrive-e2) (vyloy)
* New commands
    * [test makefile](/commands/rclone_test_makefile/): Create a single file for testing (Nick Craig-Wood)
* New Features
    * [Metadata framework](/docs/#metadata) to read and write system and user metadata on backends (Nick Craig-Wood)
        * Implemented initially for `local`, `s3` and `internetarchive` backends
        * `--metadata`/`-M` flag to control whether metadata is copied
        * `--metadata-set` flag to specify metadata for uploads
        * Thanks to [Manz Solutions](https://manz-solutions.at/) for sponsoring this work.
    * build
        * Update to go1.18 and make go1.16 the minimum required version (Nick Craig-Wood)
        * Update android go build to 1.18.x and NDK to 23.1.7779620 (Nick Craig-Wood)
        * All windows binaries now no longer CGO (Nick Craig-Wood)
        * Add `linux/arm/v6` to docker images (Nick Craig-Wood)
        * A huge number of fixes found with [staticcheck](https://staticcheck.io/) (albertony)
        * Configurable version suffix independent of version number (albertony)
    * check: Implement `--no-traverse` and `--no-unicode-normalization` (Nick Craig-Wood)
    * config: Readability improvements (albertony)
    * copyurl: Add `--header-filename` to honor the HTTP header filename directive (J-P Treen)
    * filter: Allow multiple `--exclude-if-present` flags (albertony)
    * fshttp: Add `--disable-http-keep-alives` to disable HTTP Keep Alives (Nick Craig-Wood)
    * install.sh
        * Set the modes on the files and/or directories on macOS (Michael C Tiernan - MIT-Research Computing Project)
        * Pre verify sudo authorization `-v` before calling curl. (Michael C Tiernan - MIT-Research Computing Project)
    * lib/encoder: Add Semicolon encoding (Nick Craig-Wood)
    * lsf: Add metadata support with `M` flag (Nick Craig-Wood)
    * lsjson: Add `--metadata`/`-M` flag (Nick Craig-Wood)
    * ncdu
        * Implement multi selection (CrossR)
        * Replace termbox with tcell's termbox wrapper (eNV25)
        * Display correct path in delete confirmation dialog (Roberto Ricci)
    * operations
        * Speed up hash checking by aborting the other hash if first returns nothing (Nick Craig-Wood)
        * Use correct src/dst in some log messages (zzr93)
    * rcat: Check checksums by default like copy does (Nick Craig-Wood)
    * selfupdate: Replace deprecated `x/crypto/openpgp` package with `ProtonMail/go-crypto` (albertony)
    * serve ftp: Check `--passive-port` arguments are correct (Nick Craig-Wood)
    * size: Warn about inaccurate results when objects with unknown size (albertony)
    * sync: Overlap check is now filter-sensitive so `--backup-dir` can be in the root provided it is filtered (Nick)
    * test info: Check file name lengths using 1,2,3,4 byte unicode characters (Nick Craig-Wood)
    * test makefile(s): `--sparse`, `--zero`, `--pattern`, `--ascii`, `--chargen` flags to control file contents (Nick Craig-Wood)
    * Make sure we call the `Shutdown` method on backends (Martin Czygan)
* Bug Fixes
    * accounting: Fix unknown length file transfers counting 3 transfers each (buda)
    * ncdu: Fix issue where dir size is summed when file sizes are -1 (albertony)
    * sync/copy/move
        * Fix `--fast-list` `--create-empty-src-dirs` and `--exclude` (Nick Craig-Wood)
        * Fix `--max-duration` and `--cutoff-mode soft` (Nick Craig-Wood)
    * Fix fs cache unpin (Martin Czygan)
    * Set proper exit code for errors that are not low-level retried (e.g. size/timestamp changing) (albertony)
* Mount
    * Support `windows/arm64` (may still be problems - see [#5828](rclone/rclone#5828)) (Nick Craig-Wood)
    * Log IO errors at ERROR level (Nick Craig-Wood)
    * Ignore `_netdev` mount argument (Hugal31)
* VFS
    * Add `--vfs-fast-fingerprint` for less accurate but faster fingerprints (Nick Craig-Wood)
    * Add `--vfs-disk-space-total-size` option to manually set the total disk space (Claudio Maradonna)
    * vfscache: Fix fatal error: sync: unlock of unlocked mutex error (Nick Craig-Wood)
* Local
    * Fix parsing of `--local-nounc` flag (Nick Craig-Wood)
    * Add Metadata support (Nick Craig-Wood)
* Crypt
    * Support metadata (Nick Craig-Wood)
* Azure Blob
    * Calculate Chunksize/blocksize to stay below maxUploadParts (Leroy van Logchem)
    * Use chunksize lib to determine chunksize dynamically (Derek Battams)
    * Case insensitive access tier (Rob Pickerill)
    * Allow remote emulator (azurite) (Lorenzo Maiorfi)
* B2
    * Add `--b2-version-at` flag to show file versions at time specified (SwazRGB)
    * Use chunksize lib to determine chunksize dynamically (Derek Battams)
* Chunker
    * Mark as not supporting metadata (Nick Craig-Wood)
* Compress
    * Support metadata (Nick Craig-Wood)
* Drive
    * Make `backend config -o config` add a combined `AllDrives:` remote (Nick Craig-Wood)
    * Make `--drive-shared-with-me` work with shared drives (Nick Craig-Wood)
    * Add `--drive-resource-key` for accessing link-shared files (Nick Craig-Wood)
    * Add backend commands `exportformats` and `importformats` for debugging (Nick Craig-Wood)
    * Fix 404 errors on copy/server side copy objects from public folder (Nick Craig-Wood)
    * Update Internal OAuth consent screen docs (Phil Shackleton)
    * Moved `root_folder_id` to advanced section (Abhiraj)
* Dropbox
    * Migrate from deprecated api (m8rge)
    * Add logs to show when poll interval limits are exceeded (Nick Craig-Wood)
    * Fix nil pointer exception on dropbox impersonate user not found (Nick Craig-Wood)
* Fichier
    * Parse api error codes and them accordingly (buengese)
* FTP
    * Add support for `disable_utf8` option (Jason Zheng)
    * Revert to upstream `github.com/jlaffaye/ftp` from our fork (Nick Craig-Wood)
* Google Cloud Storage
    * Add `--gcs-no-check-bucket` to minimise transactions and perms (Nick Gooding)
    * Add `--gcs-decompress` flag to decompress gzip-encoded files (Nick Craig-Wood)
        * by default these will be downloaded compressed (which previously failed)
* Hasher
    * Support metadata (Nick Craig-Wood)
* HTTP
    * Fix missing response when using custom auth handler (albertony)
* Jottacloud
    * Add support for upload to custom device and mountpoint (albertony)
    * Always store username in config and use it to avoid initial API request (albertony)
    * Fix issue with server-side copy when destination is in trash (albertony)
    * Fix listing output of remote with special characters (albertony)
* Mailru
    * Fix timeout by using int instead of time.Duration for keeping number of seconds (albertony)
* Mega
    * Document using MEGAcmd to help with login failures (Art M. Gallagher)
* Onedrive
    * Implement `--poll-interval` for onedrive (Hugo Laloge)
    * Add access scopes option (Sven Gerber)
* Opendrive
    * Resolve lag and truncate bugs (Scott Grimes)
* Pcloud
    * Fix about with no free space left (buengese)
    * Fix cleanup (buengese)
* S3
    * Use PUT Object instead of presigned URLs to upload single part objects (Nick Craig-Wood)
    * Backend restore command to skip non-GLACIER objects (Vincent Murphy)
    * Use chunksize lib to determine chunksize dynamically (Derek Battams)
    * Retry RequestTimeout errors (Nick Craig-Wood)
    * Implement reading and writing of metadata (Nick Craig-Wood)
* SFTP
    * Add support for about and hashsum on windows server (albertony)
    * Use vendor-specific VFS statistics extension for about if available (albertony)
    * Add `--sftp-chunk-size` to control packets sizes for high latency links (Nick Craig-Wood)
    * Add `--sftp-concurrency` to improve high latency transfers (Nick Craig-Wood)
    * Add `--sftp-set-env` option to set environment variables (Nick Craig-Wood)
    * Add Hetzner Storage Boxes to supported sftp backends (Anthrazz)
* Storj
    * Fix put which lead to the file being unreadable when using mount (Erik van Velzen)
* Union
    * Add `min_free_space` option for `lfs`/`eplfs` policies (Nick Craig-Wood)
    * Fix uploading files to union of all bucket based remotes (Nick Craig-Wood)
    * Fix get free space for remotes which don't support it (Nick Craig-Wood)
    * Fix `eplus` policy to select correct entry for existing files (Nick Craig-Wood)
    * Support metadata (Nick Craig-Wood)
* Uptobox
    * Fix root path handling (buengese)
* WebDAV
    * Add SharePoint in other specific regions support (Noah Hsu)
* Yandex
    * Handle api error on server-side move (albertony)
* Zoho
    * Add Japan and China regions (buengese)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants