I have a project (you can find it here: https://github.com/christopherdumas/guile-rs/tree/new-bindings) that causes cargo to hang indefinitely at "updating registry" while using 99.2% of my CPU. I have tried reinstalling cargo, updating Rust, etc. Nothing seems to change this behavior.
Here are the messages it prints before hanging:
warning: file found to be present in multiple build targets: /Users/christopherdumas/guile-rs/examples/shell.rs
Updating registry `https://github.com/rust-lang/crates.io-index`
I left it running for a total of 6 hours at one point.
I'm running rustc 1.20.0-nightly (69c65d296 2017-06-28) and cargo 0.21.0-nightly (abf01e1ed 2017-06-25).
This is not a system-wide phenomena.
This is likely an instance of https://github.com/rust-lang/cargo/issues/4066 where the crate graph cannot be resolved and it's just taking cargo too long to inform the caller. I'd have to dig in though to confirm.
Is there any temporary workaround that I can use for now? It's completely stopping my progress.
Ok looks like you're hitting a combination of #4066 and https://github.com/rust-lang/cargo/issues/4127. Because of #4127 resolution fails and because of #4066 it'll take probably days to fail. What's happening here is that your lockfile indicates it wants libc 0.2.14 but you're trying to add a dependency on memchr (transitively at least) which requires libc 0.2.18.
You can fix this by running cargo update -p libc
Thank you, its working now!
For me running cargo update -p libc also hangs indefinitely. It just prints
Updating registry `https://github.com/rust-lang/crates.io-index`
and then nothing else happens. Even if I add the -v flag, that's all it says.
Nevermind, it seems that cargo update -p libc was just taking a long time. It would be nice to log _something_ to indicate that something is happening, or at least start with a message saying that it will take while.
I'm having a problem like that. When cargo updates in my computer it works fine. When cargo updates inside a Docker container, it doesn't work.
I think you might implement a visual signal of how cargo is running. Like apt, pip or nuget, the user can see what's going on.
for me when running this I get an endless stream of this
DEBUG:cargo::core::resolver: checking if parking_lot v0.6.4 is already activated
DEBUG:cargo::core::resolver: checking if memoffset v0.2.1 is already activated
DEBUG:cargo::core::resolver: checking if scopeguard v0.3.3 is already activated
DEBUG:cargo::core::resolver: checking if rand v0.5.6 is already activated
DEBUG:cargo::core::resolver: checking if lazy_static v1.2.0 is already activated
DEBUG:cargo::core::resolver: checking if smallvec v0.6.8 is already activated
DEBUG:cargo::core::resolver: checking if crossbeam-utils v0.6.5 is already activated
DEBUG:cargo::core::resolver: checking if winapi v0.3.6 is already activated
DEBUG:cargo::core::resolver: checking if cfg-if v0.1.6 is already activated
DEBUG:cargo::core::resolver: checking if winapi v0.3.6 is already activated
DEBUG:cargo::core::registry: load/precise registry https://github.com/rust-lang/crates.io-index
DEBUG:cargo::core::resolver: checking if unicode-xid v0.1.0 is already activated
DEBUG:cargo::core::registry: load/precise registry https://github.com/rust-lang/crates.io-index
DEBUG:cargo::core::resolver: checking if unicode-xid v0.1.0 is already activated
DEBUG:cargo::core::registry: load/precise registry https://github.com/rust-lang/crates.io-index
DEBUG:cargo::core::resolver: checking if unicode-xid v0.1.0 is already activated
DEBUG:cargo::core::registry: load/precise registry https://github.com/rust-lang/crates.io-index
DEBUG:cargo::core::resolver: checking if unicode-xid v0.1.0 is already activated
DEBUG:cargo::core::registry: load/precise registry https://github.com/rust-lang/crates.io-index
DEBUG:cargo::core::resolver: checking if unicode-xid v0.1.0 is already activated
DEBUG:cargo::core::registry: load/precise registry https://github.com/rust-lang/crates.io-index
DEBUG:cargo::core::resolver: checking if unicode-xid v0.1.0 is already activated
DEBUG:cargo::core::registry: load/precise registry https://github.com/rust-lang/crates.io-index
DEBUG:cargo::core::resolver: checking if unicode-xid v0.1.0 is already activated
DEBUG:cargo::core::registry: load/precise registry https://github.com/rust-lang/crates.io-index
DEBUG:cargo::core::resolver: checking if unicode-xid v0.1.0 is already activated
repeated over and over when I run cargo install --verbose
Most helpful comment
Nevermind, it seems that
cargo update -p libcwas just taking a long time. It would be nice to log _something_ to indicate that something is happening, or at least start with a message saying that it will take while.