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 panic compiling postscript crate #56270

Closed
galich opened this issue Nov 27, 2018 · 2 comments
Closed

rustc panic compiling postscript crate #56270

galich opened this issue Nov 27, 2018 · 2 comments
Labels
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

@galich
Copy link

galich commented Nov 27, 2018

High RAM usage and crash on a package that was compiling fine a day or two ago.

I tried this code:

https://github.com/bodoni/postscript

This happened: rustc took 7GB+ of RAM (may be more), then crashed.

Meta

rustc --version --verbose:

C:\code\postscript>rustc --version --verbose
rustc 1.32.0-nightly (6bfb46e4a 2018-11-26)
binary: rustc
commit-hash: 6bfb46e4ac9a2704f06de1a2ff7a4612cd70c8cb
commit-date: 2018-11-26
host: x86_64-pc-windows-msvc
release: 1.32.0-nightly
LLVM version: 8.0

Backtrace:

C:\code\postscript>cargo build
warning: An explicit [[test]] section is specified in Cargo.toml which currently
disables Cargo from automatically inferring other test targets.
This inference behavior will change in the Rust 2018 edition and the following
files will be included as a test target:

* C:\code\postscript\tests\compact1.rs
* C:\code\postscript\tests\type2.rs

This is likely to break cargo build or cargo test as these files may not be
ready to be compiled as a test target today. You can future-proof yourself
and disable this warning by adding `autotests = false` to your [package]
section. You may also move the files to a location where Cargo would not
automatically infer them to be a target, such as in subfolders.

For more information on this warning you can consult
https://github.com/rust-lang/cargo/issues/5330
warning: An explicit [[bench]] section is specified in Cargo.toml which currently
disables Cargo from automatically inferring other benchmark targets.
This inference behavior will change in the Rust 2018 edition and the following
files will be included as a benchmark target:

* C:\code\postscript\benches\compact1.rs
* C:\code\postscript\benches\type2.rs

This is likely to break cargo build or cargo test as these files may not be
ready to be compiled as a benchmark target today. You can future-proof yourself
and disable this warning by adding `autobenches = false` to your [package]
section. You may also move the files to a location where Cargo would not
automatically infer them to be a target, such as in subfolders.

For more information on this warning you can consult
https://github.com/rust-lang/cargo/issues/5330
    Updating crates.io index
   Compiling postscript v0.13.2 (C:\code\postscript)
thread 'main' panicked at 'assertion failed: value <= 4294967040', src\librustc\ty\mod.rs:1543:1
stack backtrace:
   0: std::sys_common::alloc::realloc_fallback
   1: std::panicking::take_hook
   2: std::panicking::take_hook
   3: rustc::ty::structural_impls::<impl rustc::ty::context::Lift<'tcx> for rustc::ty::adjustment::AutoBorrow<'a>>::lift_to_tcx
   4: std::panicking::rust_panic_with_hook
   5: <rustc::hir::intravisit::IdRange as core::fmt::Debug>::fmt
   6: rustc::infer::InferCtxt::create_next_universe
   7: <rustc_mir::borrow_check::nll::type_check::free_region_relations::UniversalRegionRelations<'tcx> as core::fmt::Debug>::fmt
   8: <rustc_mir::borrow_check::nll::type_check::free_region_relations::UniversalRegionRelations<'tcx> as core::fmt::Debug>::fmt
   9: <rustc_mir::borrow_check::nll::type_check::TypeVerifier<'a, 'b, 'gcx, 'tcx> as rustc::mir::visit::Visitor<'tcx>>::visit_mir
  10: <rustc_mir::borrow_check::nll::type_check::TypeVerifier<'a, 'b, 'gcx, 'tcx> as rustc::mir::visit::Visitor<'tcx>>::visit_constant
  11: <rustc_mir::borrow_check::nll::type_check::TypeVerifier<'a, 'b, 'gcx, 'tcx> as rustc::mir::visit::Visitor<'tcx>>::visit_mir
  12: <rustc_mir::borrow_check::nll::type_check::relate_tys::NllTypeRelatingDelegate<'_, '_, '_, 'tcx> as rustc::infer::nll_relate::TypeRelatingDelegate<'tcx>>::push_outlives
  13: <rustc_mir::dataflow::impls::MaybeUninitializedPlaces<'a, 'gcx, 'tcx> as rustc_mir::dataflow::move_paths::HasMoveData<'tcx>>::move_data
  14: <rustc_mir::borrow_check::nll::type_check::free_region_relations::UniversalRegionRelations<'tcx> as core::fmt::Debug>::fmt
  15: <rustc_mir::borrow_check::nll::type_check::TypeckMir as rustc_mir::transform::MirPass>::run_pass
  16: rustc_mir::transform::run_passes
  17: rustc_mir::transform::run_passes
  18: rustc_mir::transform::run_passes
  19: rustc::ty::context::tls::track_diagnostic
  20: rustc::ty::context::tls::track_diagnostic
  21: rustc::dep_graph::graph::DepGraph::assert_ignored
  22: rustc::ty::context::tls::track_diagnostic
  23: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::try_print_query_stack
  24: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::try_print_query_stack
  25: rustc::ty::query::<impl rustc::ty::context::TyCtxt<'a, 'tcx, 'lcx>>::mir_const
  26: rustc_mir::transform::run_passes
  27: rustc::ty::context::tls::track_diagnostic
  28: rustc::ty::context::tls::track_diagnostic
  29: rustc::dep_graph::graph::DepGraph::assert_ignored
  30: rustc::ty::context::tls::track_diagnostic
  31: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::try_print_query_stack
  32: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::try_print_query_stack
  33: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::try_print_query_stack
  34: rustc_borrowck::borrowck::provide
  35: rustc::ty::context::tls::track_diagnostic
  36: rustc::ty::context::tls::track_diagnostic
  37: rustc::dep_graph::graph::DepGraph::assert_ignored
  38: rustc::ty::context::tls::track_diagnostic
  39: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::try_print_query_stack
  40: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::try_print_query_stack
  41: rustc::ty::query::<impl rustc::ty::context::TyCtxt<'a, 'tcx, 'lcx>>::borrowck
  42: <rustc::middle::mem_categorization::InteriorKind as rustc_borrowck::borrowck::ToInteriorKind>::cleaned
  43: rustc_borrowck::borrowck::check_crate
  44: <rustc_driver::derive_registrar::Finder as rustc::hir::itemlikevisit::ItemLikeVisitor<'v>>::visit_item
  45: <rustc_driver::derive_registrar::Finder as rustc::hir::itemlikevisit::ItemLikeVisitor<'v>>::visit_item
  46: <rustc_driver::derive_registrar::Finder as rustc::hir::itemlikevisit::ItemLikeVisitor<'v>>::visit_item
  47: rustc_driver::driver::compile_input
  48: rustc_driver::run_compiler
  49: <rustc_driver::derive_registrar::Finder as rustc::hir::itemlikevisit::ItemLikeVisitor<'v>>::visit_impl_item
  50: rustc_driver::run_compiler
  51: <env_logger::filter::inner::Filter as core::fmt::Display>::fmt
  52: _rust_maybe_catch_panic
  53: rustc_driver::profile::dump
  54: rustc_driver::main
  55: <unknown>
  56: std::panicking::update_panic_count
  57: _rust_maybe_catch_panic
  58: std::rt::lang_start_internal
  59: <unknown>
  60: <unknown>
  61: BaseThreadInitThunk
  62: RtlUserThreadStart
query stack during panic:
#0 [mir_const] processing `type2::program::Program::next`
#1 [mir_validated] processing `type2::program::Program::next`
#2 [borrowck] processing `type2::program::Program::next`
end of query stack

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.32.0-nightly (6bfb46e4a 2018-11-26) running on x86_64-pc-windows-msvc

note: compiler flags: -C debuginfo=2 -C incremental --crate-type lib

note: some of the compiler flags provided by cargo are hidden

error: Could not compile `postscript`.

To learn more, run the command again with --verbose.
@memoryruins
Copy link
Contributor

Potentially caused by #55921
If so, a patch will soon land in #56251

@nikomatsakis nikomatsakis added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Nov 27, 2018
@Centril Centril added the I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ label Nov 27, 2018
@scalexm
Copy link
Member

scalexm commented Nov 28, 2018

Fixed by #56251.

@scalexm scalexm closed this as completed Nov 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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