rclone/lib
Nick Craig-Wood 5d6d79e7d4 pacer: fix deadlock with --max-connections
If the pacer was used recursively and --max-connections was in use
then it could deadlock if all the connections were in use at the time
of recursive call (likely).

This affected the azureblob backend because when it receives an
InvalidBlockOrBlob error it attempts to clear the condition before
retrying. This in turn involves recursively calling the pacer.

This fixes the problem by skipping the --max-connections check if the
pacer is called recursively.

The recursive detection is done by stack inspection which isn't ideal,
but the alternative would be to add ctx to all >1,000 pacer calls. The
benchmark reveals stack inspection takes about 55nS per stack level so
it is relatively cheap.
2025-09-22 17:39:27 +01:00
..
atexit build: remove build constraint syntax for go 1.16 and older 2024-04-18 16:53:55 +02:00
batcher build: modernize Go usage 2025-02-28 11:31:14 +00:00
bucket lib/bucket: fix tidying of // in object keys #5858 2025-01-22 11:56:05 +00:00
buildinfo build: update `github.com/shirou/gopsutil` to v4 2025-01-09 17:32:09 +00:00
cache build: modernize Go usage 2025-02-28 11:31:14 +00:00
daemonize build: fix gocritic lint issue wrapperfunc 2024-08-15 22:08:34 +01:00
debug build: update to go1.21rc3 and make go1.19 the minimum required version 2023-07-16 10:09:25 +01:00
dircache build: fix gocritic lint issue elseif 2024-08-15 22:08:34 +01:00
diskusage Add lib/diskusage to measure used/free on disks 2023-09-07 15:57:45 +01:00
encoder build: use sequence Split introduced in go1.24 2025-09-15 12:45:57 +01:00
env docs: punctuation cleanup 2021-10-20 22:56:19 +02:00
errcount errcount: factor errcount abstraction from operations 2024-02-22 11:13:54 +00:00
errors lib: fix typos found by codespell 2023-03-24 20:40:52 +00:00
exitcode cmd: change exit code from 1 to 2 for syntax and usage errors 2024-09-20 18:51:08 +02:00
file build: make go1.23 the minimum go version 2025-02-26 18:00:58 +00:00
http serve http: fix: logging url on start 2025-09-18 14:49:58 +01:00
israce build: remove build constraint syntax for go 1.16 and older 2024-04-18 16:53:55 +02:00
jwtutil build: modernize Go usage 2025-02-28 11:31:14 +00:00
kv config: make parsing of duration options consistent 2025-07-08 12:08:14 +02:00
mmap build: modernize benchmark usage 2025-09-15 12:45:57 +01:00
multipart pool: fix deadlock with --max-memory and multipart transfers 2025-08-07 12:45:44 +01:00
oauthutil oauthutil: fix nil pointer crash when started with expired token 2025-07-31 11:38:51 +01:00
pacer pacer: fix deadlock with --max-connections 2025-09-22 17:39:27 +01:00
plugin build: remove build constraint syntax for go 1.16 and older 2024-04-18 16:53:55 +02:00
pool lib/pool: fix unreliable TestPoolMaxBufferMemory test 2025-09-12 10:39:32 +01:00
proxy sftp: add --sftp-http-proxy to connect via HTTP CONNECT proxy 2025-04-29 14:16:17 +01:00
random build: modernize Go usage 2025-02-28 11:31:14 +00:00
ranges build: modernize Go usage 2025-02-28 11:31:14 +00:00
readers ftp: fix multi-thread copy 2024-01-03 12:21:08 +00:00
rest lib/rest: add URLPathEscapeAll to URL escape as many chars as possible 2025-09-04 10:37:27 +01:00
sdactivation lib/sd-activation: wrap coreos/go-systemd 2024-09-06 17:21:56 +01:00
structs build: modernize Go usage 2025-02-28 11:31:14 +00:00
systemd build: update logging statements to make json log work - fixes #6038 2024-09-06 17:04:18 +01:00
terminal Replace Windows-specific NewLazyDLL with NewLazySystemDLL 2025-01-08 17:35:00 +01:00
transform docs: fix description of regex syntax of name transform 2025-09-01 16:40:14 +01:00
version Fix lint issues reported by staticcheck 2022-06-13 21:13:50 +02:00