Cargo paniced on install clippy/rustfmt/rtc


#1

Hi there,

just upgraded to latest nightly and decided to rebuild some of helper tools

% rustup update
info: syncing channel updates for 'stable-x86_64-apple-darwin'
info: syncing channel updates for 'nightly-x86_64-apple-darwin'
info: checking for self-updates

stable-x86_64-apple-darwin unchanged - rustc 1.15.1 (021bd294c 2017-02-08)
nightly-x86_64-apple-darwin unchanged - rustc 1.17.0-nightly (e4eb964dd 2017-03-11)

then try to update clippy:

% RUST_BACKTRACE=full cargo +nightly install clippy
thread ‘main’ panicked at ‘called Option::unwrap() on a None value’, src/libcore/option.rs:323
stack backtrace:
0: 0x10318d293 - std::sys::imp::backtrace::tracing::imp::unwind_backtrace::h7b906ec435ded35c
1: 0x1031941b4 - std::panicking::default_hook::{{closure}}::h44d92332f38028b9
2: 0x103193dcd - std::panicking::default_hook::ha8486ead32221b33
3: 0x103196917 - std::panicking::rust_panic_with_hook::hdbc3bba6a9dc0bb9
4: 0x1031967b4 - std::panicking::begin_panic::ha249c774b9bf96e1
5: 0x103196722 - std::panicking::begin_panic_fmt::ha197daaf02a649ab
6: 0x103196687 - rust_begin_unwind
7: 0x1031be260 - core::panicking::panic_fmt::h7414cb5ce71ea361
8: 0x1031be164 - core::panicking::panic::hcbe9ad6a1a4f4afd
9: 0x102edc141 - cargo::version::h514bf8eb132b821a
10: 0x102e6df43 - cargo::ops::registry::http_handle::ha92c0787d2d2696d
11: 0x102e98699 - <cargo::sources::registry::remote::RemoteRegistry<'cfg> as cargo::sources::registry::RegistryData>::update_index::h7644a3bd96fbd546
12: 0x102e9dec7 - cargo::sources::registry::RegistrySource::do_update::hbe49ec8677ca7a66
13: 0x102e9e116 - <cargo::sources::registry::RegistrySource<'cfg> as cargo::core::source::Source>::update::h155c3dfa80eb0bd1
14: 0x102df5002 - cargo::ops::cargo_install::install::h8745e233b79231fd
15: 0x102c92a42 - cargo::try_execute_builtin_command::h6c891951512d460a
16: 0x102c7e027 - cargo::execute::h818fd451708539ad
17: 0x102c71ece - cargo::call_main_without_stdin::ha5cbac72641e15a1
18: 0x102c7cbbf - cargo::main::hd19b6454ea1b61a0
19: 0x1031965e5 - std::panicking::try::do_call::h24a2756282b9a31c
20: 0x10319788a - __rust_maybe_catch_panic
21: 0x103196d26 - std::rt::lang_start::hd19f94db0c6a490e

Is it error in cargo or something wrong with my setup?


#2

It’s a bug in the latest nightly. You’ll need to downgrade to the previous nightly and use that until the fixed nightly comes through.


#3

Thanks!


#4

the new nightly comes, but cargo segment fault occurred


#5

Could you post the output from Cargo as well as the output of cargo --version --verbose?


#6

#0 0x00007f35b9de6bc0 in ?? () from /usr/lib/x86_64-linux-gnu/libssl.so.1.1
#1 0x000055b65481b03c in SSL_CTX_new ()
#2 0x00007f35bb395957 in ossl_connect_common () from /home/pkg/lib/libcurl.so.4
#3 0x00007f35bb398ba2 in Curl_ssl_connect_nonblocking () from /home/pkg/lib/libcurl.so.4
#4 0x00007f35bb350e22 in https_connecting () from /home/pkg/lib/libcurl.so.4
#5 0x00007f35bb3636c7 in Curl_protocol_connect () from /home/pkg/lib/libcurl.so.4
#6 0x00007f35bb376976 in multi_runsingle () from /home/pkg/lib/libcurl.so.4
#7 0x00007f35bb3779c1 in curl_multi_perform () from /home/pkg/lib/libcurl.so.4
#8 0x00007f35bb36f38c in curl_easy_perform () from /home/pkg/lib/libcurl.so.4
#9 0x000055b654766f50 in curl::easy::Easy::do_perform ()
at /cargo/registry/src/github.com-1ecc6299db9ec823/curl-0.4.6/src/easy.rs:2607
#10 0x000055b654766f00 in curl::easy::Easy::perform () at /cargo/registry/src/github.com-1ecc6299db9ec823/curl-0.4.6/src/easy.rs:2597
#11 0x000055b65460d17e in cargo::sources::registry::remote::github_up_to_date ()
at /checkout/cargo/src/cargo/sources/registry/remote.rs:230
#12 cargo::sources::registry::remote::{{impl}}::update_index () at /checkout/cargo/src/cargo/sources/registry/remote.rs:91
#13 0x000055b6546113f8 in cargo::sources::registry::RegistrySource::do_update ()
at /checkout/cargo/src/cargo/sources/registry/mod.rs:309
#14 0x000055b6546116b7 in cargo::sources::registry::{{impl}}::update () at /checkout/cargo/src/cargo/sources/registry/mod.rs:353
#15 0x000055b65454aff5 in cargo::core::registry::{{impl}}::load::{{closure}} () at /checkout/cargo/src/cargo/core/registry.rs:191
#16 cargo::util::errors::{{impl}}::chain_error<(),closure,alloc::boxed::Box,closure> ()
at /checkout/cargo/src/cargo/util/errors.rs:58
#17 cargo::core::registry::PackageRegistry::load () at /checkout/cargo/src/cargo/core/registry.rs:180
#18 cargo::core::registry::PackageRegistry::ensure_loaded () at /checkout/cargo/src/cargo/core/registry.rs:141
#19 0x000055b65454e27c in cargo::core::registry::{{impl}}::query () at /checkout/cargo/src/cargo/core/registry.rs:339
#20 0x000055b6544fcc3e in cargo::core::resolver::Context::query () at /checkout/cargo/src/cargo/core/resolver/mod.rs:859
#21 cargo::core::resolver::{{impl}}::build_deps::{{closure}} () at /checkout/cargo/src/cargo/core/resolver/mod.rs:832
#22 core::ops::impls::{{impl}}::call_once<((cargo::core::dependency::Dependency, collections::vec::Veccollections::string::String)),closure> () at /checkout/src/libcore/ops.rs:2654
#23 core::option::Option<(cargo::core::dependency::Dependency, collections::vec::Veccollections::string::String)>::map<(cargo::core::dependency::Dependency, collections::vec::Veccollections::string::String),core::result::Result<(cargo::core::dependency::Dependency, collections::vec::Veccargo::core::resolver::Candidate, collections::vec::Veccollections::string::String), alloc::boxed::Box<CargoError—Type to continue, or q to quit—

,&mut closure> () at /checkout/src/libcore/option.rs:383
#24 core::iter::{{impl}}::next<core::result::Result<(cargo::core::dependency::Dependency, collections::vec::Veccargo::core::resolver::Candidate, collections::vec::Veccollections::string::String), alloc::boxed::Box>,collections::vec::IntoIter<(cargo::core::dependency::Dependency, collections::vec::Veccollections::string::String)>,closure> () at /checkout/src/libcore/iter/mod.rs:999
#25 core::result::{{impl}}::from_iter::{{impl}}::next<(cargo::core::dependency::Dependency, collections::vec::Veccargo::core::resolver::Candidate, collections::vec::Veccollections::string::String),alloc::boxed::Box,core::iter::Map<collections::vec::IntoIter<(cargo::core::dependency::Dependency, collections::vec::Veccollections::string::String)>, closure>> ()
at /checkout/src/libcore/result.rs:1087
#26 core::iter::iterator::{{impl}}::next<core::result::{{impl}}::from_iter::Adapter<core::iter::Map<collections::vec::IntoIter<(cargo::core::dependency::Dependency, collections::vec::Veccollections::string::String)>, closure>, alloc::boxed::Box>> ()
at /checkout/src/libcore/iter/iterator.rs:2197
#27 0x000055b65453b515 in collections::vec::{{impl}}::from_iter<(cargo::core::dependency::Dependency, collections::vec::Veccargo::core::resolver::Candidate, collections::vec::Veccollections::string::String),&mut core::result::{{impl}}::from_iter::Adapter<core::iter::Map<collections::vec::IntoIter<(cargo::core::dependency::Dependency, collections::vec::Veccollections::string::String)>, closure>, alloc::boxed::Box>> () at /checkout/src/libcollections/vec.rs:1649
#28 collections::vec::{{impl}}::from_iter<(cargo::core::dependency::Dependency, collections::vec::Veccargo::core::resolver::Candidate, collections::vec::Veccollections::string::String),&mut core::result::{{impl}}::from_iter::Adapter<core::iter::Map<collections::vec::IntoIter<(cargo::core::dependency::Dependency, collections::vec::Veccollections::string::String)>, closure>, alloc::boxed::Box>> () at /checkout/src/libcollections/vec.rs:1562
#29 core::result::{{impl}}::from_iter<(cargo::core::dependency::Dependency, collections::vec::Veccargo::core::resolver::Candidate, collections::vec::Veccollections::string::String),alloc::boxed::Box,collections::vec::Vec<(cargo::core::dependency::Dependency, collections::vec::Veccargo::core::resolver::Candidate, collections::vec::Veccollections::string::String)>,core::iter::Map<collections::vec::IntoIter<(cargo::core::dependency::Dependency, collections::vec::Veccollections::string::String)>, closure>> ()
at /checkout/src/libcore/result.rs:1104
#30 core::iter::iterator::Iterator::collect<core::iter::Map<collections::vec::IntoIter<(cargo::core::dependency::Dependency, collections::vec::Veccollections::string::String)>, closure>,core::result::Result<collections::vec::Vec<(cargo::core::dependency::Dependency, collections::vec::Veccargo::core::resolver::Candidate, collections::vec::Veccollections::string::String)>, alloc::boxed::Box>> () at /checkout/src/libcore/iter/iterator.rs:1221
#31 cargo::core::resolver::Context::build_deps () at /checkout/cargo/src/cargo/core/resolver/mod.rs:831
#32 cargo::core::resolver::activate () at /checkout/cargo/src/cargo/core/resolver/mod.rs:340
#33 0x000055b65453dc92 in cargo::core::resolver::activate_deps_loop () at /checkout/cargo/src/cargo/core/resolver/mod.rs:565
—Type to continue, or q to quit—
#34 0x000055b654538a34 in cargo::core::resolver::resolve () at /checkout/cargo/src/cargo/core/resolver/mod.rs:280
#35 0x000055b6545eabc3 in cargo::ops::resolve::resolve_with_previous () at /checkout/cargo/src/cargo/ops/resolve.rs:225
#36 0x000055b654569494 in cargo::ops::cargo_generate_lockfile::update_lockfile ()
at /checkout/cargo/src/cargo/ops/cargo_generate_lockfile.rs:77
#37 0x000055b654426f12 in cargo::update::execute () at /checkout/cargo/src/bin/update.rs:77
#38 cargo::call_main_without_stdincargo::update::Options () at /checkout/cargo/src/cargo/lib.rs:120
#39 cargo::try_execute_builtin_command () at /checkout/cargo/src/bin/cargo.rs:259
#40 0x000055b6544005e5 in cargo::execute () at /checkout/cargo/src/bin/cargo.rs:223
#41 0x000055b6543f75d2 in cargo::call_main_without_stdincargo::Flags () at /checkout/cargo/src/cargo/lib.rs:120
#42 0x000055b6543ff1b2 in cargo::main::{{closure}} () at /checkout/cargo/src/bin/cargo.rs:91
#43 cargo::main () at /checkout/cargo/src/bin/cargo.rs:84
#44 0x000055b65499e756 in std::panicking::try::do_call<fn(),()> () at /checkout/src/libstd/panicking.rs:454
#45 0x000055b6549a5a2b in panic_unwind::__rust_maybe_catch_panic () at /checkout/src/libpanic_unwind/lib.rs:98
#46 0x000055b65499f207 in std::panicking::try<(),fn()> () at /checkout/src/libstd/panicking.rs:433
#47 std::panic::catch_unwind<fn(),()> () at /checkout/src/libstd/panic.rs:361
#48 std::rt::lang_start () at /checkout/src/libstd/rt.rs:57
#49 0x00007f35ba7802b1 in __libc_start_main (main=0x55b654455310 , argc=2, argv=0x7ffd6109f9a8, init=,
fini=, rtld_fini=, stack_end=0x7ffd6109f998) at …/csu/libc-start.c:291
#50 0x000055b6543e6a4d in _start ()


#7

cargo update

Updating git repository `https://github.com/sfackler/rust-postgres.git`
Updating git repository `https://github.com/SergioBenitez/Rocket.git`
Updating git repository `https://github.com/AlexPikalov/cdrs.git`
Updating registry `https://github.com/rust-lang/crates.io-index`

zsh: segmentation fault (core dumped) cargo update

cargo --version --verbose

cargo 0.18.0-nightly (4a3c0a63b 2017-03-12)
release: 0.18.0
commit-hash: 4a3c0a63b07e9a4feb41cb11de37c92a09db5a60
commit-date: 2017-03-12


#8

Damn the markdown :frowning:


#9

seemed fixed in the latest cargo, which is not packaged with rust yet