Repository navigation
Closed
Description
The associated forum post URL from https://forum.rclone.org
What is the problem you are having with rclone?
2025/12/30 21:50:03 NOTICE: Config file "/root/.config/rclone/rclone.conf" not found - using defaults
2025/12/30 21:51:03 INFO :
Transferred: 0 B / 0 B, -, 0 B/s, ETA -
Checks: 0 / 0, -, Listed 293705
Elapsed time: 1m0.0s
runtime: program exceeds 10000-thread limit
fatal error: thread exhaustion
What is your rclone version (output from rclone version)
rclone v1.72.1
- os/version: ubuntu 20.04 (64 bit)
- os/kernel: 5.4.0-125-generic (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.25.5
- go/linking: static
- go/tags: none
Which OS you are using and how many bits (e.g. Windows 7, 64 bit)
NAME="Ubuntu"
VERSION="20.04.5 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.5 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
Which cloud storage system are you using? (e.g. Google Drive)
The command you were trying to run (e.g. rclone copy /tmp remote:tmp)
rclone copy /mnt/csi-data-aly/shared/public/routing/sd_map_shenzhen_and_chongqing/ /mnt/yrfs/public-data/training/rasmap/routing/sd_map_shenzhen_and_chongqing/ --checkers 128 --transfers 128 --local-no-set-modtime --size-only --log-level INFO --log-file /tmp/rclone_copy_1767100667_2_worker1_sd_map_shenzhen_and_chongqing_0032.index.log --no-traverse --files-from /mnt/yrfs/public-data/user/zhengliang/1767100667/cpu02.training.cpu.sgpai-3184568/2/sd_map_shenzhen_and_chongqing_0032.index
A log from the command with the -vv flag (e.g. output from rclone -vv copy /tmp remote:tmp)
rclone_copy_1767100667_2_worker1_sd_map_shenzhen_and_chongqing_0032.ZKG0bsBz.index.log.txt
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.
Activity
[-]rclone panic with runtime: program exceeds 10000-thread limit[/-][+]rclone panic with `runtime: program exceeds 10000-thread limit`[/+]animosity022 commentedon Dec 31, 2025
I think you are cranking up the defaults a whee bit high with 128 checkers and 128 transfers so you are hitting a ulimit making it panic. Generally making it that high will make things worse too as more is not always better.
Try with defaults and adjust up.
fs/march: fix runtime: program exceeds 10000-thread limit
ncw commentedon Dec 31, 2025
Thank you for the log @microyahoo - that was very useful.
I can see in that log you do indeed have 9,990 syscalls in progress. All except for one of these is a call to
sycall.Lstat.Go has to start a real OS thread to run a syscall, so running 10,000 simultaneous Lstat calls needs 10,000 threads.
It is possible to increase that 10,000 number by calling runtime.SetMaxThreads however I'd like to investigate exactly why there are 10,000 Lstat calls happening as that doesn't seem right to me.
We don't call
Lstatin parallel in the directory listing routines so there should be at most 2 *--checkersof these so 256. Likewise when processing--files-fromwe should only be processing another 256 simultaneous Lstat calls which leaves 500 in total which is a very long way from 10,000.All the calls to
Lstatoriginate from this linerclone/fs/march/march.go
Line 464 in 28c187b
This only happens if
--no-traverseis setThe root cause is that we call
NewObjectand henceLstata total of--checkers*--checkerstimes in parallel when--files-fromand--no-traverseare in use which exceeds the 10,000 thread limit.I've attempted to fix this with a weighted semaphore which calls
NewObjecta maximum of--checkerstimes simultaneously (which is what the code intended all along).Please give this a go - thanks
v1.73.0-beta.9374.8bcb1bde1.fix-9073-march-thread-limit on branch fix-9073-march-thread-limit (uploaded in 15-30 mins)
microyahoo commentedon Jan 4, 2026
hi @ncw, thank you for quickly identifying the issue and providing the hotfix in such a short time. We're currently migrating a large amount of data to the new filesystem. However, this issue is quite difficult to reproduce as it seems to be related to both node load and the filesystem. I'll do my best to try and reproduce it later, though it may take some time. Thanks again!
ncw commentedon Jan 6, 2026
I've never seen this error from Go before so you must win some kind of prize for that :-)
I'm not 100% satisfied with the fix since it is still making
--checkers*--checkersgoroutines. This isn't a problem for the go runtime but it is untidy. However I went with the minimum fix for max chance of correctness.Let me know how it goes @microyahoo
fs/march: fix runtime: program exceeds 10000-thread limit
fs/march: fix runtime: program exceeds 10000-thread limit
fs/march: fix runtime: program exceeds 10000-thread limit