Description
There is a second ICE once this one gets dealt with (I'll explain). I have some code checked in frankmcsherry/dataflow-join@03b82bc that has both a lib.rs
and a lib-fail.rs
. The two are basically the same except that the failing one uses associated types where the non-failing one doesn't.
It is a bit more complicated than that: there are trait objects of traits with both generic and associated types, and it seems (by commenting random things out) that if I need to end up with an associated type deep enough in some signature it goes sideways. Specifically, on line 91 of lib-fail.rs
there is an instantiation of a type that wants a closure which captures a PE::RoutingFunction
which implements Fn
with an associated type as a reference argument; once I was able to comment that out (and things like it) everything stopped breaking. Or, because I want my code to work too, I change things to using generic parameters, which is what I actually did.
Anyhow, if you swap lib-fail.rs
back in (and make the change to graph.rs
indicated in the commit, basically exchanging generic parameters for associated types), and point it at frankmcsherry/timely-dataflow@f80dae6, it blows up with the following ICE:
Note: next ICE follows after the wall of text.
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: unsized_fields.len() == 1', /Users/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-mac/build/src/librustc_trans/trans/common.rs:163
stack backtrace:
1: 0x106a0f4e7 - sys::backtrace::write::h068e87ba7a3fd301gQC
2: 0x106a3d6e3 - panicking::on_panic::h9e41b927365e32bamRI
3: 0x1069603de - rt::unwind::begin_unwind_inner::h3e325126f8078272XyI
4: 0x1033e0a2f - rt::unwind::begin_unwind::h11261789806849967335
5: 0x1034c4812 - trans::common::unsized_part_of_type::he20283836d8c7278fyk
6: 0x1034c46b9 - trans::common::unsized_part_of_type::he20283836d8c7278fyk
7: 0x1034c46b9 - trans::common::unsized_part_of_type::he20283836d8c7278fyk
8: 0x103495c05 - trans::type_of::in_memory_type_of::hdb9ea0b5b50d1503dRo
9: 0x103450f1f - trans::datum::rvalue_scratch_datum::h6159eb63601c0ac1Kmf
10: 0x103481d45 - trans::expr::trans_unadjusted::hcd769ff96a7057e9SXh
11: 0x103435db5 - trans::expr::trans::hb0430202c61993f1Alh
12: 0x10347005f - trans::callee::trans_args::h8911f65b82011b268Rg
13: 0x103478f25 - trans::callee::trans_call_inner::h11309187956010816983
14: 0x103482fd3 - trans::expr::trans_rvalue_dps_unadjusted::h95d4d9eada139b8dlti
15: 0x10343425c - trans::expr::trans_into::h708dad454f03ea40ffh
16: 0x1034331d2 - trans::controlflow::trans_stmt_semi::h6bfbf1021d5dc568K5d
17: 0x103435057 - trans::controlflow::trans_block::h2f4843422ff4f190G6d
18: 0x1035156f5 - trans::base::trans_closure::h0cf6b3d7454a8b60Ott
19: 0x10341c953 - trans::base::trans_fn::h433c7021f2906971xEt
20: 0x10341e30e - trans::monomorphize::monomorphic_fn::h3e749e73218f4787Ytd
21: 0x1034638c1 - trans::callee::trans_fn_ref_with_substs::h80310b0a5f68b440Ybg
22: 0x103461c97 - trans::callee::trans_fn_ref::hb55f5137d1250e1c1Zf
23: 0x103479fb8 - trans::meth::trans_method_callee::h5625c68437de4d7cGvy
24: 0x103477f72 - trans::callee::trans_call_inner::h11309187956010816983
25: 0x103482fd3 - trans::expr::trans_rvalue_dps_unadjusted::h95d4d9eada139b8dlti
26: 0x10343425c - trans::expr::trans_into::h708dad454f03ea40ffh
27: 0x1034331d2 - trans::controlflow::trans_stmt_semi::h6bfbf1021d5dc568K5d
28: 0x103435057 - trans::controlflow::trans_block::h2f4843422ff4f190G6d
29: 0x1035156f5 - trans::base::trans_closure::h0cf6b3d7454a8b60Ott
30: 0x10341c953 - trans::base::trans_fn::h433c7021f2906971xEt
31: 0x10341e30e - trans::monomorphize::monomorphic_fn::h3e749e73218f4787Ytd
32: 0x1034638c1 - trans::callee::trans_fn_ref_with_substs::h80310b0a5f68b440Ybg
33: 0x103461c97 - trans::callee::trans_fn_ref::hb55f5137d1250e1c1Zf
34: 0x103479fb8 - trans::meth::trans_method_callee::h5625c68437de4d7cGvy
35: 0x103477f72 - trans::callee::trans_call_inner::h11309187956010816983
36: 0x103482fd3 - trans::expr::trans_rvalue_dps_unadjusted::h95d4d9eada139b8dlti
37: 0x10343425c - trans::expr::trans_into::h708dad454f03ea40ffh
38: 0x1034331d2 - trans::controlflow::trans_stmt_semi::h6bfbf1021d5dc568K5d
39: 0x103435057 - trans::controlflow::trans_block::h2f4843422ff4f190G6d
40: 0x1035156f5 - trans::base::trans_closure::h0cf6b3d7454a8b60Ott
41: 0x10341c953 - trans::base::trans_fn::h433c7021f2906971xEt
42: 0x10341e30e - trans::monomorphize::monomorphic_fn::h3e749e73218f4787Ytd
43: 0x1034638c1 - trans::callee::trans_fn_ref_with_substs::h80310b0a5f68b440Ybg
44: 0x10347c571 - trans::meth::trans_method_callee::h5625c68437de4d7cGvy
45: 0x103477f72 - trans::callee::trans_call_inner::h11309187956010816983
46: 0x103482fd3 - trans::expr::trans_rvalue_dps_unadjusted::h95d4d9eada139b8dlti
47: 0x10343425c - trans::expr::trans_into::h708dad454f03ea40ffh
48: 0x1034353e0 - trans::controlflow::trans_block::h2f4843422ff4f190G6d
49: 0x1035156f5 - trans::base::trans_closure::h0cf6b3d7454a8b60Ott
50: 0x10341c953 - trans::base::trans_fn::h433c7021f2906971xEt
51: 0x10341e30e - trans::monomorphize::monomorphic_fn::h3e749e73218f4787Ytd
52: 0x1034638c1 - trans::callee::trans_fn_ref_with_substs::h80310b0a5f68b440Ybg
53: 0x10356b7c7 - trans::meth::emit_vtable_methods::closure.47252
54: 0x1035686e3 - vec::Vec<T>.FromIterator<T>::from_iter::h5504800654776193261
55: 0x103566b1e - trans::meth::emit_vtable_methods::h7c52945f4fd12f402lz
56: 0x103567cdc - iter::FlatMap<I, U, F>.Iterator::next::closure.47222
57: 0x1035678ca - iter::FlatMap<I, U, F>.Iterator::next::h17400211267097887576
58: 0x103567135 - vec::Vec<T>.FromIterator<T>::from_iter::h13188270094655222329
59: 0x10348cebf - trans::meth::get_vtable::h190496114235d879sfz
60: 0x1034883a9 - trans::expr::unsized_info::h4729815848908632564
61: 0x103493818 - trans::expr::apply_adjustments::apply_autoref::h020f2cc750f8852dXEh
62: 0x103493b05 - trans::expr::apply_adjustments::apply_autoref::h020f2cc750f8852dXEh
63: 0x103436777 - trans::expr::trans::hb0430202c61993f1Alh
64: 0x103433cf3 - trans::expr::trans_into::h708dad454f03ea40ffh
65: 0x10355c753 - trans::tvec::write_content::h83379c95de58f01c56x
66: 0x103483fab - trans::expr::trans_rvalue_dps_unadjusted::h95d4d9eada139b8dlti
67: 0x103481d70 - trans::expr::trans_unadjusted::hcd769ff96a7057e9SXh
68: 0x103435db5 - trans::expr::trans::hb0430202c61993f1Alh
69: 0x10347005f - trans::callee::trans_args::h8911f65b82011b268Rg
70: 0x103476f0c - trans::callee::trans_call_inner::h14040639794469394585
71: 0x103484410 - trans::expr::trans_rvalue_dps_unadjusted::h95d4d9eada139b8dlti
72: 0x103481d70 - trans::expr::trans_unadjusted::hcd769ff96a7057e9SXh
73: 0x103435db5 - trans::expr::trans::hb0430202c61993f1Alh
74: 0x10347005f - trans::callee::trans_args::h8911f65b82011b268Rg
75: 0x103476f0c - trans::callee::trans_call_inner::h14040639794469394585
76: 0x103484410 - trans::expr::trans_rvalue_dps_unadjusted::h95d4d9eada139b8dlti
77: 0x103481d70 - trans::expr::trans_unadjusted::hcd769ff96a7057e9SXh
78: 0x103435db5 - trans::expr::trans::hb0430202c61993f1Alh
79: 0x10347005f - trans::callee::trans_args::h8911f65b82011b268Rg
80: 0x103478f25 - trans::callee::trans_call_inner::h11309187956010816983
81: 0x103482fd3 - trans::expr::trans_rvalue_dps_unadjusted::h95d4d9eada139b8dlti
82: 0x103481d70 - trans::expr::trans_unadjusted::hcd769ff96a7057e9SXh
83: 0x103435db5 - trans::expr::trans::hb0430202c61993f1Alh
84: 0x10347005f - trans::callee::trans_args::h8911f65b82011b268Rg
85: 0x103478f25 - trans::callee::trans_call_inner::h11309187956010816983
86: 0x103482fd3 - trans::expr::trans_rvalue_dps_unadjusted::h95d4d9eada139b8dlti
87: 0x103481d70 - trans::expr::trans_unadjusted::hcd769ff96a7057e9SXh
88: 0x103435db5 - trans::expr::trans::hb0430202c61993f1Alh
89: 0x10347005f - trans::callee::trans_args::h8911f65b82011b268Rg
90: 0x103478f25 - trans::callee::trans_call_inner::h11309187956010816983
91: 0x103482fd3 - trans::expr::trans_rvalue_dps_unadjusted::h95d4d9eada139b8dlti
92: 0x103481d70 - trans::expr::trans_unadjusted::hcd769ff96a7057e9SXh
93: 0x103435db5 - trans::expr::trans::hb0430202c61993f1Alh
94: 0x10347005f - trans::callee::trans_args::h8911f65b82011b268Rg
95: 0x103478f25 - trans::callee::trans_call_inner::h11309187956010816983
96: 0x103482fd3 - trans::expr::trans_rvalue_dps_unadjusted::h95d4d9eada139b8dlti
97: 0x103481d70 - trans::expr::trans_unadjusted::hcd769ff96a7057e9SXh
98: 0x103435db5 - trans::expr::trans::hb0430202c61993f1Alh
99: 0x10347005f - trans::callee::trans_args::h8911f65b82011b268Rg
100: 0x103478f25 - trans::callee::trans_call_inner::h11309187956010816983
... <frames omitted>
Could not compile `dataflow_join`.
Ok, with that fixed (changing associated types to generic parameters), I return to getting an pervasive ICE: "assertion failed: bound_list_is_sorted(&bounds.projection_bounds)". This often goes away if I toggle the Cargo.toml
reference to timely
back and forth between the github reference and a local copy. The two are identical, so no clue a) why it is ICEing, and b) why switching the source makes a difference, unless there is some stale info around. cargo clean
occasionally does something helpful, but not always/usually.
Here is the stack track for this ICE:
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/nightly-dist-rustc-mac/build/src/librustc/middle/ty.rs:3086
stack backtrace:
1: 0x105d064e7 - sys::backtrace::write::h068e87ba7a3fd301gQC
2: 0x105d346e3 - panicking::on_panic::h9e41b927365e32bamRI
3: 0x105c573de - rt::unwind::begin_unwind_inner::h3e325126f8078272XyI
4: 0x102b7b06f - rt::unwind::begin_unwind::h18142434110191397644
5: 0x102cb5337 - middle::ty::mk_trait::hf265efcb420a3b6f1U4
6: 0x102fc2efd - metadata::tydecode::parse_ty_::h12984494504264143325
7: 0x102fc1f36 - metadata::tydecode::parse_ty_::h12984494504264143325
8: 0x102fc48e9 - metadata::tydecode::parse_substs_::h164952038861331308
9: 0x102fc2584 - metadata::tydecode::parse_ty_::h12984494504264143325
10: 0x102fc48e9 - metadata::tydecode::parse_substs_::h164952038861331308
11: 0x102fc2584 - metadata::tydecode::parse_ty_::h12984494504264143325
12: 0x102fc48e9 - metadata::tydecode::parse_substs_::h164952038861331308
13: 0x102fc2584 - metadata::tydecode::parse_ty_::h12984494504264143325
14: 0x102fcb0f0 - metadata::decoder::item_type::h422a2c9129d7c0fbgwj
15: 0x102f82a2f - metadata::csearch::get_field_type::h3685ffa1f4b7aac9uxm
16: 0x102f6caf0 - middle::ty::lookup_field_type::ha6182b496ddacd01Xl8
17: 0x102d3117d - middle::ty::struct_fields::hd41e71eaeda0bdb6So8
18: 0x102f29279 - middle::traits::select::SelectionContext<'cx, 'tcx>::builtin_bound::h28bee50c99158cacFFS
19: 0x102f2259c - middle::traits::select::SelectionContext<'cx, 'tcx>::assemble_builtin_bound_candidates::h5ebfd44a4205ec0aeCS
20: 0x102f1e902 - middle::traits::select::SelectionContext<'cx, 'tcx>::assemble_candidates::h42ecbd44acdebec9UKR
21: 0x102f102a6 - middle::traits::select::SelectionContext<'cx, 'tcx>::candidate_from_obligation::h7601a6375558af4fGoR
22: 0x102ee7e67 - middle::traits::select::SelectionContext<'cx, 'tcx>::select::h4308ab0148f80d45k2Q
23: 0x102ee4c31 - middle::traits::fulfill::FulfillmentContext<'tcx>::select::h4566136f5798ae339SO
24: 0x102ee4088 - middle::traits::fulfill::FulfillmentContext<'tcx>::select_where_possible::h3401b2d3699aa9c4nSO
25: 0x10227adb3 - check::vtable::select_fcx_obligations_where_possible::hb8449b42aa2cd6c1h4b
26: 0x1022b4e7d - check::FnCtxt<'a, 'tcx>::resolve_type_vars_if_possible::hbceed0814b682bbc5Wo
27: 0x10225d6ee - check::structurally_resolved_type::h2ed1f2aa0e9cbe853xt
28: 0x102359ee6 - check::check_expr_with_unifier::check_method_call::h8967eb975e89adb3GKq
29: 0x102396960 - check::check_expr_with_unifier::h1793502983115799515
30: 0x102359eaa - check::check_expr_with_unifier::check_method_call::h8967eb975e89adb3GKq
31: 0x102396960 - check::check_expr_with_unifier::h1793502983115799515
32: 0x102359eaa - check::check_expr_with_unifier::check_method_call::h8967eb975e89adb3GKq
33: 0x102396960 - check::check_expr_with_unifier::h1793502983115799515
34: 0x102359eaa - check::check_expr_with_unifier::check_method_call::h8967eb975e89adb3GKq
35: 0x102374ce8 - check::check_expr_with_unifier::h15650706090168307045
36: 0x10239fb52 - check::check_decl_local::h87dfc8bb7bf54208Ohs
37: 0x10233f151 - check::check_block_with_expected::h3495e166680091ffUns
38: 0x102375474 - check::check_expr_with_unifier::h15650706090168307045
39: 0x10239fb52 - check::check_decl_local::h87dfc8bb7bf54208Ohs
40: 0x10233f151 - check::check_block_with_expected::h3495e166680091ffUns
41: 0x10231b925 - check::check_fn::haec4bd43e243e5db0Zn
42: 0x102339dde - check::check_bare_fn::hc6530207ebf074c9zPn
43: 0x102333992 - check::check_item::hbb5b6624c725ed8ck8n
44: 0x102412216 - check_crate::closure.36498
45: 0x10240c7d7 - check_crate::hd17e4f7de7b6b6633uC
46: 0x10212a075 - driver::phase_3_run_analysis_passes::hb28527b471cd2978gGa
47: 0x10210e735 - driver::compile_input::h1ee53f4c8f23d375Qba
48: 0x1021cca35 - run_compiler::h3fb1865fd78b61ccS4b
49: 0x1021ca202 - boxed::F.FnBox<A>::call_box::h3921201771590575226
50: 0x1021c96f7 - rt::unwind::try::try_fn::h8360360423479336607
51: 0x105dbfc48 - rust_try_inner
52: 0x105dbfc35 - rust_try
53: 0x1021c99ea - boxed::F.FnBox<A>::call_box::h12609923642529369943
54: 0x105d1dbcd - sys::thread::create::thread_start::h463707e340c831653xH
55: 0x7fff98cbb267 - _pthread_body
56: 0x7fff98cbb1e4 - _pthread_start
Could not compile `dataflow_join`.
I basically get this ICE all the time (most days). I'm a bit mystified why I seem to run in to it but no one else does, so if you have any tips on a likely cause I'm all ears. Happy to work around while you sort through other issues, but I'd love to understand how to avoid this.