Skip to content

Resume partial download on network failure #4448

Closed

Description

@A4-Tacks

Download failures always require downloading files from scratch,
which is simply unacceptable in poor network environments

Is it possible to avoid repeatedly downloading data that has already been partially downloaded

info: syncing channel updates for 'nightly-aarch64-unknown-linux-gnu'
Total:   1.0 MiB Speed:  81.4 KiB/s Elapsed:  1m 13s
info: latest update on 2025-08-17, rust version 1.91.0-nightly (2e2642e64 2025-08-16)
info: downloading component 'cargo'
info: downloading component 'clippy'
info: downloading component 'rust-docs'
info: downloading component 'rust-std'
info: downloading component 'rustc'
230.5 KiB /  59.1 MiB (  0 %)  29.6 KiB/s in 57s ETA: 33m 57s
info: retrying download for 'https://rsproxy.cn/dist/2025-08-17/rustc-nightly-aarch64-unknown-linux-gnu.tar.xz'
  9.3 MiB /  59.1 MiB ( 16 %)  28.8 KiB/s in 12m 17s ETA: 29m 32s
info: retrying download for 'https://rsproxy.cn/dist/2025-08-17/rustc-nightly-aarch64-unknown-linux-gnu.tar.xz'
 58.4 MiB /  59.1 MiB ( 99 %)  49.6 KiB/s in 26m 53s ETA: 15s
info: retrying download for 'https://rsproxy.cn/dist/2025-08-17/rustc-nightly-aarch64-unknown-linux-gnu.tar.xz'
 58.5 MiB /  59.1 MiB ( 99 %)  81.6 KiB/s in 26m 14s ETA:  8s
info: retrying download for 'https://rsproxy.cn/dist/2025-08-17/rustc-nightly-aarch64-unknown-linux-gnu.tar.xz'
error: component download failed for rustc-aarch64-unknown-linux-gnu: could not download file from 'https://rsproxy.cn/dist/2025-08-17/rustc-nightly-aarch64-unknown-linux-gnu.tar.xz' to '/home/lrne/.rustup/downloads/3ad6539cfc893725b69f59bb2e72a4ff71c1719186b3ea48eb3c9da56c2a8405.partial': error decoding response body: request or response body error: error reading a body from connection: connection reset
info: syncing channel updates for 'nightly-aarch64-unknown-linux-gnu'
Total:   1.0 MiB Speed:  76.6 KiB/s Elapsed: 14s
info: latest update on 2025-08-17, rust version 1.91.0-nightly (2e2642e64 2025-08-16)
info: downloading component 'cargo'
info: downloading component 'clippy'
info: downloading component 'rust-docs'
info: downloading component 'rust-std'
info: downloading component 'rustc'
 10.2 MiB /  59.1 MiB ( 17 %)  75.2 KiB/s in  3m 57s ETA: 11m  6s

Activity

  1. self-assigned this
    on Aug 19, 2025
  2. fox0 commented on Dec 15, 2025

    @fox0
    $ rustup update
    info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
    1012.7 KiB / 1012.7 KiB (100 %)   8.3 KiB/s in  2m 28s            
    info: latest update on 2025-12-11, rust version 1.92.0 (ded5c06cf 2025-12-08)
    info: downloading component 'rust-src'
    info: downloading component 'cargo'
    info: downloading component 'clippy'
    info: downloading component 'rust-std'
     20.4 MiB /  28.0 MiB ( 73 %)  22.4 KiB/s in 49m 27s ETA:  5m 48s    
    info: retrying download for 'https://static.rust-lang.org/dist/2025-12-11/rust-std-1.92.0-x86_64-unknown-linux-gnu.tar.xz'
    info: retrying download for 'https://static.rust-lang.org/dist/2025-12-11/rust-std-1.92.0-x86_64-unknown-linux-gnu.tar.xz'
    info: retrying download for 'https://static.rust-lang.org/dist/2025-12-11/rust-std-1.92.0-x86_64-unknown-linux-gnu.tar.xz'
     25.8 KiB /  28.0 MiB (  0 %)   4.6 KiB/s in  1m 18s ETA:  1h 42m 40s
    …
    $ rustup --version
    rustup 1.28.2 (e4f3ad6f8 2025-04-28)
    info: This is the version for the rustup toolchain manager, not the rustc compiler.
    info: The currently active `rustc` version is `rustc 1.91.1 (ed61e7d7e 2025-11-07)`
    
  3. fox0 commented on Dec 15, 2025

    @fox0
    $ ll $RUSTUP_HOME/downloads/
    итого 21112
    -rw-rw-r-- 1 fox fox  4611352 дек 15 22:01 2c1bf6e7da8ec50feba03fe188fc9a744ba59e2c6ece7970c13e201d08defa9a
    -rw-rw-r-- 1 fox fox  3530724 дек 15 21:23 333d45eeb76f210966dc5c1440b535dea5876ed0162f9286273c85e7a1e3cb29
    -rw-rw-r-- 1 fox fox  1090321 дек 15 22:04 b53336bac3f50aaefb0f1bdc961b106447ed2c7d7848ea6e9d40ee9141e9b37c.partial
    -rw-rw-r-- 1 fox fox 10788340 дек 15 21:51 e5e12be2c7126a7036c8adf573078a28b92611f5767cc9bd0a6f7c83081df103
    -rw-rw-r-- 1 fox fox  1568844 дек 15 22:12 f98001222bf23743598382c232b08d3137035b53645a420a1425288d501808af.partial
    
  4. fox0 commented on Dec 15, 2025

    @fox0
  5. rami3l commented on Dec 15, 2025

    @rami3l
    Member

    @fox0 Thanks for adding that link. The current implementation only resumes the download when it is interrupted, not retried.

    I think it is still worth studying whether we should handle the retrying case, and under what circumstances we can trust the artifacts already being downloaded.

  6. FranciscoTGouveia commented on Jan 31, 2026

    @FranciscoTGouveia
    Contributor

    @rustbot claim

  7. changed the title [-]Add download recover support[/-] [+]Resume partial download on network failure[/+] on Feb 16, 2026
  8. added this to the 1.29.0 milestone on May 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions