-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
cargo update
hangs
#2975
Comments
Could you try re-running with |
Here is the gzipped log after running for a few minutes. (Compression ratio 98.2 -- I think we have ourselves a loop!) |
The above log was generated by the cargo distributed with beta rustc, but nightly exhibits the same behavior. |
This may just be a resurfacing of #2090, what version of Cargo were you using? |
Hm, that was closed on 3/11 but I tried with |
Nah the bugfix should be in there. The problem here is that Cargo's performing a search of the state space of the resolution graph, attempting to find a solution. It is in theory always making progress, but Cargo can get itself in to a rut where it spends a large amount of time trying to solve an unsolvable constraint. The fix to #2090 was to prioritized super constrained crates (e.g. they'll prune out tons of solutions) and there's probably some other heuristic we can apply to fix this issue as well. Will need to investigate more to figure out what's going wrong though. |
Well, this Cargo.toml has no constraints at all (it's generated by cargo-outdated which is trying to find all possible updates). So the heuristic you mentioned wouldn't help. |
Is it really making progress? The log seems like it is looping, but there's so many crates that it's hard to see if it is actually moving around in the state space. |
I get the same lockup, both when I tried to build xsv as well as ripgrep.
|
@terlar what was the |
I can no longer reproduce this, I have upgraded cargo version, rust version and the repo version since then. The |
I was able to reproduce this on FreeBSD (12.0-CURRENT, x86-64) while attempting to build alacritty. The output of |
My macosx also hang when updating registry, my env is: zhen@rust-to-c$ rustc --version --verbose |
I can reproduce this issue on macOS if I depend on either FWIW
|
Just got this error on cargo 0.18.0 too. The thing that helped was manually updating all the dependencies in |
Has this issue resurfaced? For now: killed the cargo process on my workstation to proceed rust version: cargo version: |
I'm getting the same as @chriswakare, on the same platform |
I'm closing this as a duplicate of #4066, where we're consolidating on an effort to handle cases like this in a better way. |
I'm having the same issue, with a lot of dependencies: cgmath, rand, time, regex. |
I've tried to minimize this but I haven't made any progress.
When I run
cargo update
, it seems to go forever (I let it go for 30 minutes with no output; it pegged a CPU but didn't allocate a significant amount of memory). I've tried breaking into it in a debugger and it's not always in the same place, but it's been in jemalloc orHashMap
internals. I am not low on RAM.Here's a gist of Cargo.toml and Cargo.lock. Cargo.toml looks weird because it was generated by cargo-outdated.
If I comment out the
c_vec
line in Cargo.toml, the update finishes in a couple of seconds. However, trimming down Cargo.toml and Cargo.lock to only mentionc_vec
also doesn't hang. I also tried bisecting by commenting out the first half of the dependencies list, and the second half, and neither hang. So it's some combinatorial interaction betweenc_vec
and... some other crate(s) in the list!The text was updated successfully, but these errors were encountered: