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

Rustc nightly panic when running clippy: tried to cache X, but was already existing as Y #49085

Closed
brinchj opened this issue Mar 16, 2018 · 2 comments

Comments

@brinchj
Copy link

brinchj commented Mar 16, 2018

After an update to nightly today I ran clippy on my code as usual. However, this time it gave a rustc panic. I was not able to find an existing bug for this with a quick search, but one may exist :)

Meta

rustc +nightly --version --verbose:
rustc 1.26.0-nightly (3926453 2018-03-15)
binary: rustc
commit-hash: 3926453
commit-date: 2018-03-15
host: x86_64-unknown-linux-gnu
release: 1.26.0-nightly
LLVM version: 6.0

cargo +nightly clippy -- --version --verbose:
0.0.188

Backtrace:

error: internal compiler error: librustc/ty/context.rs:976: tried to cache DefId(0/0:473 ~ foo[5ab1]::main[0]::RS[0]::LOC[0]), but was already existing as AllocId(
    1668
)

thread 'rustc' panicked at 'Box<Any>', librustc_errors/lib.rs:540:9
stack backtrace:
   0:     0x7fd54b792df3 - std::sys::unix::backtrace::tracing::imp::unwind_backtrace::h6a0bc5605dce4433
                               at libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
   1:     0x7fd54b789ca4 - std::sys_common::backtrace::_print::h221d36b236e12e74
                               at libstd/sys_common/backtrace.rs:71
   2:     0x7fd54b78f68d - std::panicking::default_hook::{{closure}}::h6e8674dc74aeedd4
                               at libstd/sys_common/backtrace.rs:59
                               at libstd/panicking.rs:207
   3:     0x7fd54b78f389 - std::panicking::default_hook::h746ce9d1b7bb055c
                               at libstd/panicking.rs:223
   4:     0x7fd54c6e261d - core::ops::function::Fn::call::hb510ff0d959ce38b
   5:     0x7fd54b78fb29 - std::panicking::rust_panic_with_hook::h9a379049fd32d0d9
                               at libstd/panicking.rs:403
   6:     0x7fd54bec0bea - std::panicking::begin_panic::hef985c972aedad24
   7:     0x7fd54bee1da5 - rustc_errors::Handler::bug::hd04d670de9a4f7bc
   8:     0x7fd54c9f6e1f - rustc::session::opt_span_bug_fmt::{{closure}}::h9717c5174ccf7dbc
   9:     0x7fd54cab4065 - rustc::ty::context::tls::with_opt::{{closure}}::h2ab3fb2a7fdf1463
  10:     0x7fd54c6dae9f - <std::thread::local::LocalKey<T>>::try_with::h4a96d45c0fd1da65
  11:     0x7fd54c6daad6 - <std::thread::local::LocalKey<T>>::with::h935c0307e72b02b5
  12:     0x7fd54cab3e66 - rustc::ty::context::tls::with::ha5ff3dff40c0ca13
  13:     0x7fd54cab4017 - rustc::ty::context::tls::with_opt::h6c692edeed5f4205
  14:     0x7fd54c9f6d24 - rustc::session::opt_span_bug_fmt::hd4ef20e4f17440e1
  15:     0x7fd54c9f6c96 - rustc::session::bug_fmt::h3e8fd5409ad66756
  16:     0x7fd54caae9da - rustc::ty::context::InterpretInterner::cache::h1887c6eea8e42f39
  17:     0x7fd54ca8be7e - <rustc::ty::maps::on_disk_cache::CacheDecoder<'a, 'tcx, 'x> as serialize::serialize::SpecializedDecoder<rustc::mir::interpret::AllocId>>::specialized_decode::h7272271c1d82beca
  18:     0x7fd54cafded6 - <rustc::mir::interpret::MemoryPointer as serialize::serialize::Decodable>::decode::{{closure}}::h95abfc00fa88786f
  19:     0x7fd54c8593f9 - serialize::serialize::Decoder::read_enum_variant::h237634adb88347ef
  20:     0x7fd54cafda8f - <rustc::mir::interpret::value::Pointer as serialize::serialize::Decodable>::decode::{{closure}}::hd8074276f09679f8
  21:     0x7fd54c85a79b - serialize::serialize::Decoder::read_enum_variant::hf44cd3f2c6c882d2
  22:     0x7fd54c8595ff - serialize::serialize::Decoder::read_enum_variant::h9259904540d0ee8d
  23:     0x7fd54cb9177a - rustc::ty::maps::<impl rustc::ty::maps::queries::const_eval<'tcx>>::try_get::h0fd12e21b00a6c19
  24:     0x7fd54cc8685a - rustc::ty::maps::TyCtxtAt::const_eval::hb868ce2a5cc81181
  25:     0x7fd54cc82e74 - rustc::ty::maps::<impl rustc::ty::context::TyCtxt<'a, 'tcx, 'lcx>>::const_eval::h8866ca29889b7ee8
  26:     0x7fd548e01b19 - rustc_mir::monomorphize::collector::collect_items_rec::h984ce9e45fc5814d
  27:     0x7fd548e02f31 - rustc_mir::monomorphize::collector::collect_items_rec::h984ce9e45fc5814d
  28:     0x7fd548e02f31 - rustc_mir::monomorphize::collector::collect_items_rec::h984ce9e45fc5814d
  29:     0x7fd548e01492 - rustc_mir::monomorphize::collector::collect_crate_mono_items::h6512adb9d11b1126
  30:     0x7fd5426fc528 - rustc_trans::base::collect_and_partition_translation_items::h16e489be9a70c8bc
  31:     0x7fd54c87fdb9 - rustc::dep_graph::graph::DepGraph::with_task_impl::h7bb0171e1fb0b345
  32:     0x7fd54cc5ab97 - rustc::ty::maps::<impl rustc::ty::maps::queries::collect_and_partition_translation_items<'tcx>>::force::ha1e3871a6ee96b55
  33:     0x7fd54cc5bbe8 - rustc::ty::maps::<impl rustc::ty::maps::queries::collect_and_partition_translation_items<'tcx>>::try_get::h8a39ec230dc612c4
  34:     0x7fd54cc8b2e5 - rustc::ty::maps::TyCtxtAt::collect_and_partition_translation_items::hbcd28dffa92ca525
  35:     0x7fd54cc8413e - rustc::ty::maps::<impl rustc::ty::context::TyCtxt<'a, 'tcx, 'lcx>>::collect_and_partition_translation_items::h51816eb64a8d161f
  36:     0x7fd5426f7f33 - rustc_trans::base::trans_crate::h7aad30be39f12db7
  37:     0x7fd5427502e7 - <rustc_trans::LlvmTransCrate as rustc_trans_utils::trans_crate::TransCrate>::trans_crate::h2fc85b08340ba786
  38:     0x7fd54d6bea8c - rustc_driver::driver::phase_4_translate_to_llvm::hedf678c6a2658a09
  39:     0x7fd54d6b73de - rustc_driver::driver::compile_input::{{closure}}::h7a79a9d8c1ffdd5f
  40:     0x7fd54d643247 - rustc::ty::context::TyCtxt::create_and_enter::h0c78163ea978eb0d
  41:     0x7fd54d6b5401 - rustc_driver::driver::compile_input::haf2922d1e945b5b0
  42:     0x7fd54d6d25e5 - rustc_driver::run_compiler::h884712936ee0cb5b
  43:     0x55686831a8e2 - std::sys_common::backtrace::__rust_begin_short_backtrace::h1f219268cfc4e6d3
  44:     0x55686831ad7b - std::panicking::try::do_call::hfd92181ad0f55388
  45:     0x7fd54b7a898e - __rust_maybe_catch_panic
                               at libpanic_unwind/lib.rs:102
  46:     0x5568683127ad - <F as alloc::boxed::FnBox<A>>::call_box::h0c116730c83a0489
  47:     0x7fd54b79fbeb - std::sys::unix::thread::Thread::new::thread_start::h9e86927e52b61050
                               at /checkout/src/liballoc/boxed.rs:793
                               at libstd/sys_common/thread.rs:24
                               at libstd/sys/unix/thread.rs:90
  48:     0x7fd54b5096b9 - start_thread
  49:     0x7fd54b02941c - clone
  50:                0x0 - <unknown>

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: /~https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports

note: rustc 1.26.0-nightly (392645394 2018-03-15) running on x86_64-unknown-linux-gnu

note: compiler flags: -C debuginfo=2 -C incremental -C link-arg=-Wl,--no-gc-sections --crate-type bin

note: some of the compiler flags provided by cargo are hidden
@brinchj
Copy link
Author

brinchj commented Mar 16, 2018

I just ran cargo clean and it solved my immediate issue which may have been caused by a bad local cache?

@oli-obk
Copy link
Contributor

oli-obk commented Mar 16, 2018

dupe of #49081

@oli-obk oli-obk closed this as completed Mar 16, 2018
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

2 participants