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

Stable 1.1 ICE: assertion failed: bound_list_is_sorted(&bounds.projection_bounds) #27222

Closed
frankmcsherry opened this issue Jul 22, 2015 · 3 comments
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@frankmcsherry
Copy link
Contributor

It looks like if you go and grab this commit of timely-dataflow from github, you get a nicely reproducible ICE. TravisCI gets it too! In case anything changes in the meantime, the commit you want is

frankmcsherry/timely-dataflow@fcb32c5

Related issues: #24063 #25467. The times I've seen this before I haven't be able to reproduce it, but since it seems to happen from a clean pull, I thought I would show you.

To repro, just follow the commands here. git clone, cargo build, cargo test. Boom!

% git clone https://github.com/frankmcsherry/timely-dataflow.git
Cloning into 'timely-dataflow'...
remote: Counting objects: 1999, done.
remote: Compressing objects: 100% (15/15), done.
remote: Total 1999 (delta 1), reused 0 (delta 0), pack-reused 1984
Receiving objects: 100% (1999/1999), 602.41 KiB | 715.00 KiB/s, done.
Resolving deltas: 100% (1430/1430), done.
Checking connectivity... done.
% cd timely-dataflow
% cargo build
    Updating registry `https://github.com/rust-lang/crates.io-index`
   Compiling libc v0.1.8
   Compiling byteorder v0.3.11
   Compiling abomonation v0.2.0
   Compiling log v0.3.1
   Compiling getopts v0.2.11
   Compiling timely v0.0.7 (file:///Users/mcsherry/Projects/timely-dataflow)
% export RUST_BACKTRACE=1
% cargo test
   Compiling timely v0.0.7 (file:///Users/mcsherry/Projects/timely-dataflow)
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: run with `RUST_BACKTRACE=1` for a backtrace
thread 'rustc' panicked at 'assertion failed: bound_list_is_sorted(&bounds.projection_bounds)', /Users/rustbuild/src/rust-buildbot/slave/stable-dist-rustc-mac/build/src/librustc/middle/ty.rs:3237

stack backtrace:
   1:        0x10b5e0fff - sys::backtrace::write::h5a94548fe691961bc2r
   2:        0x10b5e9a50 - panicking::on_panic::hc33f9bf1349f5e0bLgw
   3:        0x10b5a4cc5 - rt::unwind::begin_unwind_inner::hb24e48e8f7bb8bb0uYv
   4:        0x1089ed56f - rt::unwind::begin_unwind::h16372345962065799137
   5:        0x108ade049 - middle::ty::mk_trait::h6533a56ee618f30dTa5
   6:        0x108d693c1 - metadata::tydecode::parse_ty_::h17233465002289524658
   7:        0x108d68538 - metadata::tydecode::parse_ty_::h17233465002289524658
   8:        0x108d6a353 - metadata::tydecode::parse_substs_::h7886299839747005652
   9:        0x108d68b47 - metadata::tydecode::parse_ty_::h17233465002289524658
  10:        0x108d6a353 - metadata::tydecode::parse_substs_::h7886299839747005652
  11:        0x108d68b47 - metadata::tydecode::parse_ty_::h17233465002289524658
  12:        0x108d6a353 - metadata::tydecode::parse_substs_::h7886299839747005652
  13:        0x108d68b47 - metadata::tydecode::parse_ty_::h17233465002289524658
  14:        0x108d689fb - metadata::tydecode::parse_ty_::h17233465002289524658
  15:        0x108d309fc - metadata::csearch::get_field_type::h2287f01378fea54d1Gm
  16:        0x108cf0905 - middle::ty::lookup_field_type_unsubstituted::h2b1ef075de9a0a1d7B8
  17:        0x108b3c547 - middle::ty::struct_fields::h264cc4fe3d890140kF8
  18:        0x108ce2574 - middle::traits::select::SelectionContext<'cx, 'tcx>::builtin_bound::h250758517ef4e73caCS
  19:        0x108cdd93c - middle::traits::select::SelectionContext<'cx, 'tcx>::assemble_builtin_bound_candidates::h4d99b58c75912a4bJyS
  20:        0x108cdb6cb - middle::traits::select::SelectionContext<'cx, 'tcx>::assemble_candidates::h48ed99cc3014ff51PCR
  21:        0x108cd12a7 - middle::traits::select::SelectionContext<'cx, 'tcx>::candidate_from_obligation::h942ec6226a4ce943FgR
  22:        0x108ba24e7 - middle::traits::select::SelectionContext<'cx, 'tcx>::select::hfcdde7d6189f9fe2EUQ
  23:        0x108cb252c - middle::traits::fulfill::FulfillmentContext<'tcx>::select::hbfd9add7588cde90vMO
  24:        0x108cb1a98 - middle::traits::fulfill::FulfillmentContext<'tcx>::select_where_possible::h3009bf934d8bcc0aJLO
  25:        0x108802ab3 - check::FnCtxt<'a, 'tcx>::select_obligations_where_possible::h195400fd72caaf3aBnp
  26:        0x10878a681 - check::FnCtxt<'a, 'tcx>::resolve_type_vars_if_possible::hbafa97f6f84c0b527Bo
  27:        0x10875720e - check::structurally_resolved_type::h0d57f96ee12a7090nft
  28:        0x10880f5db - check::check_expr_with_unifier::check_method_call::h6fbc17f86cb4009c7qq
  29:        0x10883d4d8 - check::check_expr_with_unifier::h16776623912766352283
  30:        0x1087f9c38 - check::check_block_with_expected::hcf516cdce8fb2f3cD4r
  31:        0x1088269ee - check::check_expr_with_unifier::h9590468336052747275
  32:        0x1087fa31b - check::check_block_with_expected::hcf516cdce8fb2f3cD4r
  33:        0x1087dd998 - check::check_fn::hccdd8c8447844807gFn
  34:        0x1087dbe9d - check::closure::check_expr_closure::hf6e67e1d806efaf5Ngl
  35:        0x108809ece - check::check_expr_with_unifier::h4656396524897881353
  36:        0x1087e3b5c - check::check_argument_types::h70e22fb88692fa7aBRp
  37:        0x1087e535a - check::check_method_argument_types::h95c2f0efed3f12130Op
  38:        0x1088100d2 - check::check_expr_with_unifier::check_method_call::h6fbc17f86cb4009c7qq
  39:        0x1088263ea - check::check_expr_with_unifier::h9590468336052747275
  40:        0x10884ee7b - check::check_decl_local::h5ab825b4ae4c4049xYr
  41:        0x1087f9be4 - check::check_block_with_expected::hcf516cdce8fb2f3cD4r
  42:        0x1088269ee - check::check_expr_with_unifier::h9590468336052747275
  43:        0x1087fa31b - check::check_block_with_expected::hcf516cdce8fb2f3cD4r
  44:        0x1087dd998 - check::check_fn::hccdd8c8447844807gFn
  45:        0x1087dbe9d - check::closure::check_expr_closure::hf6e67e1d806efaf5Ngl
  46:        0x108809ece - check::check_expr_with_unifier::h4656396524897881353
  47:        0x1087e3b5c - check::check_argument_types::h70e22fb88692fa7aBRp
  48:        0x1087e14e4 - check::callee::confirm_builtin_call::h78c7c731ec5b3086JRl
  49:        0x1087dfc2f - check::callee::check_call::h100059df8beba0e1rIl
  50:        0x10883d453 - check::check_expr_with_unifier::h16776623912766352283
  51:        0x1087f9c38 - check::check_block_with_expected::hcf516cdce8fb2f3cD4r
  52:        0x1087dd998 - check::check_fn::hccdd8c8447844807gFn
  53:        0x1087f4a13 - check::check_bare_fn::hbfad11d5a9f87954Tun
  54:        0x1087f2a89 - check::CheckItemBodiesVisitor<'a, 'tcx>.Visitor<'tcx>::visit_item::hf2b38fe3b992c9bcWrn
  55:        0x1088b7aba - check_crate::closure.38929
  56:        0x1088b154a - check_crate::hcd5b7e66feee2debsJC
  57:        0x1081008af - driver::phase_3_run_analysis_passes::h3f61cd0eb3853b54tGa
  58:        0x1080e52d3 - driver::compile_input::h3d15d32af3f4b6bdQba
  59:        0x1081a0f33 - run_compiler::h32c0e6c36780775b75b
  60:        0x10819e69a - boxed::F.FnBox<A>::call_box::h7208527504866586156
  61:        0x10819dbf7 - rt::unwind::try::try_fn::h4574368377636742306
  62:        0x10b6717a8 - rust_try_inner
  63:        0x10b671795 - rust_try
  64:        0x10819decd - boxed::F.FnBox<A>::call_box::h14823742600371436653
  65:        0x10b5e863d - sys::thread::Thread::new::thread_start::hefa4f0e4c64c9336Yjv
  66:     0x7fff98192267 - _pthread_body
  67:     0x7fff981921e4 - _pthread_start

Build failed, waiting for other jobs to finish...
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: run with `RUST_BACKTRACE=1` for a backtrace
thread 'rustc' panicked at 'assertion failed: bound_list_is_sorted(&bounds.projection_bounds)', /Users/rustbuild/src/rust-buildbot/slave/stable-dist-rustc-mac/build/src/librustc/middle/ty.rs:3237

stack backtrace:
   1:        0x1129f2fff - sys::backtrace::write::h5a94548fe691961bc2r
   2:        0x1129fba50 - panicking::on_panic::hc33f9bf1349f5e0bLgw
   3:        0x1129b6cc5 - rt::unwind::begin_unwind_inner::hb24e48e8f7bb8bb0uYv
   4:        0x10fe0856f - rt::unwind::begin_unwind::h16372345962065799137
   5:        0x10fef9049 - middle::ty::mk_trait::h6533a56ee618f30dTa5
   6:        0x1101843c1 - metadata::tydecode::parse_ty_::h17233465002289524658
   7:        0x110183538 - metadata::tydecode::parse_ty_::h17233465002289524658
   8:        0x110185353 - metadata::tydecode::parse_substs_::h7886299839747005652
   9:        0x110183b47 - metadata::tydecode::parse_ty_::h17233465002289524658
  10:        0x110185353 - metadata::tydecode::parse_substs_::h7886299839747005652
  11:        0x110183b47 - metadata::tydecode::parse_ty_::h17233465002289524658
  12:        0x110185353 - metadata::tydecode::parse_substs_::h7886299839747005652
  13:        0x110183b47 - metadata::tydecode::parse_ty_::h17233465002289524658
  14:        0x1101839fb - metadata::tydecode::parse_ty_::h17233465002289524658
  15:        0x11014b9fc - metadata::csearch::get_field_type::h2287f01378fea54d1Gm
  16:        0x11010b905 - middle::ty::lookup_field_type_unsubstituted::h2b1ef075de9a0a1d7B8
  17:        0x10ff57547 - middle::ty::struct_fields::h264cc4fe3d890140kF8
  18:        0x1100fd574 - middle::traits::select::SelectionContext<'cx, 'tcx>::builtin_bound::h250758517ef4e73caCS
  19:        0x1100f893c - middle::traits::select::SelectionContext<'cx, 'tcx>::assemble_builtin_bound_candidates::h4d99b58c75912a4bJyS
  20:        0x1100f66cb - middle::traits::select::SelectionContext<'cx, 'tcx>::assemble_candidates::h48ed99cc3014ff51PCR
  21:        0x1100ec2a7 - middle::traits::select::SelectionContext<'cx, 'tcx>::candidate_from_obligation::h942ec6226a4ce943FgR
  22:        0x10ffbd4e7 - middle::traits::select::SelectionContext<'cx, 'tcx>::select::hfcdde7d6189f9fe2EUQ
  23:        0x1100cd52c - middle::traits::fulfill::FulfillmentContext<'tcx>::select::hbfd9add7588cde90vMO
  24:        0x1100cca98 - middle::traits::fulfill::FulfillmentContext<'tcx>::select_where_possible::h3009bf934d8bcc0aJLO
  25:        0x10fc1cab3 - check::FnCtxt<'a, 'tcx>::select_obligations_where_possible::h195400fd72caaf3aBnp
  26:        0x10fba4681 - check::FnCtxt<'a, 'tcx>::resolve_type_vars_if_possible::hbafa97f6f84c0b527Bo
  27:        0x10fb7120e - check::structurally_resolved_type::h0d57f96ee12a7090nft
  28:        0x10fc295db - check::check_expr_with_unifier::check_method_call::h6fbc17f86cb4009c7qq
  29:        0x10fc5d0f8 - check::check_expr_with_unifier::h16198709343475811244
  30:        0x10fc295a6 - check::check_expr_with_unifier::check_method_call::h6fbc17f86cb4009c7qq
  31:        0x10fc574d8 - check::check_expr_with_unifier::h16776623912766352283
  32:        0x10fc13c38 - check::check_block_with_expected::hcf516cdce8fb2f3cD4r
  33:        0x10fc409ee - check::check_expr_with_unifier::h9590468336052747275
  34:        0x10fc1431b - check::check_block_with_expected::hcf516cdce8fb2f3cD4r
  35:        0x10fbf7998 - check::check_fn::hccdd8c8447844807gFn
  36:        0x10fbf5e9d - check::closure::check_expr_closure::hf6e67e1d806efaf5Ngl
  37:        0x10fc23ece - check::check_expr_with_unifier::h4656396524897881353
  38:        0x10fbfdb5c - check::check_argument_types::h70e22fb88692fa7aBRp
  39:        0x10fbff35a - check::check_method_argument_types::h95c2f0efed3f12130Op
  40:        0x10fc2a0d2 - check::check_expr_with_unifier::check_method_call::h6fbc17f86cb4009c7qq
  41:        0x10fc574d8 - check::check_expr_with_unifier::h16776623912766352283
  42:        0x10fc13c38 - check::check_block_with_expected::hcf516cdce8fb2f3cD4r
  43:        0x10fc409ee - check::check_expr_with_unifier::h9590468336052747275
  44:        0x10fc1431b - check::check_block_with_expected::hcf516cdce8fb2f3cD4r
  45:        0x10fbf7998 - check::check_fn::hccdd8c8447844807gFn
  46:        0x10fbf5e9d - check::closure::check_expr_closure::hf6e67e1d806efaf5Ngl
  47:        0x10fc23ece - check::check_expr_with_unifier::h4656396524897881353
  48:        0x10fbfdb5c - check::check_argument_types::h70e22fb88692fa7aBRp
  49:        0x10fbfb4e4 - check::callee::confirm_builtin_call::h78c7c731ec5b3086JRl
  50:        0x10fbf9c2f - check::callee::check_call::h100059df8beba0e1rIl
  51:        0x10fc40367 - check::check_expr_with_unifier::h9590468336052747275
  52:        0x10fc1431b - check::check_block_with_expected::hcf516cdce8fb2f3cD4r
  53:        0x10fbf7998 - check::check_fn::hccdd8c8447844807gFn
  54:        0x10fc0ea13 - check::check_bare_fn::hbfad11d5a9f87954Tun
  55:        0x10fc0ca89 - check::CheckItemBodiesVisitor<'a, 'tcx>.Visitor<'tcx>::visit_item::hf2b38fe3b992c9bcWrn
  56:        0x10fcd1aba - check_crate::closure.38929
  57:        0x10fccb54a - check_crate::hcd5b7e66feee2debsJC
  58:        0x10f50f8af - driver::phase_3_run_analysis_passes::h3f61cd0eb3853b54tGa
  59:        0x10f4f42d3 - driver::compile_input::h3d15d32af3f4b6bdQba
  60:        0x10f5aff33 - run_compiler::h32c0e6c36780775b75b
  61:        0x10f5ad69a - boxed::F.FnBox<A>::call_box::h7208527504866586156
  62:        0x10f5acbf7 - rt::unwind::try::try_fn::h4574368377636742306
  63:        0x112a837a8 - rust_try_inner
  64:        0x112a83795 - rust_try
  65:        0x10f5acecd - boxed::F.FnBox<A>::call_box::h14823742600371436653
  66:        0x1129fa63d - sys::thread::Thread::new::thread_start::hefa4f0e4c64c9336Yjv
  67:     0x7fff98192267 - _pthread_body
  68:     0x7fff981921e4 - _pthread_start

Could not compile `timely`.

To learn more, run the command again with --verbose.
% rustc --version
rustc 1.1.0 (35ceea399 2015-06-19)
@frankmcsherry
Copy link
Contributor Author

It seems like I can make the ICE go away by replacing a member variable

shared: Rc<RefCell<Vec<Box<Observer<Time=T, Data=D>>>>>

with one that uses an equivalent trait which doesn't use associated types:

shared: Rc<RefCell<Vec<Box<Flattener<T, D>>>>>

Swapping that in removes the ICE, swapping it out brings the ICE back. So, maybe something isn't working great for boxed traits with associated types. The commit that fixes things is frankmcsherry/timely-dataflow@fcb32c5...68ca8e9

@jdm jdm added the I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ label Jul 23, 2015
@frankmcsherry
Copy link
Contributor Author

Doing some testing, and the repro in #25467 (not mine) is way simpler. It also explodes on 1.1 stable, with a similar complaint. Just boxing a trait with two associated types.

@ihrwein
Copy link
Contributor

ihrwein commented Aug 14, 2015

I run into this problem, too (with stable 1.2).

arielb1 added a commit to arielb1/rust that referenced this issue Sep 13, 2015
The sort key is a (DefId, Name), which is *not* stable between
runs, so we must re-sort when loading.

Fixes rust-lang#24063
Fixes rust-lang#25467
Fixes rust-lang#27222
Fixes rust-lang#28377
bors added a commit that referenced this issue Sep 14, 2015
The sort key is a (DefId, Name), which is *not* stable between
runs, so we must re-sort when loading.

Fixes #24063
Fixes #25467
Fixes #27222
Fixes #28377

r? @eddyb
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) ❄️
Projects
None yet
Development

No branches or pull requests

3 participants