Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'rustup update' does not terminate while checking self-updates #766

Closed
koba-e964 opened this issue Oct 21, 2016 · 6 comments
Closed

'rustup update' does not terminate while checking self-updates #766

koba-e964 opened this issue Oct 21, 2016 · 6 comments

Comments

@koba-e964
Copy link

koba-e964 commented Oct 21, 2016

It seems that rustup update gets stuck into an infinite loop while it is checking for self-updates.
Output:

$ rustup update
info: syncing channel updates for 'stable-x86_64-apple-darwin'
info: downloading component 'rustc'
 41.2 MiB /  41.2 MiB (100 %)   3.4 MiB/s ETA:   0 s                
info: downloading component 'rust-std'
 54.1 MiB /  54.1 MiB (100 %)   4.0 MiB/s ETA:   0 s                
info: downloading component 'rust-docs'
  6.7 MiB /   6.7 MiB (100 %)   3.5 MiB/s ETA:   0 s                
info: downloading component 'cargo'
info: installing component 'rustc'
info: installing component 'rust-std'
info: installing component 'rust-docs'
info: installing component 'cargo'
info: syncing channel updates for 'beta-x86_64-apple-darwin'
info: downloading component 'rustc'
 29.0 MiB /  29.0 MiB (100 %)   2.8 MiB/s ETA:   0 s                
info: downloading component 'rust-std'
 36.3 MiB /  36.3 MiB (100 %)   3.4 MiB/s ETA:   0 s                
info: downloading component 'rust-docs'
  7.5 MiB /   7.5 MiB (100 %)   1.4 MiB/s ETA:   0 s                
info: downloading component 'cargo'
  2.5 MiB /   2.5 MiB (100 %) 823.3 KiB/s ETA:   0 s                
info: installing component 'rustc'
info: installing component 'rust-std'
info: installing component 'rust-docs'
info: installing component 'cargo'
info: syncing channel updates for 'nightly-x86_64-apple-darwin'
info: downloading component 'rustc'
 31.3 MiB /  31.3 MiB (100 %)   2.7 MiB/s ETA:   0 s                
info: downloading component 'rust-std'
 38.8 MiB /  38.8 MiB (100 %)   2.5 MiB/s ETA:   0 s                
info: downloading component 'rust-docs'
  7.6 MiB /   7.6 MiB (100 %)   3.0 MiB/s ETA:   0 s                
info: downloading component 'cargo'
  2.5 MiB /   2.5 MiB (100 %)   2.2 MiB/s ETA:   0 s                
info: installing component 'rustc'
info: installing component 'rust-std'
info: installing component 'rust-docs'
info: installing component 'cargo'
info: syncing channel updates for '1.7.0-x86_64-apple-darwin'
info: downloading component 'rust'
info: checking for self-updates

^C

Version of rustup:

$ rustup --version
rustup 0.6.3 (a0e2132 2016-08-28)

This phenomenon was observed on Mac OS (Sierra).

@lifthrasiir
Copy link
Contributor

lifthrasiir commented Apr 7, 2017

It seems that the pre-built versions of rustc 1.10.0 and older have a problem in the recent Sierra, and that's blocking the final output (rustup update will print versions of all installed toolchains with .../rustc --version). Interestingly enough, 1.0.0 is not affected by this problem (but 1.4.0, 1.7.0, 1.8.0 and 1.10.0 are, when I've tested versions in my rustup installation).

The easy fix is to remove offending versions (rustup toolchain remove 1.7.0). More accurate fix is to have a reasonable timeout for rustc --version, or some other, fast and reliable way to determine the toolchain's version.

@koba-e964
Copy link
Author

Removing all versions of rustc 1.10.0 and older indeed fixed the problem. (On my machine they were 1.7.0 and 1.8.0.)
Thank you!

lifthrasiir added a commit to lifthrasiir/rustup.rs that referenced this issue Apr 16, 2017
Some rustc versions (1.3.0 through 1.10.0 if my analysis is correct)
are no longer working in recent macOS Sierra, in that they do not
produce a correct output nor do not properly terminate in a timely
manner (e.g. loops indefinitely).

Having them in the current toolchain makes `rustup update` or
(sometimes) `rustup show` unresponsive, so a timeout of one second has
been added to correctly show that they are no longer working.

Fixes rust-lang#766.
bors added a commit that referenced this issue Apr 19, 2017
Enforce timeouts for reading rustc version.

Some rustc versions (1.3.0 through 1.10.0 if my analysis is correct) are no longer working in recent macOS Sierra, in that they do not produce a correct output nor do not properly terminate in a timely
manner (e.g. loops indefinitely).

Having them in the current toolchain makes `rustup update` or (sometimes) `rustup show` unresponsive, so a timeout of one second has been added to correctly show that they are no longer working.

Fixes #766.
nodakai pushed a commit to nodakai/rustup.rs that referenced this issue Apr 23, 2017
Some rustc versions (1.3.0 through 1.10.0 if my analysis is correct)
are no longer working in recent macOS Sierra, in that they do not
produce a correct output nor do not properly terminate in a timely
manner (e.g. loops indefinitely).

Having them in the current toolchain makes `rustup update` or
(sometimes) `rustup show` unresponsive, so a timeout of one second has
been added to correctly show that they are no longer working.

Fixes rust-lang#766.
@zen0wu
Copy link

zen0wu commented Apr 27, 2017

This seems to be still happening, if 1.10.0 is installed.

OS: MacOS Sierra 10.12.3

$ rustup --version                                                                                                                                                                                                rustup 1.2.0 (70faf07 2017-04-08)

One can repro by "rustup toolchain install 1.10.0" then "rustup update"

@lifthrasiir
Copy link
Contributor

@shivawu The most recent release of rustup does not yet include this commit. You will need to wait until the next release (and also rustup self update).

@lifthrasiir
Copy link
Contributor

@shivawu Now the fix is a part of the 1.3.0 release.

@zen0wu
Copy link

zen0wu commented May 10, 2017

Thanks for getting back at me, confirmed it's fixed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants