You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Chunk part directories are unguarded across processes #1303
Residual from #1301, which fixed the in-process case.
The part directory for a chunked download is keyed only on the manifest hash (<data_dir>/downloads/<H_manifest>/). #1301 added a per-manifest-hash lock in PullCtx so two bundle pull entries naming the same manifest serialize, but that lock is process-local.
Two concurrent decdn invocations reconstructing the same manifest still share the directory:
with --no-keep-blobs, one process's cleanup deletes parts while the other is mid-concatenate (its File::open fails, or it gets a short read)
without it, both fetch and pay for every chunk twice
Options: an advisory lock file in the part dir (needs a dependency or a hand-rolled O_EXCL + staleness policy), or keying the directory per-invocation when keep_blobs is false — though that trades the race for an orphan directory whenever a --no-keep-blobs run is interrupted, since cleanup only happens on success.
Low priority: concurrent downloads of the same large file from one machine are an unusual shape, and the failure is loud rather than silent.
Automated triage note for a later run: the issue is not decision-free yet. Please choose advisory locking or per-invocation part directories. For advisory locking, pin the primitive/dependency, lock-file location, crash cleanup, and stale-lock policy; those choices determine correctness across processes.
Activity
altanoruc commentedon Jul 20, 2026
Automated triage note for a later run: the issue is not decision-free yet. Please choose advisory locking or per-invocation part directories. For advisory locking, pin the primitive/dependency, lock-file location, crash cleanup, and stale-lock policy; those choices determine correctness across processes.
fix(cli): use std cross-platform file lock, not Unix-only rustix flock