Rust fails to install via rustup - the process hangs when trying to download files.
The simple fix is:
RUSTUP_USE_CURL=1 ./rustup-init
This will tell rustup-init
to use curl
instead of reqwest.
This bug can be recreated easily with the Cargo.toml
and src/main.rs
files in this gist - the program will just hang.
$ RUST_LOG=trace ./target/debug/debug-rustup
[2022-03-12T20:44:34Z TRACE reqwest::blocking::wait] (ThreadId(1)) park without timeout
[2022-03-12T20:44:34Z TRACE reqwest::blocking::client] (ThreadId(2)) start runtime::block_on
[2022-03-12T20:44:34Z TRACE reqwest::blocking::wait] wait at most 10s
[2022-03-12T20:44:34Z TRACE reqwest::blocking::wait] (ThreadId(1)) park timeout 9.999995666s
[2022-03-12T20:44:34Z DEBUG reqwest::connect] starting new connection: https://www.daveeddy.com/
[2022-03-12T20:44:44Z TRACE reqwest::blocking::wait] wait timeout exceeded
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: reqwest::Error { kind: Request, url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("www.daveeddy.com")), port: None, path: "/", query: None, fragment: None }, source: TimedOut }', src/main.rs:15:39
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
[2022-03-12T20:44:44Z TRACE reqwest::blocking::client] closing runtime thread (ThreadId(2))
[2022-03-12T20:44:44Z TRACE reqwest::blocking::client] signaled close for runtime thread (ThreadId(2))
This bug has been narrowed down
tokio
-> https://gist.github.com/bahamas10/a773315ebbbdba445a11bd62206b0480