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

Nightly ICE with linux-raw-sys when using -Zthreads=0 #130089

Closed
nuudlman opened this issue Sep 7, 2024 · 8 comments · Fixed by #130094
Closed

Nightly ICE with linux-raw-sys when using -Zthreads=0 #130089

nuudlman opened this issue Sep 7, 2024 · 8 comments · Fixed by #130094
Labels
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. T-types Relevant to the types team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)

Comments

@nuudlman
Copy link

nuudlman commented Sep 7, 2024

Code

cargo new <something>
cd <something>
cargo add linux-raw-sys

After adding -Zthreads=0 to .cargo/config.toml, I get the ICE.

The resulting .cargo/config.toml:

[target.x86_64-unknown-linux-gnu]
rustflags = [ "-Zthreads=0"]

The full project: https://github.com/nuudlman/rustc-nightly-ice

Meta

rustc --version --verbose:

rustc 1.83.0-nightly (26b5599e4 2024-09-06)
binary: rustc
commit-hash: 26b5599e4d6ed2b45152c60493c1788c0a27533d
commit-date: 2024-09-06
host: x86_64-unknown-linux-gnu
release: 1.83.0-nightly
LLVM version: 19.1.0

Error output

 cargo b
   Compiling linux-raw-sys v0.6.5
thread 'rustc' panicked at /rustc/26b5599e4d6ed2b45152c60493c1788c0a27533d/compiler/rustc_type_ir/src/search_graph/global_cache.rs:62:13:
assertion failed: prev.is_none()
stack backtrace:
   0:     0x79aa89686d1a - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::h589e65cc8b61d31e
   1:     0x79aa89e038d7 - core::fmt::write::h85feaca529ba6ce1
   2:     0x79aa8b0b2ad1 - std::io::Write::write_fmt::hb87087d89092487e
   3:     0x79aa89686b72 - std::sys::backtrace::BacktraceLock::print::h4189ea7435230bb3
   4:     0x79aa89689091 - std::panicking::default_hook::{{closure}}::h88178407ef4f6ab9
   5:     0x79aa89688ec4 - std::panicking::default_hook::h3ccc334e12568011
   6:     0x79aa887a08ff - std[dbf153a3c4c7da75]::panicking::update_hook::<alloc[9dc6147f1f16c854]::boxed::Box<rustc_driver_impl[82dbab975e01e6e2]::install_ice_hook::{closure#0}>>::{closure#0}
   7:     0x79aa896897b8 - std::panicking::rust_panic_with_hook::h2fbc7848bd138bf1
   8:     0x79aa89689553 - std::panicking::begin_panic_handler::{{closure}}::hc439499884a4b219
   9:     0x79aa896871c9 - std::sys::backtrace::__rust_end_short_backtrace::hcc71b0742078f0c0
  10:     0x79aa89689254 - rust_begin_unwind
  11:     0x79aa8633d843 - core::panicking::panic_fmt::hbf678bbc126bd0af
  12:     0x79aa86687ddc - core::panicking::panic::he668b3d4a4f82e0d
  13:     0x79aa8aaae6ce - <rustc_type_ir[602c0c6c632b65bd]::search_graph::SearchGraph<rustc_next_trait_solver[4ce4681625c4863d]::solve::search_graph::SearchGraphDelegate<rustc_trait_selection[2f3767758f81a9b1]::solve::delegate::SolverDelegate>, rustc_middle[372178d4cf000e51]::ty::context::TyCtxt>>::insert_global_cache::{closure#0}
  14:     0x79aa8aaaf537 - <rustc_type_ir[602c0c6c632b65bd]::search_graph::SearchGraph<rustc_next_trait_solver[4ce4681625c4863d]::solve::search_graph::SearchGraphDelegate<rustc_trait_selection[2f3767758f81a9b1]::solve::delegate::SolverDelegate>, rustc_middle[372178d4cf000e51]::ty::context::TyCtxt>>::with_new_goal::<<rustc_next_trait_solver[4ce4681625c4863d]::solve::eval_ctxt::EvalCtxt<rustc_trait_selection[2f3767758f81a9b1]::solve::delegate::SolverDelegate, rustc_middle[372178d4cf000e51]::ty::context::TyCtxt>>::evaluate_canonical_goal::{closure#0}::{closure#0}::{closure#0}>
  15:     0x79aa8aab551a - <rustc_next_trait_solver[4ce4681625c4863d]::solve::eval_ctxt::EvalCtxt<rustc_trait_selection[2f3767758f81a9b1]::solve::delegate::SolverDelegate, rustc_middle[372178d4cf000e51]::ty::context::TyCtxt>>::evaluate_goal_raw
  16:     0x79aa8aab3ba5 - <rustc_trait_selection[2f3767758f81a9b1]::solve::fulfill::FulfillmentCtxt<rustc_trait_selection[2f3767758f81a9b1]::traits::FulfillmentError> as rustc_infer[40680c918449f221]::traits::engine::TraitEngine<rustc_trait_selection[2f3767758f81a9b1]::traits::FulfillmentError>>::select_where_possible
  17:     0x79aa8aab36f9 - <rustc_trait_selection[2f3767758f81a9b1]::solve::fulfill::FulfillmentCtxt<rustc_trait_selection[2f3767758f81a9b1]::traits::FulfillmentError> as rustc_infer[40680c918449f221]::traits::engine::TraitEngine<rustc_trait_selection[2f3767758f81a9b1]::traits::FulfillmentError>>::select_all_or_error
  18:     0x79aa8a6ae92d - rustc_trait_selection[2f3767758f81a9b1]::traits::coherence::overlap
  19:     0x79aa87072608 - <rustc_middle[372178d4cf000e51]::traits::specialization_graph::Children as rustc_trait_selection[2f3767758f81a9b1]::traits::specialize::specialization_graph::ChildrenExt>::insert
  20:     0x79aa8706fc82 - <rustc_middle[372178d4cf000e51]::traits::specialization_graph::Graph as rustc_trait_selection[2f3767758f81a9b1]::traits::specialize::specialization_graph::GraphExt>::insert
  21:     0x79aa8a117a34 - rustc_trait_selection[2f3767758f81a9b1]::traits::specialize::specialization_graph_provider
  22:     0x79aa8a1173a5 - rustc_query_impl[81d3791697797469]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[81d3791697797469]::query_impl::specialization_graph_of::dynamic_query::{closure#2}::{closure#0}, rustc_middle[372178d4cf000e51]::query::erase::Erased<[u8; 8usize]>>
  23:     0x79aa89e20272 - rustc_query_system[e501ed6d95406675]::query::plumbing::try_execute_query::<rustc_query_impl[81d3791697797469]::DynamicConfig<rustc_query_system[e501ed6d95406675]::query::caches::DefIdCache<rustc_middle[372178d4cf000e51]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[81d3791697797469]::plumbing::QueryCtxt, false>
  24:     0x79aa8a34f336 - rustc_query_impl[81d3791697797469]::query_impl::specialization_graph_of::get_query_non_incr::__rust_end_short_backtrace
  25:     0x79aa8aa74243 - rustc_hir_analysis[3980d319edb0dbc9]::coherence::coherent_trait
  26:     0x79aa8aa73f55 - rustc_query_impl[81d3791697797469]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[81d3791697797469]::query_impl::coherent_trait::dynamic_query::{closure#2}::{closure#0}, rustc_middle[372178d4cf000e51]::query::erase::Erased<[u8; 1usize]>>
  27:     0x79aa8a438b12 - rustc_query_system[e501ed6d95406675]::query::plumbing::try_execute_query::<rustc_query_impl[81d3791697797469]::DynamicConfig<rustc_query_system[e501ed6d95406675]::query::caches::DefIdCache<rustc_middle[372178d4cf000e51]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[81d3791697797469]::plumbing::QueryCtxt, false>
  28:     0x79aa8a4378e3 - rustc_query_impl[81d3791697797469]::query_impl::coherent_trait::get_query_non_incr::__rust_end_short_backtrace
  29:     0x79aa87617595 - rustc_hir_analysis[3980d319edb0dbc9]::check::wfcheck::check_well_formed
  30:     0x79aa8a1cfb27 - rustc_query_impl[81d3791697797469]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[81d3791697797469]::query_impl::check_well_formed::dynamic_query::{closure#2}::{closure#0}, rustc_middle[372178d4cf000e51]::query::erase::Erased<[u8; 1usize]>>
  31:     0x79aa8a1cfdb4 - rustc_query_system[e501ed6d95406675]::query::plumbing::try_execute_query::<rustc_query_impl[81d3791697797469]::DynamicConfig<rustc_query_system[e501ed6d95406675]::query::caches::VecCache<rustc_hir[aef0ef93fa31412]::hir_id::OwnerId, rustc_middle[372178d4cf000e51]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[81d3791697797469]::plumbing::QueryCtxt, false>
  32:     0x79aa8a1cfb06 - rustc_query_impl[81d3791697797469]::query_impl::check_well_formed::get_query_non_incr::__rust_end_short_backtrace
  33:     0x79aa8a1cfa53 - rustc_middle[372178d4cf000e51]::query::plumbing::query_ensure_error_guaranteed::<rustc_query_system[e501ed6d95406675]::query::caches::VecCache<rustc_hir[aef0ef93fa31412]::hir_id::OwnerId, rustc_middle[372178d4cf000e51]::query::erase::Erased<[u8; 1usize]>>, ()>
  34:     0x79aa888a1119 - rayon[417c9448959795c5]::iter::plumbing::bridge_producer_consumer::helper::<rayon[417c9448959795c5]::slice::IterProducer<rustc_hir[aef0ef93fa31412]::hir::ItemId>, rayon[417c9448959795c5]::iter::filter_map::FilterMapConsumer<rayon[417c9448959795c5]::iter::reduce::ReduceConsumer<<core[3eb17ea5b3171a49]::result::Result<(), rustc_span[6380c2f0c7870d7a]::ErrorGuaranteed>>::and<()>, rustc_data_structures[1403dbc241404277]::sync::parallel::enabled::try_par_for_each_in<&[rustc_hir[aef0ef93fa31412]::hir::ItemId], rustc_span[6380c2f0c7870d7a]::ErrorGuaranteed, <rustc_middle[372178d4cf000e51]::hir::ModuleItems>::par_items<rustc_hir_analysis[3980d319edb0dbc9]::check::wfcheck::check_mod_type_wf::{closure#0}>::{closure#0}>::{closure#0}::{closure#1}>, rustc_data_structures[1403dbc241404277]::sync::parallel::enabled::try_par_for_each_in<&[rustc_hir[aef0ef93fa31412]::hir::ItemId], rustc_span[6380c2f0c7870d7a]::ErrorGuaranteed, <rustc_middle[372178d4cf000e51]::hir::ModuleItems>::par_items<rustc_hir_analysis[3980d319edb0dbc9]::check::wfcheck::check_mod_type_wf::{closure#0}>::{closure#0}>::{closure#0}::{closure#0}>>
  35:     0x79aa888c900f - rayon_core[5866a558fa7823cf]::join::join_context::<rayon[417c9448959795c5]::iter::plumbing::bridge_producer_consumer::helper<rayon[417c9448959795c5]::slice::IterProducer<rustc_hir[aef0ef93fa31412]::hir::ItemId>, rayon[417c9448959795c5]::iter::filter_map::FilterMapConsumer<rayon[417c9448959795c5]::iter::reduce::ReduceConsumer<<core[3eb17ea5b3171a49]::result::Result<(), rustc_span[6380c2f0c7870d7a]::ErrorGuaranteed>>::and<()>, rustc_data_structures[1403dbc241404277]::sync::parallel::enabled::try_par_for_each_in<&[rustc_hir[aef0ef93fa31412]::hir::ItemId], rustc_span[6380c2f0c7870d7a]::ErrorGuaranteed, <rustc_middle[372178d4cf000e51]::hir::ModuleItems>::par_items<rustc_hir_analysis[3980d319edb0dbc9]::check::wfcheck::check_mod_type_wf::{closure#0}>::{closure#0}>::{closure#0}::{closure#1}>, rustc_data_structures[1403dbc241404277]::sync::parallel::enabled::try_par_for_each_in<&[rustc_hir[aef0ef93fa31412]::hir::ItemId], rustc_span[6380c2f0c7870d7a]::ErrorGuaranteed, <rustc_middle[372178d4cf000e51]::hir::ModuleItems>::par_items<rustc_hir_analysis[3980d319edb0dbc9]::check::wfcheck::check_mod_type_wf::{closure#0}>::{closure#0}>::{closure#0}::{closure#0}>>::{closure#0}, rayon[417c9448959795c5]::iter::plumbing::bridge_producer_consumer::helper<rayon[417c9448959795c5]::slice::IterProducer<rustc_hir[aef0ef93fa31412]::hir::ItemId>, rayon[417c9448959795c5]::iter::filter_map::FilterMapConsumer<rayon[417c9448959795c5]::iter::reduce::ReduceConsumer<<core[3eb17ea5b3171a49]::result::Result<(), rustc_span[6380c2f0c7870d7a]::ErrorGuaranteed>>::and<()>, rustc_data_structures[1403dbc241404277]::sync::parallel::enabled::try_par_for_each_in<&[rustc_hir[aef0ef93fa31412]::hir::ItemId], rustc_span[6380c2f0c7870d7a]::ErrorGuaranteed, <rustc_middle[372178d4cf000e51]::hir::ModuleItems>::par_items<rustc_hir_analysis[3980d319edb0dbc9]::check::wfcheck::check_mod_type_wf::{closure#0}>::{closure#0}>::{closure#0}::{closure#1}>, rustc_data_structures[1403dbc241404277]::sync::parallel::enabled::try_par_for_each_in<&[rustc_hir[aef0ef93fa31412]::hir::ItemId], rustc_span[6380c2f0c7870d7a]::ErrorGuaranteed, <rustc_middle[372178d4cf000e51]::hir::ModuleItems>::par_items<rustc_hir_analysis[3980d319edb0dbc9]::check::wfcheck::check_mod_type_wf::{closure#0}>::{closure#0}>::{closure#0}::{closure#0}>>::{closure#1}, core[3eb17ea5b3171a49]::result::Result<(), rustc_span[6380c2f0c7870d7a]::ErrorGuaranteed>, core[3eb17ea5b3171a49]::result::Result<(), rustc_span[6380c2f0c7870d7a]::ErrorGuaranteed>>::{closure#0}
  36:     0x79aa888a132c - rayon[417c9448959795c5]::iter::plumbing::bridge_producer_consumer::helper::<rayon[417c9448959795c5]::slice::IterProducer<rustc_hir[aef0ef93fa31412]::hir::ItemId>, rayon[417c9448959795c5]::iter::filter_map::FilterMapConsumer<rayon[417c9448959795c5]::iter::reduce::ReduceConsumer<<core[3eb17ea5b3171a49]::result::Result<(), rustc_span[6380c2f0c7870d7a]::ErrorGuaranteed>>::and<()>, rustc_data_structures[1403dbc241404277]::sync::parallel::enabled::try_par_for_each_in<&[rustc_hir[aef0ef93fa31412]::hir::ItemId], rustc_span[6380c2f0c7870d7a]::ErrorGuaranteed, <rustc_middle[372178d4cf000e51]::hir::ModuleItems>::par_items<rustc_hir_analysis[3980d319edb0dbc9]::check::wfcheck::check_mod_type_wf::{closure#0}>::{closure#0}>::{closure#0}::{closure#1}>, rustc_data_structures[1403dbc241404277]::sync::parallel::enabled::try_par_for_each_in<&[rustc_hir[aef0ef93fa31412]::hir::ItemId], rustc_span[6380c2f0c7870d7a]::ErrorGuaranteed, <rustc_middle[372178d4cf000e51]::hir::ModuleItems>::par_items<rustc_hir_analysis[3980d319edb0dbc9]::check::wfcheck::check_mod_type_wf::{closure#0}>::{closure#0}>::{closure#0}::{closure#0}>>
  37:     0x79aa888c900f - rayon_core[5866a558fa7823cf]::join::join_context::<rayon[417c9448959795c5]::iter::plumbing::bridge_producer_consumer::helper<rayon[417c9448959795c5]::slice::IterProducer<rustc_hir[aef0ef93fa31412]::hir::ItemId>, rayon[417c9448959795c5]::iter::filter_map::FilterMapConsumer<rayon[417c9448959795c5]::iter::reduce::ReduceConsumer<<core[3eb17ea5b3171a49]::result::Result<(), rustc_span[6380c2f0c7870d7a]::ErrorGuaranteed>>::and<()>, rustc_data_structures[1403dbc241404277]::sync::parallel::enabled::try_par_for_each_in<&[rustc_hir[aef0ef93fa31412]::hir::ItemId], rustc_span[6380c2f0c7870d7a]::ErrorGuaranteed, <rustc_middle[372178d4cf000e51]::hir::ModuleItems>::par_items<rustc_hir_analysis[3980d319edb0dbc9]::check::wfcheck::check_mod_type_wf::{closure#0}>::{closure#0}>::{closure#0}::{closure#1}>, rustc_data_structures[1403dbc241404277]::sync::parallel::enabled::try_par_for_each_in<&[rustc_hir[aef0ef93fa31412]::hir::ItemId], rustc_span[6380c2f0c7870d7a]::ErrorGuaranteed, <rustc_middle[372178d4cf000e51]::hir::ModuleItems>::par_items<rustc_hir_analysis[3980d319edb0dbc9]::check::wfcheck::check_mod_type_wf::{closure#0}>::{closure#0}>::{closure#0}::{closure#0}>>::{closure#0}, rayon[417c9448959795c5]::iter::plumbing::bridge_producer_consumer::helper<rayon[417c9448959795c5]::slice::IterProducer<rustc_hir[aef0ef93fa31412]::hir::ItemId>, rayon[417c9448959795c5]::iter::filter_map::FilterMapConsumer<rayon[417c9448959795c5]::iter::reduce::ReduceConsumer<<core[3eb17ea5b3171a49]::result::Result<(), rustc_span[6380c2f0c7870d7a]::ErrorGuaranteed>>::and<()>, rustc_data_structures[1403dbc241404277]::sync::parallel::enabled::try_par_for_each_in<&[rustc_hir[aef0ef93fa31412]::hir::ItemId], rustc_span[6380c2f0c7870d7a]::ErrorGuaranteed, <rustc_middle[372178d4cf000e51]::hir::ModuleItems>::par_items<rustc_hir_analysis[3980d319edb0dbc9]::check::wfcheck::check_mod_type_wf::{closure#0}>::{closure#0}>::{closure#0}::{closure#1}>, rustc_data_structures[1403dbc241404277]::sync::parallel::enabled::try_par_for_each_in<&[rustc_hir[aef0ef93fa31412]::hir::ItemId], rustc_span[6380c2f0c7870d7a]::ErrorGuaranteed, <rustc_middle[372178d4cf000e51]::hir::ModuleItems>::par_items<rustc_hir_analysis[3980d319edb0dbc9]::check::wfcheck::check_mod_type_wf::{closure#0}>::{closure#0}>::{closure#0}::{closure#0}>>::{closure#1}, core[3eb17ea5b3171a49]::result::Result<(), rustc_span[6380c2f0c7870d7a]::ErrorGuaranteed>, core[3eb17ea5b3171a49]::result::Result<(), rustc_span[6380c2f0c7870d7a]::ErrorGuaranteed>>::{closure#0}
  38:     0x79aa888a132c - rayon[417c9448959795c5]::iter::plumbing::bridge_producer_consumer::helper::<rayon[417c9448959795c5]::slice::IterProducer<rustc_hir[aef0ef93fa31412]::hir::ItemId>, rayon[417c9448959795c5]::iter::filter_map::FilterMapConsumer<rayon[417c9448959795c5]::iter::reduce::ReduceConsumer<<core[3eb17ea5b3171a49]::result::Result<(), rustc_span[6380c2f0c7870d7a]::ErrorGuaranteed>>::and<()>, rustc_data_structures[1403dbc241404277]::sync::parallel::enabled::try_par_for_each_in<&[rustc_hir[aef0ef93fa31412]::hir::ItemId], rustc_span[6380c2f0c7870d7a]::ErrorGuaranteed, <rustc_middle[372178d4cf000e51]::hir::ModuleItems>::par_items<rustc_hir_analysis[3980d319edb0dbc9]::check::wfcheck::check_mod_type_wf::{closure#0}>::{closure#0}>::{closure#0}::{closure#1}>, rustc_data_structures[1403dbc241404277]::sync::parallel::enabled::try_par_for_each_in<&[rustc_hir[aef0ef93fa31412]::hir::ItemId], rustc_span[6380c2f0c7870d7a]::ErrorGuaranteed, <rustc_middle[372178d4cf000e51]::hir::ModuleItems>::par_items<rustc_hir_analysis[3980d319edb0dbc9]::check::wfcheck::check_mod_type_wf::{closure#0}>::{closure#0}>::{closure#0}::{closure#0}>>
  39:     0x79aa888fde02 - <rayon_core[5866a558fa7823cf]::job::StackJob<rayon_core[5866a558fa7823cf]::latch::SpinLatch, rayon_core[5866a558fa7823cf]::join::join_context::call_b<core[3eb17ea5b3171a49]::result::Result<(), rustc_span[6380c2f0c7870d7a]::ErrorGuaranteed>, rayon[417c9448959795c5]::iter::plumbing::bridge_producer_consumer::helper<rayon[417c9448959795c5]::slice::IterProducer<rustc_hir[aef0ef93fa31412]::hir::ItemId>, rayon[417c9448959795c5]::iter::filter_map::FilterMapConsumer<rayon[417c9448959795c5]::iter::reduce::ReduceConsumer<<core[3eb17ea5b3171a49]::result::Result<(), rustc_span[6380c2f0c7870d7a]::ErrorGuaranteed>>::and<()>, rustc_data_structures[1403dbc241404277]::sync::parallel::enabled::try_par_for_each_in<&[rustc_hir[aef0ef93fa31412]::hir::ItemId], rustc_span[6380c2f0c7870d7a]::ErrorGuaranteed, <rustc_middle[372178d4cf000e51]::hir::ModuleItems>::par_items<rustc_hir_analysis[3980d319edb0dbc9]::check::wfcheck::check_mod_type_wf::{closure#0}>::{closure#0}>::{closure#0}::{closure#1}>, rustc_data_structures[1403dbc241404277]::sync::parallel::enabled::try_par_for_each_in<&[rustc_hir[aef0ef93fa31412]::hir::ItemId], rustc_span[6380c2f0c7870d7a]::ErrorGuaranteed, <rustc_middle[372178d4cf000e51]::hir::ModuleItems>::par_items<rustc_hir_analysis[3980d319edb0dbc9]::check::wfcheck::check_mod_type_wf::{closure#0}>::{closure#0}>::{closure#0}::{closure#0}>>::{closure#1}>::{closure#0}, core[3eb17ea5b3171a49]::result::Result<(), rustc_span[6380c2f0c7870d7a]::ErrorGuaranteed>> as rayon_core[5866a558fa7823cf]::job::Job>::execute
  40:     0x79aa882be20e - <rayon_core[5866a558fa7823cf]::registry::WorkerThread>::wait_until_cold
  41:     0x79aa882bbd99 - <rayon_core[5866a558fa7823cf]::registry::ThreadBuilder>::run
  42:     0x79aa887a2c27 - <<crossbeam_utils[2a79a005c364b520]::thread::ScopedThreadBuilder>::spawn<<rayon_core[5866a558fa7823cf]::ThreadPoolBuilder>::build_scoped<rustc_interface[9e43cd91206122fc]::util::run_in_thread_pool_with_globals<rustc_interface[9e43cd91206122fc]::interface::run_compiler<core[3eb17ea5b3171a49]::result::Result<(), rustc_span[6380c2f0c7870d7a]::ErrorGuaranteed>, rustc_driver_impl[82dbab975e01e6e2]::run_compiler::{closure#0}>::{closure#1}, core[3eb17ea5b3171a49]::result::Result<(), rustc_span[6380c2f0c7870d7a]::ErrorGuaranteed>>::{closure#3}::{closure#0}::{closure#0}, rustc_interface[9e43cd91206122fc]::util::run_in_thread_pool_with_globals<rustc_interface[9e43cd91206122fc]::interface::run_compiler<core[3eb17ea5b3171a49]::result::Result<(), rustc_span[6380c2f0c7870d7a]::ErrorGuaranteed>, rustc_driver_impl[82dbab975e01e6e2]::run_compiler::{closure#0}>::{closure#1}, core[3eb17ea5b3171a49]::result::Result<(), rustc_span[6380c2f0c7870d7a]::ErrorGuaranteed>>::{closure#3}::{closure#0}::{closure#1}, core[3eb17ea5b3171a49]::result::Result<(), rustc_span[6380c2f0c7870d7a]::ErrorGuaranteed>>::{closure#0}::{closure#0}::{closure#0}, ()>::{closure#0} as core[3eb17ea5b3171a49]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  43:     0x79aa887976ee - std[dbf153a3c4c7da75]::sys::backtrace::__rust_begin_short_backtrace::<alloc[9dc6147f1f16c854]::boxed::Box<dyn core[3eb17ea5b3171a49]::ops::function::FnOnce<(), Output = ()> + core[3eb17ea5b3171a49]::marker::Send>, ()>
  44:     0x79aa887a28ca - <<std[dbf153a3c4c7da75]::thread::Builder>::spawn_unchecked_<alloc[9dc6147f1f16c854]::boxed::Box<dyn core[3eb17ea5b3171a49]::ops::function::FnOnce<(), Output = ()> + core[3eb17ea5b3171a49]::marker::Send>, ()>::{closure#1} as core[3eb17ea5b3171a49]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  45:     0x79aa8ac892eb - std::sys::pal::unix::thread::Thread::new::thread_start::h2c6608fdb287f01f
  46:     0x79aa8c409386 - <unknown>
  47:     0x79aa8c48ab0c - <unknown>
  48:                0x0 - <unknown>

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

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: please make sure that you have updated to the latest nightly

note: please attach the file at `/home/isaac/.cargo/registry/src/index.crates.io-6f17d22bba15001f/linux-raw-sys-0.6.5/rustc-ice-2024-09-07T19_55_30-171727.txt` to your bug report

note: compiler flags: --crate-type lib -C embed-bitcode=no -C debuginfo=2 -Z threads=0

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

query stack during panic:
#0 [specialization_graph_of] building specialization graph of trait `core::cmp::Eq`
#1 [coherent_trait] coherence checking all impls of trait `core::cmp::Eq`
end of query stack
error: could not compile `linux-raw-sys` (lib)

Caused by:
  process didn't exit successfully: `/home/isaac/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/rustc --crate-name linux_raw_sys --edition=2021 /home/isaac/.cargo/registry/src/index.crates.io-6f17d22bba15001f/linux-raw-sys-0.6.5/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=100 --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debuginfo=2 --warn=unexpected_cfgs --cfg 'feature="default"' --cfg 'feature="errno"' --cfg 'feature="general"' --cfg 'feature="std"' --check-cfg 'cfg(docsrs)' --check-cfg 'cfg(feature, values("bootparam", "compiler_builtins", "core", "default", "elf", "errno", "general", "if_arp", "if_ether", "if_packet", "io_uring", "ioctl", "loop_device", "mempolicy", "net", "netlink", "no_std", "prctl", "rustc-dep-of-std", "std", "system", "xdp"))' --check-cfg 'cfg(target_arch, values("xtensa"))' -C metadata=d92bffb7b181fb71 -C extra-filename=-d92bffb7b181fb71 --out-dir /home/isaac/Work/rust_nightly_ice_repro/target/debug/deps -L dependency=/home/isaac/Work/rust_nightly_ice_repro/target/debug/deps --cap-lints allow -Zthreads=0` (exit status: 101)

rustc-ice-2024-09-07T19_55_30-171727.txt

rustc-ice-2024-09-07T19_55_30-171727.txt

@nuudlman nuudlman added 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. labels Sep 7, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Sep 7, 2024
@workingjubilee
Copy link
Member

Looks like another #121848

@rustbot label: +T-types +WG-trait-system-refactor +regression-from-stable-to-nightly

@rustbot rustbot added regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. T-types Relevant to the types team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) I-prioritize Issue: Indicates that prioritization has been requested for this issue. labels Sep 7, 2024
@workingjubilee
Copy link
Member

workingjubilee commented Sep 7, 2024

Stable passes, beta passes.

Nightly passes with either

[target.x86_64-unknown-linux-gnu]
rustflags = [ "-Zthreads=1"]

or

[target.x86_64-unknown-linux-gnu]
rustflags = [ "-Zthreads=2"]

Discovered with

for i in {0..100}; do
    cargo clean
    cargo +nightly build
done

It does sporadically succeed, thus needing to clean and rerun the build to make sure. Either something is up with -Zthreads=2 or it only barely exercises these conditions in the parallel frontend, even after cleaning and running the build 100 times. Meanwhile, -Zthreads=3 fails something like ~50% of the time on my machine.

@matthiaskrgr
Copy link
Member

matthiaskrgr commented Sep 7, 2024

stable passes

obviously, as -Zthreads this is a unstable nightly-only flag?

@matthiaskrgr matthiaskrgr removed the regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. label Sep 7, 2024
@Noratrieb Noratrieb removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Sep 7, 2024
@workingjubilee
Copy link
Member

stable passes

obviously, as -Zthreads this is a unstable nightly-only flag?

Hm, not actually obvious given that RUSTC_BOOTSTRAP=1 works, though I suppose that does mean it isn't a regression per se. :^)

@workingjubilee workingjubilee removed the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label Sep 8, 2024
@matthiaskrgr
Copy link
Member

oh I thought you knew by now that this is the forbidden env flag that should only ever be used for bootstrapping and nothing else and we should not even tell users about it.

If you set the flag, your "stable" will also eat nightly-only features, but why would that make a "to-stable" regression if you explicitly tell the compiler "please act like you are NOT a stable release"?

I don't think it make sense to backport fixes for untable nightly features into stable lol

@workingjubilee
Copy link
Member

who mentioned backports?

@matthiaskrgr
Copy link
Member

The label is used to gather regressions between release channels, which are then discussed whether they are backport-worthy or not. Is that not how the label is used? 🤔

@workingjubilee
Copy link
Member

I don't really think regression-from-stable-to-nightly nor regression-from-stable-to-stable are used for that at all? Probably regression-from-stable-to-beta is?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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. T-types Relevant to the types team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants