Skip to content
New issue

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

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

Already on GitHub? # to your account

cargo build stuck on "Updating registry" in a repository with old Cargo.lock #4502

Closed
vi opened this issue Sep 17, 2017 · 6 comments
Closed

Comments

@vi
Copy link
Contributor

vi commented Sep 17, 2017

$ cargo --version
cargo 0.23.0-nightly (33250c48b 2017-09-09)
$ cargo  build -v
    Updating registry `https://github.com/rust-lang/crates.io-index`
... (100% of one CPU core)

Attached strace shows no syscalls, attached rust-gdb shows backtrace:

#0  0x000002ab785015dd in alloc::string::{{impl}}::clone () at /checkout/src/liballoc/string.rs:1593
#1  0x000002ab7816f0e9 in _$LT$cargo..core..resolver..Context$LT$$u27$a$GT$$u20$as$u20$core..clone..Clone$GT$::clone::h09745ffaaf652c98 ()
*** (above changes from probe to probe, below remains stable) ***
#2  0x000002ab78030ca3 in cargo::core::resolver::activate_deps_loop::h9f1dda4cd80803ce ()
#3  0x000002ab78029614 in cargo::core::resolver::resolve::h4ece10e42e9c7101 ()
#4  0x000002ab780f9d2b in cargo::ops::resolve::resolve_with_previous::h4d9f5c471eff2ec4 ()
#5  0x000002ab780f8535 in cargo::ops::resolve::resolve_with_registry::h0b2588ddaf4388ac ()
#6  0x000002ab780f70aa in cargo::ops::resolve::resolve_ws_precisely::h9fc15518d5f0fa93 ()
#7  0x000002ab78051cd8 in cargo::ops::cargo_compile::compile_ws::hdd45751d3d5c8452 ()
#8  0x000002ab780512f9 in cargo::ops::cargo_compile::compile_with_exec::hc774a66f413d6f89 ()
#9  0x000002ab780510ee in cargo::ops::cargo_compile::compile::h58ae5ed7f2202c7d ()
#10 0x000002ab77ec7813 in cargo::call_main_without_stdin::hca601f5f396315cf ()
#11 0x000002ab77eec26b in cargo::try_execute_builtin_command::h3de93404814cc7d0 ()
#12 0x000002ab77ee839f in cargo::execute::ha8f8904816ff574d ()
#13 0x000002ab77ebf80b in cargo::call_main_without_stdin::h971907542470770f ()
#14 0x000002ab77ee7204 in cargo::main::hcc3ce4516d41e7bf ()
#15 0x000002ab784d534d in panic_unwind::__rust_maybe_catch_panic () at /checkout/src/libpanic_unwind/lib.rs:99
#16 0x000002ab784ceaac in std::panicking::try<(),closure> () at /checkout/src/libstd/panicking.rs:459
#17 std::panic::catch_unwind<closure,()> () at /checkout/src/libstd/panic.rs:361
#18 std::rt::lang_start () at /checkout/src/libstd/rt.rs:59
#19 0x0000038e686fb2b1 in __libc_start_main (main=0x2ab77f27df0 <main>, argc=2, argv=0x3ffe38272f8, init=<optimized out>, fini=<optimized out>, 
    rtld_fini=<optimized out>, stack_end=0x3ffe38272e8) at ../csu/libc-start.c:291
#20 0x000002ab77e9dedd in _start ()

Moving away Cargo.lock does not resolve the problem. resolve the problem.

@vi
Copy link
Contributor Author

vi commented Sep 17, 2017

cargo 0.18.0 also stucks on this and there is also activate_deps_loop in the backtrace.

Other project does build well, including when dependencies change.

@vi
Copy link
Contributor Author

vi commented Sep 17, 2017

Removing the tokio-tls = { version = "0.1", optional = true } (and features) from Cargo.toml unstucks Cargo (with old Cargo.lock).

@vi
Copy link
Contributor Author

vi commented Sep 17, 2017

Cargo.lock in question.

@vi vi changed the title cargo build stuck on "Updating registry" in rust-websocket repository cargo build stuck on "Updating registry" in a repository with old Cargo.lock Sep 17, 2017
@alexcrichton
Copy link
Member

Do you have a Cargo.toml or a project to check out which reproduces this? This is probably another case of #4066

@vi
Copy link
Contributor Author

vi commented Sep 18, 2017

Cargo.toml from rust-websocket v0.20.2

The problem is reproducible with Cargo.lock above.

@alexcrichton
Copy link
Member

Yes this is #4127 and #4066 coming together to exhibit this behavior, so closing.

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

No branches or pull requests

2 participants