Skip to content

cargo check crashing on Linux x86 #45581

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

Closed
therealbstern opened this issue Oct 27, 2017 · 2 comments
Closed

cargo check crashing on Linux x86 #45581

therealbstern opened this issue Oct 27, 2017 · 2 comments
Labels
A-metadata Area: Crate metadata C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@therealbstern
Copy link
Contributor

therealbstern commented Oct 27, 2017

cargo check crashes during build
A second cargo check succeeded, but a cargo clean plus RUST_BACKTRACE=1 yielded another crash, recorded below.
cargo clean; cargo build succeeds, it's just cargo check that blows up.

It appears that the problem is at libserialize/leb128.rs:59:20 -- different modules trigger the crash, depending upon who gets to it first. In the output below, it was serde who asked for libserialize, but enum_primitive and num_integer also blew up in the same place on other builds.

uname -a:
Linux farad 4.4.88-smp #2 SMP Thu Sep 14 15:50:44 CDT 2017 i686 Intel(R) Core(TM) i7-4770K CPU @ 3.50GHz GenuineIntel GNU/Linux

Meta

rustc --version --verbose:
rustc 1.21.0 (3b72af9 2017-10-09)
binary: rustc
commit-hash: 3b72af9
commit-date: 2017-10-09
host: i686-unknown-linux-gnu
release: 1.21.0
LLVM version: 4.0

Backtrace:

   Compiling serde v1.0.15
error: internal compiler error: unexpected panic

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.21.0 (3b72af97e 2017-10-09) running on i686-unknown-linux-gnu

note: run with `RUST_BACKTRACE=1` for a backtrace

thread 'rustc' panicked at 'index out of bounds: the len is 32768 but the index is 827527', /checkout/src/libserialize/leb128.rs:59:20
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
stack backtrace:
   0: std::sys::imp::backtrace::tracing::imp::unwind_backtrace
             at /checkout/src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
   1: std::sys_common::backtrace::_print
             at /checkout/src/libstd/sys_common/backtrace.rs:71
   2: std::panicking::default_hook::{{closure}}
             at /checkout/src/libstd/sys_common/backtrace.rs:60
             at /checkout/src/libstd/panicking.rs:381
   3: std::panicking::default_hook
             at /checkout/src/libstd/panicking.rs:391
   4: std::panicking::rust_panic_with_hook
             at /checkout/src/libstd/panicking.rs:611
   5: std::panicking::begin_panic
             at /checkout/src/libstd/panicking.rs:572
   6: std::panicking::begin_panic_fmt
             at /checkout/src/libstd/panicking.rs:522
   7: rust_begin_unwind
             at /checkout/src/libstd/panicking.rs:498
   8: core::panicking::panic_fmt
             at /checkout/src/libcore/panicking.rs:71
   9: core::panicking::panic_bounds_check
             at /checkout/src/libcore/panicking.rs:58
  10: <rustc_metadata::decoder::DecodeContext<'doc, 'tcx> as serialize::serialize::Decoder>::read_str
  11: rustc_metadata::decoder::<impl rustc_metadata::cstore::MetadataBlob>::get_root
  12: rustc_metadata::locator::Context::extract_one
  13: rustc_metadata::locator::Context::find_library_crate
  14: rustc_metadata::creader::CrateLoader::load
  15: rustc_metadata::creader::CrateLoader::resolve_crate
  16: rustc_metadata::creader::CrateLoader::resolve_crate_deps::{{closure}}
  17: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T, I>>::spec_extend
  18: rustc_metadata::creader::CrateLoader::resolve_crate
  19: rustc_metadata::creader::CrateLoader::resolve_crate_deps::{{closure}}
  20: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T, I>>::spec_extend
  21: rustc_metadata::creader::CrateLoader::resolve_crate
  22: <rustc_metadata::creader::CrateLoader<'a> as rustc::middle::cstore::CrateLoader>::process_item
  23: rustc_resolve::build_reduced_graph::<impl rustc_resolve::Resolver<'a>>::build_reduced_graph_for_item
  24: <rustc_resolve::build_reduced_graph::BuildReducedGraphVisitor<'a, 'b> as syntax::visit::Visitor<'a>>::visit_item
  25: <rustc_resolve::build_reduced_graph::BuildReducedGraphVisitor<'a, 'b> as syntax::visit::Visitor<'a>>::visit_item
  26: <rustc_resolve::build_reduced_graph::BuildReducedGraphVisitor<'a, 'b> as syntax::visit::Visitor<'a>>::visit_item
  27: rustc_resolve::macros::<impl syntax::ext::base::Resolver for rustc_resolve::Resolver<'a>>::visit_expansion
  28: syntax::ext::expand::MacroExpander::collect_invocations
  29: syntax::ext::expand::MacroExpander::expand
  30: syntax::ext::expand::MacroExpander::expand_crate
  31: rustc_driver::driver::phase_2_configure_and_expand::{{closure}}
  32: rustc_driver::driver::phase_2_configure_and_expand
  33: rustc_driver::driver::compile_input
  34: rustc_driver::run_compiler

error: Could not compile `lazy_static`.
warning: build failed, waiting for other jobs to finish...
error: build failed
@Mark-Simulacrum
Copy link
Member

Possibly related to #45500.

@TimNN TimNN added C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ labels Oct 31, 2017
@jonas-schievink jonas-schievink added A-metadata Area: Crate metadata T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels May 14, 2019
@Noratrieb
Copy link
Member

There is no reproduction, so I'm closing it as I inactionable. Feel free to open new issues if you encounter further problems.

@Noratrieb Noratrieb closed this as not planned Won't fix, can't repro, duplicate, stale Jul 5, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-metadata Area: Crate metadata C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

5 participants