Error when trying to 2nd cmount with Rclone
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 59.8k
- Forks
- 5.4k
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 48
Description
This issue was opened on MacFUSE repo, and they directed me here. https://github.com/macfuse/macfuse/issues/1103
#########
Hi, I'm getting a weird error when trying to mount volumes with Rclone: it's only possible to mount one volume using rclone cmount.
The first mount works fine. But if trying to mount a second one, Rclone receives an error from macFUSE:
2025/09/09 22:50:59 DEBUG : rc: "mount/listmounts": with parameters map[]
fuse: cannot register signal source
2025/09/09 22:51:00 ERROR : webdav root '': Mount failed
2025/09/09 22:51:00 NOTICE: mount FAILED: failed to mount FUSE fs: mount stopped before calling Init: mount failed
2025/09/09 22:51:00 ERROR : rc: "mount/mount": error: failed to mount FUSE fs: mount stopped before calling Init: mount failed
After every failed try, a mount_macfuse process is started and stays running:
If these processes aren't killed, even if unmounting the successful first mount, it's not possible to do any other mount.
This issue happens since the previous version of Rclone (currently is 1.71) and there's no change in behavior if using stable version 4.10.2 or beta version 5.0.5.
So, the only way to mount 2 volumes with Rclone and macFUSE is running multiple instances of Rclone. Each one can only mount 1 volume.
That leads to a suspicion of an issue with macFUSE not being able to handle multiple mounts if coming from the same instance.
I've got the following response from MacFUSE team:
This is an issue that needs to be addressed in Rclone. Rclone is probably calling
fuse_main()more than once per process which is not supported bylibfuse, neither on Linux, nor on macOS.The macFUSE version of
libfuseis more vocal about this issue than the Linux version, though. When callingfuse_main()more than once per process the internal state oflibfusegets corrupted and will result in volumes not being unmounted cleanly.Rclone would need to ship their own main function that performs multiple mounts but only registers one set of signal handlers. That being said, I recommend running a separate process per volume. Generally speaking, this approach is more stable and in case one volume goes down, chances are good the other volumes are not affected by it.
Originally posted by @bfleischer in #1103
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing a second rclone cmount on macOS and trace the FUSE fuse_main() entry point mentioned in the report. Investigate how multiple mounts register signal handlers and clean up failed mounts. Done means multiple volumes can be mounted from one Rclone process without leaked mount_macfuse processes or subsequent mount failures.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100