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

nalgebra dependency causes compiler bug #101029

Closed
ahcm opened this issue Aug 26, 2022 · 8 comments
Closed

nalgebra dependency causes compiler bug #101029

ahcm opened this issue Aug 26, 2022 · 8 comments
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

@ahcm
Copy link

ahcm commented Aug 26, 2022

I wasn't working on this for a while and now it throws a compiler bug.
Made public for you:
https://github.com/ahcm/lrdf

error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:23183 ~ nalgebra[c878]::geometry::isometry_ops::{impl#77}::mul), const_param_did: None }) (end of phase transition to Optimized) at bb5[4]:
                                Field projection `_11.field[0]` specified type `base::matrix::Matrix<N, base::dimension::U4, base::dimension::U1, base::array_storage::ArrayStorage<N, base::dimension::U4, base::dimension::U1>>`, but actual type is base::matrix::Matrix<N, base::dimension::
U4, base::dimension::U1, <base::default_allocator::DefaultAllocator as base::allocator::Allocator<N, base::dimension::U4>>::Buffer>
   --> /home/andy/.cargo/registry/src/github.com-1ecc6299db9ec823/nalgebra-0.19.0/src/geometry/quaternion_conversion.rs:252:9
    |
252 |         Self { coords }
    |         ^^^^^^^^^^^^^^^
    |
   ::: /home/andy/.cargo/registry/src/github.com-1ecc6299db9ec823/nalgebra-0.19.0/src/geometry/isometry_ops.rs:435:53
    |
435 |     [ref ref] => Isometry::from_parts(self.clone(), right.clone());
    |                                                     ------------- in this inlined function call
    |
    = note: delayed at compiler/rustc_const_eval/src/transform/validate.rs:129:36

thread 'rustc' panicked at 'Box<dyn Any>', compiler/rustc_errors/src/lib.rs:1425:13
stack backtrace:
   0:     0x7fc36ba0e7e0 - std::backtrace_rs::backtrace::libunwind::trace::hea82fac2aae29b23
                               at /rustc/29e4a9ee0253cd39e552a77f51f11f9a5f1c41e6/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   1:     0x7fc36ba0e7e0 - std::backtrace_rs::backtrace::trace_unsynchronized::h5517a70ae29c4a37
                               at /rustc/29e4a9ee0253cd39e552a77f51f11f9a5f1c41e6/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7fc36ba0e7e0 - std::sys_common::backtrace::_print_fmt::h15ae471bcdd82d93
                               at /rustc/29e4a9ee0253cd39e552a77f51f11f9a5f1c41e6/library/std/src/sys_common/backtrace.rs:66:5
   3:     0x7fc36ba0e7e0 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h7e2315bde9966038
                               at /rustc/29e4a9ee0253cd39e552a77f51f11f9a5f1c41e6/library/std/src/sys_common/backtrace.rs:45:22
   4:     0x7fc36ba69cfc - core::fmt::write::h6c731326a8a30a57
                               at /rustc/29e4a9ee0253cd39e552a77f51f11f9a5f1c41e6/library/core/src/fmt/mod.rs:1198:17
   5:     0x7fc36b9ff935 - std::io::Write::write_fmt::h71584a2dd6c3063c
                               at /rustc/29e4a9ee0253cd39e552a77f51f11f9a5f1c41e6/library/std/src/io/mod.rs:1672:15
   6:     0x7fc36ba114b1 - std::sys_common::backtrace::_print::h24f1c9f87e80a8e0
                               at /rustc/29e4a9ee0253cd39e552a77f51f11f9a5f1c41e6/library/std/src/sys_common/backtrace.rs:48:5
   7:     0x7fc36ba114b1 - std::sys_common::backtrace::print::hf0c5754f46015782
                               at /rustc/29e4a9ee0253cd39e552a77f51f11f9a5f1c41e6/library/std/src/sys_common/backtrace.rs:35:9
   8:     0x7fc36ba114b1 - std::panicking::default_hook::{{closure}}::h92f4071e73011988
                               at /rustc/29e4a9ee0253cd39e552a77f51f11f9a5f1c41e6/library/std/src/panicking.rs:295:22
   9:     0x7fc36ba11183 - std::panicking::default_hook::h97b116f9b96b6bfa
                               at /rustc/29e4a9ee0253cd39e552a77f51f11f9a5f1c41e6/library/std/src/panicking.rs:314:9
  10:     0x7fc36e293414 - rustc_driver[788d642ecae1365]::DEFAULT_HOOK::{closure#0}::{closure#0}
  11:     0x7fc36ba11ce6 - std::panicking::rust_panic_with_hook::hd6e7d786bac2c17a
                               at /rustc/29e4a9ee0253cd39e552a77f51f11f9a5f1c41e6/library/std/src/panicking.rs:702:17
  12:     0x7fc36f35db01 - std[cb15343d4403b06]::panicking::begin_panic::<rustc_errors[f53c5e75797f2c2c]::ExplicitBug>::{closure#0}
  13:     0x7fc36f35d8e6 - std[cb15343d4403b06]::sys_common::backtrace::__rust_end_short_backtrace::<std[cb15343d4403b06]::panicking::begin_panic<rustc_errors[f53c5e75797f2c2c]::ExplicitBug>::{closure#0}, !>
  14:     0x7fc36f3580a6 - std[cb15343d4403b06]::panicking::begin_panic::<rustc_errors[f53c5e75797f2c2c]::ExplicitBug>
  15:     0x7fc36f35a566 - std[cb15343d4403b06]::panic::panic_any::<rustc_errors[f53c5e75797f2c2c]::ExplicitBug>
  16:     0x7fc36dda03e3 - <rustc_errors[f53c5e75797f2c2c]::HandlerInner as core[99438563fdc9f911]::ops::drop::Drop>::drop
  17:     0x7fc36da7a268 - core[99438563fdc9f911]::ptr::drop_in_place::<rustc_session[3e6e1c7aab68e7e]::parse::ParseSess>
  18:     0x7fc36da704f3 - <alloc[44a602b2dcc58bae]::rc::Rc<rustc_session[3e6e1c7aab68e7e]::session::Session> as core[99438563fdc9f911]::ops::drop::Drop>::drop
  19:     0x7fc36da6f4bd - core[99438563fdc9f911]::ptr::drop_in_place::<rustc_interface[a7fb64d19efedbd1]::interface::Compiler>
  20:     0x7fc36da6eed9 - rustc_span[752667cdfed889fa]::with_source_map::<core[99438563fdc9f911]::result::Result<(), rustc_errors[f53c5e75797f2c2c]::ErrorGuaranteed>, rustc_interface[a7fb64d19efedbd1]::interface::create_compiler_and_run<core[99438563fdc9f911]::result::Result<(), rustc_e
rrors[f53c5e75797f2c2c]::ErrorGuaranteed>, rustc_driver[788d642ecae1365]::run_compiler::{closure#1}>::{closure#1}>
  21:     0x7fc36da6e6f0 - rustc_interface[a7fb64d19efedbd1]::interface::create_compiler_and_run::<core[99438563fdc9f911]::result::Result<(), rustc_errors[f53c5e75797f2c2c]::ErrorGuaranteed>, rustc_driver[788d642ecae1365]::run_compiler::{closure#1}>
  22:     0x7fc36da6ca61 - <scoped_tls[e6c3a7675e4d4aef]::ScopedKey<rustc_span[752667cdfed889fa]::SessionGlobals>>::set::<rustc_interface[a7fb64d19efedbd1]::interface::run_compiler<core[99438563fdc9f911]::result::Result<(), rustc_errors[f53c5e75797f2c2c]::ErrorGuaranteed>, rustc_driver[7
88d642ecae1365]::run_compiler::{closure#1}>::{closure#0}, core[99438563fdc9f911]::result::Result<(), rustc_errors[f53c5e75797f2c2c]::ErrorGuaranteed>>
  23:     0x7fc36da6c74f - std[cb15343d4403b06]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[a7fb64d19efedbd1]::util::run_in_thread_pool_with_globals<rustc_interface[a7fb64d19efedbd1]::interface::run_compiler<core[99438563fdc9f911]::result::Result<(), rustc_erro
rs[f53c5e75797f2c2c]::ErrorGuaranteed>, rustc_driver[788d642ecae1365]::run_compiler::{closure#1}>::{closure#0}, core[99438563fdc9f911]::result::Result<(), rustc_errors[f53c5e75797f2c2c]::ErrorGuaranteed>>::{closure#0}, core[99438563fdc9f911]::result::Result<(), rustc_errors[f53c5e75797f2
c2c]::ErrorGuaranteed>>
  24:     0x7fc36e0ba9b9 - <<std[cb15343d4403b06]::thread::Builder>::spawn_unchecked_<rustc_interface[a7fb64d19efedbd1]::util::run_in_thread_pool_with_globals<rustc_interface[a7fb64d19efedbd1]::interface::run_compiler<core[99438563fdc9f911]::result::Result<(), rustc_errors[f53c5e75797f2c
2c]::ErrorGuaranteed>, rustc_driver[788d642ecae1365]::run_compiler::{closure#1}>::{closure#0}, core[99438563fdc9f911]::result::Result<(), rustc_errors[f53c5e75797f2c2c]::ErrorGuaranteed>>::{closure#0}, core[99438563fdc9f911]::result::Result<(), rustc_errors[f53c5e75797f2c2c]::ErrorGuaran
teed>>::{closure#1} as core[99438563fdc9f911]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  25:     0x7fc36ba1b913 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hb881e57abf2e61a2
                               at /rustc/29e4a9ee0253cd39e552a77f51f11f9a5f1c41e6/library/alloc/src/boxed.rs:1935:9
  26:     0x7fc36ba1b913 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hd53432c78099d0ef
                               at /rustc/29e4a9ee0253cd39e552a77f51f11f9a5f1c41e6/library/alloc/src/boxed.rs:1935:9
  27:     0x7fc36ba1b913 - std::sys::unix::thread::Thread::new::thread_start::hc7417f6a39490db3
                               at /rustc/29e4a9ee0253cd39e552a77f51f11f9a5f1c41e6/library/std/src/sys/unix/thread.rs:108:17
  28:     0x7fc36b8c0609 - start_thread
                               at /build/glibc-SzIz7B/glibc-2.31/nptl/pthread_create.c:477:8
  29:     0x7fc36b7e3133 - clone
                               at /build/glibc-SzIz7B/glibc-2.31/misc/../sysdeps/unix/sysv/linux/x86_64/clone.S:95
  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.65.0-nightly (29e4a9ee0 2022-08-10) running on x86_64-unknown-linux-gnu

note: compiler flags: --crate-type lib -C opt-level=3 -C embed-bitcode=no -C target-cpu=native -C opt-level=3 -C debuginfo=0

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

query stack during panic:
end of query stack
error: could not compile `nalgebra`
warning: build failed, waiting for other jobs to finish...

Meta

`rustc --version --verbose`:$ rustc --version --verbose
rustc 1.65.0-nightly (29e4a9ee0 2022-08-10)
binary: rustc
commit-hash: 29e4a9ee0253cd39e552a77f51f11f9a5f1c41e6
commit-date: 2022-08-10
host: x86_64-unknown-linux-gnu
release: 1.65.0-nightly
LLVM version: 14.0.6
rustc 1.65.0-nightly (29e4a9ee0 2022-08-10)
binary: rustc
commit-hash: 29e4a9ee0253cd39e552a77f51f11f9a5f1c41e6
commit-date: 2022-08-10
host: aarch64-apple-darwin
release: 1.65.0-nightly
LLVM version: 14.0.6
Backtrace

$ RUST_BACKTRACE=1 cargo build --release

thread 'rustc' panicked at 'Box<dyn Any>', compiler/rustc_errors/src/lib.rs:1425: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_span::with_source_map::<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_interface::interface::create_compiler_and_run
<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>::{closure#1}>
   7: rustc_interface::interface::create_compiler_and_run::<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler:
:{closure#1}>
   8: <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.65.0-nightly (29e4a9ee0 2022-08-10) running on x86_64-unknown-linux-gnu

note: compiler flags: --crate-type lib -C opt-level=3 -C embed-bitcode=no -C target-cpu=native -C opt-level=3 -C debuginfo=0

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

query stack during panic:
end of query stack
error: could not compile `nalgebra`
warning: build failed, waiting for other jobs to finish...

@ahcm ahcm 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 Aug 26, 2022
@TaKO8Ki TaKO8Ki added the E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example label Aug 26, 2022
@gimbling-away
Copy link
Contributor

I can compile the said repo just fine on both latest stable and latest nightly (2022-08-23), in both debug and release modes on x86_64-linux-gnu-unknown

@5225225
Copy link
Contributor

5225225 commented Aug 26, 2022

Can you include your Cargo.lock in the repo?

@CryZe
Copy link
Contributor

CryZe commented Aug 26, 2022

Probably a dupe of #101003

@gimbling-away
Copy link
Contributor

@ahcm The fix is already merged into Rust for this issue, please update to a later nightly.

1 similar comment
@gimbling-away
Copy link
Contributor

@ahcm The fix is already merged into Rust for this issue, please update to a later nightly.

@steffahn
Copy link
Member

steffahn commented Aug 26, 2022

@rustbot label -E-needs-mcve,
assuming this is a dupe of #100550 and related issues.

@rustbot
Copy link
Collaborator

rustbot commented Aug 26, 2022

Error: Label assuming can only be set by Rust team members

Please file an issue on GitHub at triagebot if there's a problem with this bot, or reach out on #t-infra on Zulip.

@rustbot rustbot removed the E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example label Aug 26, 2022
@ahcm
Copy link
Author

ahcm commented Aug 26, 2022

It's fixed in nightly-2022-08-26 and still present in nightly-2022-08-25.
Profile with rls kept nightly at 2022-08-10.
Thanks!

@ahcm ahcm closed this as completed Aug 26, 2022
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

7 participants