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 fails to compile complicated uom code that reaches out on num_trait's libm feature #102702

Open
wucke13 opened this issue Oct 5, 2022 · 1 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.

Comments

@wucke13
Copy link

wucke13 commented Oct 5, 2022

Code

Running this command on wucke13/uom@7dce87a yields a whole lot of errors. Throughout multiple rust versions we encountered hard to debug problems over in iliekturtles/uom#309 which we suspected to be related to unwanted recursion. Today I gave it another shot with a nightly compiler and got a different result, this time not a stack overflow of the test but directly ICE during compilation. While on stable there is no ICE, I'm still puzzled as to why the code overflows when successfully compiled -- but that is another issue.

cargo test --verbose --no-default-features --features "autoconvert f32 si use_serde libm" -- --test-threads=1

I'm sorry, I have absolutely no clue how to minimize this, but here is the code: wucke13/uom@7dce87a

Meta

rustc --version --verbose:

rustc 1.66.0-nightly (57f097ea2 2022-10-01)

Error output

$ cargo test --verbose --no-default-features --features "autoconvert f32 si use_serde libm" -- --test-threads=1
       Fresh cfg-if v1.0.0
       Fresh autocfg v1.1.0
       Fresh memchr v2.5.0
       Fresh libc v0.2.126
       Fresh aho-corasick v0.7.18
       Fresh libm v0.2.2
       Fresh regex-syntax v0.6.26
       Fresh ryu v1.0.10
       Fresh itoa v1.0.2
       Fresh static_assertions v1.1.0
       Fresh getrandom v0.2.6
       Fresh regex v1.5.6
       Fresh num-traits v0.2.15
       Fresh serde v1.0.137
       Fresh rand_core v0.6.3
       Fresh log v0.4.17
       Fresh typenum v1.15.0
       Fresh approx v0.5.1
       Fresh rand v0.8.5
       Fresh env_logger v0.8.4
       Fresh serde_json v1.0.81
       Fresh quickcheck v1.0.3
   Compiling uom v0.33.0 (/home/wucke13/documents/projects/rust/uom)
     Running `rustc --crate-name uom --edition=2018 src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --emit=dep-info,link -C embed-bitcode=no -C debuginfo=2 --test --cfg 'feature="autoconvert"' --cfg 'feature="f32"' --cfg 'feature="libm"' --cfg 'feature="serde"' --cfg 'feature="si"' --cfg 'feature="use_serde"' -C metadata=b8fcebefe5e342ac -C extra-filename=-b8fcebefe5e342ac --out-dir /home/wucke13/documents/projects/rust/uom/target/debug/deps -C incremental=/home/wucke13/documents/projects/rust/uom/target/debug/incremental -L dependency=/home/wucke13/documents/projects/rust/uom/target/debug/deps --extern approx=/home/wucke13/documents/projects/rust/uom/target/debug/deps/libapprox-df0c75ecf4aa6dd6.rlib --extern num_traits=/home/wucke13/documents/projects/rust/uom/target/debug/deps/libnum_traits-a1c0388eb46c8724.rlib --extern quickcheck=/home/wucke13/documents/projects/rust/uom/target/debug/deps/libquickcheck-c870dae87a1ba66f.rlib --extern serde=/home/wucke13/documents/projects/rust/uom/target/debug/deps/libserde-3064340d0e7a5ddd.rlib --extern serde_json=/home/wucke13/documents/projects/rust/uom/target/debug/deps/libserde_json-61a82ca4ca73b0c1.rlib --extern static_assertions=/home/wucke13/documents/projects/rust/uom/target/debug/deps/libstatic_assertions-c94e2eb84119cf0b.rlib --extern typenum=/home/wucke13/documents/projects/rust/uom/target/debug/deps/libtypenum-ae91be759e5f8db3.rlib`
error: internal compiler error: no warnings or errors encountered even though `delayed_good_path_bugs` issued

error: internal compiler error: trimmed_def_paths constructed
  |
  = note: delayed at    0: <rustc_errors::Handler>::delay_good_path_bug::<&str>
             1: rustc_middle::ty::print::pretty::trimmed_def_paths
             2: <rustc_middle::dep_graph::dep_node::DepKind as rustc_query_system::dep_graph::DepKind>::with_deps::<<rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::with_task_impl<rustc_middle::ty::context::TyCtxt, (), std::collections::hash::map::HashMap<rustc_span::def_id::DefId, rustc_span::symbol::Symbol, core::hash::BuildHasherDefault<rustc_hash::FxHasher>>>::{closure#0}, std::collections::hash::map::HashMap<rustc_span::def_id::DefId, rustc_span::symbol::Symbol, core::hash::BuildHasherDefault<rustc_hash::FxHasher>>>
             3: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle::ty::context::TyCtxt, (), std::collections::hash::map::HashMap<rustc_span::def_id::DefId, rustc_span::symbol::Symbol, core::hash::BuildHasherDefault<rustc_hash::FxHasher>>>
             4: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::plumbing::QueryCtxt, rustc_query_system::query::caches::ArenaCache<(), std::collections::hash::map::HashMap<rustc_span::def_id::DefId, rustc_span::symbol::Symbol, core::hash::BuildHasherDefault<rustc_hash::FxHasher>>>>
             5: rustc_query_system::query::plumbing::force_query::<rustc_query_impl::queries::trimmed_def_paths, rustc_query_impl::plumbing::QueryCtxt>
             6: rustc_query_impl::plumbing::force_from_dep_node::<rustc_query_impl::queries::trimmed_def_paths>
             7: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::try_mark_previous_green::<rustc_query_impl::plumbing::QueryCtxt>
             8: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::try_mark_previous_green::<rustc_query_impl::plumbing::QueryCtxt>
             9: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::try_mark_green::<rustc_query_impl::plumbing::QueryCtxt>
            10: rustc_query_system::query::plumbing::try_load_from_disk_and_cache_in_memory::<rustc_query_impl::plumbing::QueryCtxt, (), ()>
            11: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::plumbing::QueryCtxt, rustc_query_system::query::caches::DefaultCache<(), ()>>
            12: rustc_query_system::query::plumbing::get_query::<rustc_query_impl::queries::typeck_item_bodies, rustc_query_impl::plumbing::QueryCtxt>
            13: <rustc_session::session::Session>::time::<(), rustc_hir_analysis::check_crate::{closure#7}>
            14: rustc_hir_analysis::check_crate
            15: rustc_interface::passes::analysis
            16: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle::ty::context::TyCtxt, (), core::result::Result<(), rustc_errors::ErrorGuaranteed>>
            17: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::plumbing::QueryCtxt, rustc_query_system::query::caches::DefaultCache<(), core::result::Result<(), rustc_errors::ErrorGuaranteed>>>
            18: rustc_query_system::query::plumbing::get_query::<rustc_query_impl::queries::analysis, rustc_query_impl::plumbing::QueryCtxt>
            19: <rustc_interface::passes::QueryContext>::enter::<rustc_driver::run_compiler::{closure#1}::{closure#2}::{closure#3}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>
            20: rustc_interface::interface::create_compiler_and_run::<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>
            21: <scoped_tls::ScopedKey<rustc_span::SessionGlobals>>::set::<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>
            22: std::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>
            23: <<std::thread::Builder>::spawn_unchecked_<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
            24: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
                       at /rustc/57f097ea25f2c05f424fc9b9dc50dbd6d399845c/library/alloc/src/boxed.rs:1938:9
            25: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
                       at /rustc/57f097ea25f2c05f424fc9b9dc50dbd6d399845c/library/alloc/src/boxed.rs:1938:9
            26: std::sys::unix::thread::Thread::new::thread_start
                       at /rustc/57f097ea25f2c05f424fc9b9dc50dbd6d399845c/library/std/src/sys/unix/thread.rs:108:17
            27: start_thread
            28: clone3


thread 'rustc' panicked at 'Box<dyn Any>', compiler/rustc_errors/src/lib.rs:1536:13
stack backtrace:
   0:     0x7f90441db380 - std::backtrace_rs::backtrace::libunwind::trace::h80b67585f93dcdfa
                               at /rustc/57f097ea25f2c05f424fc9b9dc50dbd6d399845c/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   1:     0x7f90441db380 - std::backtrace_rs::backtrace::trace_unsynchronized::h1727d1d942e500b9
                               at /rustc/57f097ea25f2c05f424fc9b9dc50dbd6d399845c/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7f90441db380 - std::sys_common::backtrace::_print_fmt::h1d58d8daeea91706
                               at /rustc/57f097ea25f2c05f424fc9b9dc50dbd6d399845c/library/std/src/sys_common/backtrace.rs:66:5
   3:     0x7f90441db380 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h813c9b7ed78580ba
                               at /rustc/57f097ea25f2c05f424fc9b9dc50dbd6d399845c/library/std/src/sys_common/backtrace.rs:45:22
   4:     0x7f904423614e - core::fmt::write::h3eecc0c99e4c5326
                               at /rustc/57f097ea25f2c05f424fc9b9dc50dbd6d399845c/library/core/src/fmt/mod.rs:1209:17
   5:     0x7f90441cbf05 - std::io::Write::write_fmt::h169b89be5a4eb2e3
                               at /rustc/57f097ea25f2c05f424fc9b9dc50dbd6d399845c/library/std/src/io/mod.rs:1679:15
   6:     0x7f90441de123 - std::sys_common::backtrace::_print::h8470ccc2c46bc222
                               at /rustc/57f097ea25f2c05f424fc9b9dc50dbd6d399845c/library/std/src/sys_common/backtrace.rs:48:5
   7:     0x7f90441de123 - std::sys_common::backtrace::print::h59bfcbb529aad43f
                               at /rustc/57f097ea25f2c05f424fc9b9dc50dbd6d399845c/library/std/src/sys_common/backtrace.rs:35:9
   8:     0x7f90441de123 - std::panicking::default_hook::{{closure}}::h19081fa8b049df20
                               at /rustc/57f097ea25f2c05f424fc9b9dc50dbd6d399845c/library/std/src/panicking.rs:267:22
   9:     0x7f90441dddfa - std::panicking::default_hook::h8f0eea70584d6151
                               at /rustc/57f097ea25f2c05f424fc9b9dc50dbd6d399845c/library/std/src/panicking.rs:286:9
  10:     0x7f9046a97c21 - <rustc_driver[5f28de9a0492c992]::DEFAULT_HOOK::{closure#0}::{closure#0} as core[2f8af133219d6c11]::ops::function::FnOnce<(&core[2f8af133219d6c11]::panic::panic_info::PanicInfo,)>>::call_once::{shim:vtable#0}
  11:     0x7f90441de95b - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::hb9a306ebd1946910
                               at /rustc/57f097ea25f2c05f424fc9b9dc50dbd6d399845c/library/alloc/src/boxed.rs:1952:9
  12:     0x7f90441de95b - std::panicking::rust_panic_with_hook::h6b2b2d988170cf5c
                               at /rustc/57f097ea25f2c05f424fc9b9dc50dbd6d399845c/library/std/src/panicking.rs:673:13
  13:     0x7f9047bdffb1 - std[281da818632cbbdf]::panicking::begin_panic::<rustc_errors[1020869c0a53ac34]::ExplicitBug>::{closure#0}
  14:     0x7f9047bde8c6 - std[281da818632cbbdf]::sys_common::backtrace::__rust_end_short_backtrace::<std[281da818632cbbdf]::panicking::begin_panic<rustc_errors[1020869c0a53ac34]::ExplicitBug>::{closure#0}, !>
  15:     0x7f9047bd8416 - std[281da818632cbbdf]::panicking::begin_panic::<rustc_errors[1020869c0a53ac34]::ExplicitBug>
  16:     0x7f9047bdab66 - std[281da818632cbbdf]::panic::panic_any::<rustc_errors[1020869c0a53ac34]::ExplicitBug>
  17:     0x7f90465ebff3 - <rustc_errors[1020869c0a53ac34]::HandlerInner as core[2f8af133219d6c11]::ops::drop::Drop>::drop
  18:     0x7f90457cd448 - core[2f8af133219d6c11]::ptr::drop_in_place::<rustc_session[786cb1c5da006f9b]::parse::ParseSess>
  19:     0x7f904578cba8 - <alloc[ab68081038e0c5ba]::rc::Rc<rustc_session[786cb1c5da006f9b]::session::Session> as core[2f8af133219d6c11]::ops::drop::Drop>::drop
  20:     0x7f9045789aed - core[2f8af133219d6c11]::ptr::drop_in_place::<rustc_interface[a2e36ac52ab23c81]::interface::Compiler>
  21:     0x7f904578748c - rustc_interface[a2e36ac52ab23c81]::interface::create_compiler_and_run::<core[2f8af133219d6c11]::result::Result<(), rustc_errors[1020869c0a53ac34]::ErrorGuaranteed>, rustc_driver[5f28de9a0492c992]::run_compiler::{closure#1}>
  22:     0x7f9045785982 - <scoped_tls[430d84ded6e482c8]::ScopedKey<rustc_span[efd8b0f1895919e0]::SessionGlobals>>::set::<rustc_interface[a2e36ac52ab23c81]::interface::run_compiler<core[2f8af133219d6c11]::result::Result<(), rustc_errors[1020869c0a53ac34]::ErrorGuaranteed>, rustc_driver[5f28de9a0492c992]::run_compiler::{closure#1}>::{closure#0}, core[2f8af133219d6c11]::result::Result<(), rustc_errors[1020869c0a53ac34]::ErrorGuaranteed>>
  23:     0x7f904578566f - std[281da818632cbbdf]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[a2e36ac52ab23c81]::util::run_in_thread_pool_with_globals<rustc_interface[a2e36ac52ab23c81]::interface::run_compiler<core[2f8af133219d6c11]::result::Result<(), rustc_errors[1020869c0a53ac34]::ErrorGuaranteed>, rustc_driver[5f28de9a0492c992]::run_compiler::{closure#1}>::{closure#0}, core[2f8af133219d6c11]::result::Result<(), rustc_errors[1020869c0a53ac34]::ErrorGuaranteed>>::{closure#0}, core[2f8af133219d6c11]::result::Result<(), rustc_errors[1020869c0a53ac34]::ErrorGuaranteed>>
  24:     0x7f90468f9550 - <<std[281da818632cbbdf]::thread::Builder>::spawn_unchecked_<rustc_interface[a2e36ac52ab23c81]::util::run_in_thread_pool_with_globals<rustc_interface[a2e36ac52ab23c81]::interface::run_compiler<core[2f8af133219d6c11]::result::Result<(), rustc_errors[1020869c0a53ac34]::ErrorGuaranteed>, rustc_driver[5f28de9a0492c992]::run_compiler::{closure#1}>::{closure#0}, core[2f8af133219d6c11]::result::Result<(), rustc_errors[1020869c0a53ac34]::ErrorGuaranteed>>::{closure#0}, core[2f8af133219d6c11]::result::Result<(), rustc_errors[1020869c0a53ac34]::ErrorGuaranteed>>::{closure#1} as core[2f8af133219d6c11]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  25:     0x7f90441e8433 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h26c13cce480449d5
                               at /rustc/57f097ea25f2c05f424fc9b9dc50dbd6d399845c/library/alloc/src/boxed.rs:1938:9
  26:     0x7f90441e8433 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h1d016e890f9a0fa4
                               at /rustc/57f097ea25f2c05f424fc9b9dc50dbd6d399845c/library/alloc/src/boxed.rs:1938:9
  27:     0x7f90441e8433 - std::sys::unix::thread::Thread::new::thread_start::ha5f4632b746acf38
                               at /rustc/57f097ea25f2c05f424fc9b9dc50dbd6d399845c/library/std/src/sys/unix/thread.rs:108:17
  28:     0x7f9043f60ff2 - start_thread
  29:     0x7f9043fe3bfc - clone3
  30:                0x0 - <unknown>

note: 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: rustc 1.66.0-nightly (57f097ea2 2022-10-01) running on x86_64-unknown-linux-gnu

note: compiler flags: -C embed-bitcode=no -C debuginfo=2 -C incremental=[REDACTED]

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

query stack during panic:
end of query stack
error: could not compile `uom`

Caused by:
  process didn't exit successfully: `rustc --crate-name uom --edition=2018 src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --emit=dep-info,link -C embed-bitcode=no -C debuginfo=2 --test --cfg 'feature="autoconvert"' --cfg 'feature="f32"' --cfg 'feature="libm"' --cfg 'feature="serde"' --cfg 'feature="si"' --cfg 'feature="use_serde"' -C metadata=b8fcebefe5e342ac -C extra-filename=-b8fcebefe5e342ac --out-dir /home/wucke13/documents/projects/rust/uom/target/debug/deps -C incremental=/home/wucke13/documents/projects/rust/uom/target/debug/incremental -L dependency=/home/wucke13/documents/projects/rust/uom/target/debug/deps --extern approx=/home/wucke13/documents/projects/rust/uom/target/debug/deps/libapprox-df0c75ecf4aa6dd6.rlib --extern num_traits=/home/wucke13/documents/projects/rust/uom/target/debug/deps/libnum_traits-a1c0388eb46c8724.rlib --extern quickcheck=/home/wucke13/documents/projects/rust/uom/target/debug/deps/libquickcheck-c870dae87a1ba66f.rlib --extern serde=/home/wucke13/documents/projects/rust/uom/target/debug/deps/libserde-3064340d0e7a5ddd.rlib --extern serde_json=/home/wucke13/documents/projects/rust/uom/target/debug/deps/libserde_json-61a82ca4ca73b0c1.rlib --extern static_assertions=/home/wucke13/documents/projects/rust/uom/target/debug/deps/libstatic_assertions-c94e2eb84119cf0b.rlib --extern typenum=/home/wucke13/documents/projects/rust/uom/target/debug/deps/libtypenum-ae91be759e5f8db3.rlib` (exit status: 101)
Backtrace

$ RUST_BACKTRACE=1 cargo test --verbose --no-default-features --features "autoconvert f32 si use_serde libm" -- --test-threads=1
       Fresh cfg-if v1.0.0
       Fresh autocfg v1.1.0
       Fresh memchr v2.5.0
       Fresh libc v0.2.126
       Fresh aho-corasick v0.7.18
       Fresh libm v0.2.2
       Fresh regex-syntax v0.6.26
       Fresh itoa v1.0.2
       Fresh ryu v1.0.10
       Fresh static_assertions v1.1.0
       Fresh getrandom v0.2.6
       Fresh regex v1.5.6
       Fresh num-traits v0.2.15
       Fresh log v0.4.17
       Fresh rand_core v0.6.3
       Fresh serde v1.0.137
       Fresh typenum v1.15.0
       Fresh approx v0.5.1
       Fresh env_logger v0.8.4
       Fresh rand v0.8.5
       Fresh serde_json v1.0.81
       Fresh quickcheck v1.0.3
   Compiling uom v0.33.0 (/home/wucke13/documents/projects/rust/uom)
     Running `rustc --crate-name uom --edition=2018 src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --emit=dep-info,link -C embed-bitcode=no -C debuginfo=2 --test --cfg 'feature="autoconvert"' --cfg 'feature="f32"' --cfg 'feature="libm"' --cfg 'feature="serde"' --cfg 'feature="si"' --cfg 'feature="use_serde"' -C metadata=b8fcebefe5e342ac -C extra-filename=-b8fcebefe5e342ac --out-dir /home/wucke13/documents/projects/rust/uom/target/debug/deps -C incremental=/home/wucke13/documents/projects/rust/uom/target/debug/incremental -L dependency=/home/wucke13/documents/projects/rust/uom/target/debug/deps --extern approx=/home/wucke13/documents/projects/rust/uom/target/debug/deps/libapprox-df0c75ecf4aa6dd6.rlib --extern num_traits=/home/wucke13/documents/projects/rust/uom/target/debug/deps/libnum_traits-a1c0388eb46c8724.rlib --extern quickcheck=/home/wucke13/documents/projects/rust/uom/target/debug/deps/libquickcheck-c870dae87a1ba66f.rlib --extern serde=/home/wucke13/documents/projects/rust/uom/target/debug/deps/libserde-3064340d0e7a5ddd.rlib --extern serde_json=/home/wucke13/documents/projects/rust/uom/target/debug/deps/libserde_json-61a82ca4ca73b0c1.rlib --extern static_assertions=/home/wucke13/documents/projects/rust/uom/target/debug/deps/libstatic_assertions-c94e2eb84119cf0b.rlib --extern typenum=/home/wucke13/documents/projects/rust/uom/target/debug/deps/libtypenum-ae91be759e5f8db3.rlib`
error: internal compiler error: no warnings or errors encountered even though `delayed_good_path_bugs` issued

error: internal compiler error: trimmed_def_paths constructed
  |
  = note: delayed at    0: <rustc_errors::Handler>::delay_good_path_bug::<&str>
             1: rustc_middle::ty::print::pretty::trimmed_def_paths
             2: <rustc_middle::dep_graph::dep_node::DepKind as rustc_query_system::dep_graph::DepKind>::with_deps::<<rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::with_task_impl<rustc_middle::ty::context::TyCtxt, (), std::collections::hash::map::HashMap<rustc_span::def_id::DefId, rustc_span::symbol::Symbol, core::hash::BuildHasherDefault<rustc_hash::FxHasher>>>::{closure#0}, std::collections::hash::map::HashMap<rustc_span::def_id::DefId, rustc_span::symbol::Symbol, core::hash::BuildHasherDefault<rustc_hash::FxHasher>>>
             3: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle::ty::context::TyCtxt, (), std::collections::hash::map::HashMap<rustc_span::def_id::DefId, rustc_span::symbol::Symbol, core::hash::BuildHasherDefault<rustc_hash::FxHasher>>>
             4: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::plumbing::QueryCtxt, rustc_query_system::query::caches::ArenaCache<(), std::collections::hash::map::HashMap<rustc_span::def_id::DefId, rustc_span::symbol::Symbol, core::hash::BuildHasherDefault<rustc_hash::FxHasher>>>>
             5: rustc_query_system::query::plumbing::force_query::<rustc_query_impl::queries::trimmed_def_paths, rustc_query_impl::plumbing::QueryCtxt>
             6: rustc_query_impl::plumbing::force_from_dep_node::<rustc_query_impl::queries::trimmed_def_paths>
             7: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::try_mark_previous_green::<rustc_query_impl::plumbing::QueryCtxt>
             8: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::try_mark_previous_green::<rustc_query_impl::plumbing::QueryCtxt>
             9: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::try_mark_green::<rustc_query_impl::plumbing::QueryCtxt>
            10: rustc_query_system::query::plumbing::try_load_from_disk_and_cache_in_memory::<rustc_query_impl::plumbing::QueryCtxt, (), ()>
            11: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::plumbing::QueryCtxt, rustc_query_system::query::caches::DefaultCache<(), ()>>
            12: rustc_query_system::query::plumbing::get_query::<rustc_query_impl::queries::typeck_item_bodies, rustc_query_impl::plumbing::QueryCtxt>
            13: <rustc_session::session::Session>::time::<(), rustc_hir_analysis::check_crate::{closure#7}>
            14: rustc_hir_analysis::check_crate
            15: rustc_interface::passes::analysis
            16: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle::ty::context::TyCtxt, (), core::result::Result<(), rustc_errors::ErrorGuaranteed>>
            17: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::plumbing::QueryCtxt, rustc_query_system::query::caches::DefaultCache<(), core::result::Result<(), rustc_errors::ErrorGuaranteed>>>
            18: rustc_query_system::query::plumbing::get_query::<rustc_query_impl::queries::analysis, rustc_query_impl::plumbing::QueryCtxt>
            19: <rustc_interface::passes::QueryContext>::enter::<rustc_driver::run_compiler::{closure#1}::{closure#2}::{closure#3}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>
            20: rustc_interface::interface::create_compiler_and_run::<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>
            21: <scoped_tls::ScopedKey<rustc_span::SessionGlobals>>::set::<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>
            22: std::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>
            23: <<std::thread::Builder>::spawn_unchecked_<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
            24: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
                       at /rustc/57f097ea25f2c05f424fc9b9dc50dbd6d399845c/library/alloc/src/boxed.rs:1938:9
            25: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
                       at /rustc/57f097ea25f2c05f424fc9b9dc50dbd6d399845c/library/alloc/src/boxed.rs:1938:9
            26: std::sys::unix::thread::Thread::new::thread_start
                       at /rustc/57f097ea25f2c05f424fc9b9dc50dbd6d399845c/library/std/src/sys/unix/thread.rs:108:17
            27: start_thread
            28: clone3


thread 'rustc' panicked at 'Box<dyn Any>', compiler/rustc_errors/src/lib.rs:1536:13
stack backtrace:
   0: std::panicking::begin_panic::<rustc_errors::ExplicitBug>
   1: std::panic::panic_any::<rustc_errors::ExplicitBug>
   2: <rustc_errors::HandlerInner as core::ops::drop::Drop>::drop
   3: core::ptr::drop_in_place::<rustc_session::parse::ParseSess>
   4: <alloc::rc::Rc<rustc_session::session::Session> as core::ops::drop::Drop>::drop
   5: core::ptr::drop_in_place::<rustc_interface::interface::Compiler>
   6: rustc_interface::interface::create_compiler_and_run::<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>
   7: <scoped_tls::ScopedKey<rustc_span::SessionGlobals>>::set::<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

note: 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: rustc 1.66.0-nightly (57f097ea2 2022-10-01) running on x86_64-unknown-linux-gnu

note: compiler flags: -C embed-bitcode=no -C debuginfo=2 -C incremental=[REDACTED]

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

query stack during panic:
end of query stack
error: could not compile `uom`

Caused by:
  process didn't exit successfully: `rustc --crate-name uom --edition=2018 src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --emit=dep-info,link -C embed-bitcode=no -C debuginfo=2 --test --cfg 'feature="autoconvert"' --cfg 'feature="f32"' --cfg 'feature="libm"' --cfg 'feature="serde"' --cfg 'feature="si"' --cfg 'feature="use_serde"' -C metadata=b8fcebefe5e342ac -C extra-filename=-b8fcebefe5e342ac --out-dir /home/wucke13/documents/projects/rust/uom/target/debug/deps -C incremental=/home/wucke13/documents/projects/rust/uom/target/debug/incremental -L dependency=/home/wucke13/documents/projects/rust/uom/target/debug/deps --extern approx=/home/wucke13/documents/projects/rust/uom/target/debug/deps/libapprox-df0c75ecf4aa6dd6.rlib --extern num_traits=/home/wucke13/documents/projects/rust/uom/target/debug/deps/libnum_traits-a1c0388eb46c8724.rlib --extern quickcheck=/home/wucke13/documents/projects/rust/uom/target/debug/deps/libquickcheck-c870dae87a1ba66f.rlib --extern serde=/home/wucke13/documents/projects/rust/uom/target/debug/deps/libserde-3064340d0e7a5ddd.rlib --extern serde_json=/home/wucke13/documents/projects/rust/uom/target/debug/deps/libserde_json-61a82ca4ca73b0c1.rlib --extern static_assertions=/home/wucke13/documents/projects/rust/uom/target/debug/deps/libstatic_assertions-c94e2eb84119cf0b.rlib --extern typenum=/home/wucke13/documents/projects/rust/uom/target/debug/deps/libtypenum-ae91be759e5f8db3.rlib` (exit status: 101)

@wucke13 wucke13 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 Oct 5, 2022
@Enselic
Copy link
Member

Enselic commented May 1, 2024

Triage: Can this still be reproduced with latest nightly? If yes, it would be great with step-by-step instructions on how to do so. Basically a script that can be run that does git clone, git checkout, etc.

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.
Projects
None yet
Development

No branches or pull requests

2 participants