-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Docker Preview M1 rustc "error: internal compiler error: unexpected panic" #80346
Comments
Please check if this still happens on the newest nightly |
yes, it seems to be an issue with 1.50 nightly with Docker preview on an M1 as well heres the output:
|
This does not look like a bug in rustc |
ah, i mean I only reported it since it says "note: the compiler unexpectedly panicked. this is a bug." but if its not a bug ill close the issue |
@jonas-schievink Why do you say that this doesn't look like a rustc bug? |
Because it would happen on all architectures. This looks more like a qemu or rosetta bug. |
defintly not a Rosetta 2 bug since I'm not using that to run Docker or any of the code, but it could be a Qemu bug. I cant tell if its a Rustc, Docker preview bug or Qemu bug at this point however. |
The Logthread 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', compiler/rustc_middle/src/ty/query/mod.rs:235:5 stack backtrace: 0: 0x7f4559e1a6a7 - std::backtrace_rs::backtrace::libunwind::trace::h746c3e9529d524bc at /rustc/3d6705aa5abffe94c83bf09af8c3ba3c599845fc/library/std/src/../../backtrace/src/backtrace/libunwind.rs:90:5 1: 0x7f4559e1a6a7 - std::backtrace_rs::backtrace::trace_unsynchronized::h86340908ff889faa at /rustc/3d6705aa5abffe94c83bf09af8c3ba3c599845fc/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5 2: 0x7f4559e1a6a7 - std::sys_common::backtrace::_print_fmt::h43f85f9b18230404 at /rustc/3d6705aa5abffe94c83bf09af8c3ba3c599845fc/library/std/src/sys_common/backtrace.rs:67:5 3: 0x7f4559e1a6a7 - ::fmt::hc132ae1a5b5aa7cd at /rustc/3d6705aa5abffe94c83bf09af8c3ba3c599845fc/library/std/src/sys_common/backtrace.rs:46:22 4: 0x7f4559e8e51c - core::fmt::write::hdf023a0036d2a25f at /rustc/3d6705aa5abffe94c83bf09af8c3ba3c599845fc/library/core/src/fmt/mod.rs:1078:17 5: 0x7f4559e0c692 - std::io::Write::write_fmt::h8580846154bcb66a at /rustc/3d6705aa5abffe94c83bf09af8c3ba3c599845fc/library/std/src/io/mod.rs:1519:15 6: 0x7f4559e1e3a5 - std::sys_common::backtrace::_print::h7ee55fed88d107a3 at /rustc/3d6705aa5abffe94c83bf09af8c3ba3c599845fc/library/std/src/sys_common/backtrace.rs:49:5 7: 0x7f4559e1e3a5 - std::sys_common::backtrace::print::h54a7d3e52a524177 at /rustc/3d6705aa5abffe94c83bf09af8c3ba3c599845fc/library/std/src/sys_common/backtrace.rs:36:9 8: 0x7f4559e1e3a5 - std::panicking::default_hook::{{closure}}::h60921e857bf55a40 at /rustc/3d6705aa5abffe94c83bf09af8c3ba3c599845fc/library/std/src/panicking.rs:208:50 9: 0x7f4559e1defa - std::panicking::default_hook::hf0f9afb1017317fc at /rustc/3d6705aa5abffe94c83bf09af8c3ba3c599845fc/library/std/src/panicking.rs:225:9 10: 0x7f455a6d5a68 - rustc_driver::report_ice::hff78d76a39ffbb86 11: 0x7f4559e1eca6 - std::panicking::rust_panic_with_hook::h8d66bf42b407aaea at /rustc/3d6705aa5abffe94c83bf09af8c3ba3c599845fc/library/std/src/panicking.rs:595:17 12: 0x7f4559e1e797 - std::panicking::begin_panic_handler::{{closure}}::hde71edcd925d0c5e at /rustc/3d6705aa5abffe94c83bf09af8c3ba3c599845fc/library/std/src/panicking.rs:495:13 13: 0x7f4559e1ab6c - std::sys_common::backtrace::__rust_end_short_backtrace::h8a3c7d6cea578919 at /rustc/3d6705aa5abffe94c83bf09af8c3ba3c599845fc/library/std/src/sys_common/backtrace.rs:141:18 14: 0x7f4559e1e729 - rust_begin_unwind at /rustc/3d6705aa5abffe94c83bf09af8c3ba3c599845fc/library/std/src/panicking.rs:493:5 15: 0x7f4559e8a931 - core::panicking::panic_fmt::h20225113c4a2f8fd at /rustc/3d6705aa5abffe94c83bf09af8c3ba3c599845fc/library/core/src/panicking.rs:92:14 16: 0x7f4559e8a87d - core::panicking::panic::h35b77276aa4b0c12 at /rustc/3d6705aa5abffe94c83bf09af8c3ba3c599845fc/library/core/src/panicking.rs:50:5 17: 0x7f455d0b5835 - rustc_middle::ty::query::try_load_from_on_disk_cache::hfa4775df5c5e0180 18: 0x7f455c3903ca - rustc_query_system::dep_graph::graph::DepGraph::exec_cache_promotions::h8caa69177622351e 19: 0x7f455c3a8c21 - rustc_middle::dep_graph::::with_deps::hab5675af7737b3e6 20: 0x7f455c34c3bb - rustc_incremental::persist::save::save_in::h7f4f43356280dc0a 21: 0x7f455c3471d1 - rustc_data_structures::sync::join::h0120008f852881ce 22: 0x7f455c3a7cc2 - rustc_middle::dep_graph::::with_deps::h2893ce60eec57bb6 23: 0x7f455c34b8ef - rustc_incremental::persist::save::save_dep_graph::hffd3fb2ecc639a78 24: 0x7f455c226daa - rustc_codegen_ssa::base::finalize_tcx::h68106e2729498b3e 25: 0x7f455ab44457 - ::codegen_crate::h067fffb3870bc5b0 26: 0x7f455a8f3b2e - rustc_session::utils::::time::had158f21ec5bf4d1 27: 0x7f455a93682c - rustc_interface::passes::QueryContext::enter::h40067ad7feabcbd0 28: 0x7f455a98ec93 - rustc_interface::queries::Queries::ongoing_codegen::h4fc36fc05972247d 29: 0x7f455a67e6e2 - rustc_interface::queries::::enter::hd899306a06575d0c 30: 0x7f455a7117f7 - rustc_span::with_source_map::ha4e07ff263d0dc1d 31: 0x7f455a67f88b - rustc_interface::interface::create_compiler_and_run::h1d6d732867d1f489 32: 0x7f455a72bd60 - scoped_tls::ScopedKey::set::h39c0aa543118d3f3 33: 0x7f455a732546 - std::sys_common::backtrace::__rust_begin_short_backtrace::h1e5aa72fb9cd6d86 34: 0x7f455a68727a - core::ops::function::FnOnce::call_once{{vtable.shim}}::hc793837e985b77ce 35: 0x7f4559e2e65a - as core::ops::function::FnOnce>::call_once::hea1090dbdcecbf5a at /rustc/3d6705aa5abffe94c83bf09af8c3ba3c599845fc/library/alloc/src/boxed.rs:1328:9 36: 0x7f4559e2e65a - as core::ops::function::FnOnce>::call_once::h8d5723d3912bd325 at /rustc/3d6705aa5abffe94c83bf09af8c3ba3c599845fc/library/alloc/src/boxed.rs:1328:9 37: 0x7f4559e2e65a - std::sys::unix::thread::Thread::new::thread_start::hc17a425ca2995724 at /rustc/3d6705aa5abffe94c83bf09af8c3ba3c599845fc/library/std/src/sys/unix/thread.rs:71:17 38: 0x7f4559d393e9 - start_thread 39: 0x7f4559c54293 - __GI___clone 40: 0x0 - Edit: it's gone on the latest nightly |
Strange, even with the latest nightly it still segfaults at the |
I'm experiencing the same problem (rustc in Docker on M1): LogsCompiling http v0.2.1 thread 'rustc' panicked at 'invalid terminator state', compiler/rustc_middle/src/mir/mod.rs:1204:34 stack backtrace: 0: rust_begin_unwind at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/std/src/panicking.rs:495:5 1: core::panicking::panic_fmt at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/core/src/panicking.rs:92:14 2: core::option::expect_failed at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/core/src/option.rs:1260:5 3: rustc_middle::mir::BasicBlockData::terminator_mut 4: rustc_mir::transform::simplify::remove_dead_blocks 5: rustc_mir::transform::simplify::simplify_cfg 6: rustc_mir::transform::run_passes 7: rustc_mir::transform::mir_const 8: rustc_middle::ty::query:: for rustc_middle::ty::query::queries::mir_const>::compute 9: rustc_query_system::dep_graph::graph::DepGraph::with_task_impl 10: rustc_middle::ty::query::plumbing::::start_query::{{closure}}::{{closure}}::{{closure}} 11: rustc_query_system::query::plumbing::get_query_impl 12: rustc_mir::transform::mir_promoted 13: rustc_middle::ty::query:: for rustc_middle::ty::query::queries::mir_promoted>::compute 14: rustc_query_system::dep_graph::graph::DepGraph::with_task_impl 15: rustc_middle::ty::query::plumbing::::start_query::{{closure}}::{{closure}}::{{closure}} 16: rustc_query_system::query::plumbing::get_query_impl 17: rustc_mir::borrow_check::mir_borrowck 18: core::ops::function::FnOnce::call_once 19: rustc_middle::ty::query:: for rustc_middle::ty::query::queries::mir_borrowck>::compute 20: rustc_query_system::dep_graph::graph::DepGraph::with_task_impl 21: rustc_data_structures::stack::ensure_sufficient_stack 22: rustc_query_system::query::plumbing::get_query_impl 23: rustc_query_system::query::plumbing::ensure_query_impl 24: rustc_session::utils::::time 25: rustc_interface::passes::analysis 26: rustc_middle::ty::query:: for rustc_middle::ty::query::queries::analysis>::compute 27: rustc_query_system::dep_graph::graph::DepGraph::with_task_impl 28: rustc_data_structures::stack::ensure_sufficient_stack 29: rustc_query_system::query::plumbing::get_query_impl 30: rustc_interface::passes::QueryContext::enter 31: rustc_interface::queries::::enter 32: rustc_span::with_source_map 33: rustc_interface::interface::create_compiler_and_run 34: rustc_span::with_session_globals note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.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/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md note: rustc 1.49.0 (e1884a8 2020-12-29) running on x86_64-unknown-linux-gnu note: compiler flags: -C embed-bitcode=no -C debuginfo=2 -C link-arg=-fuse-ld=lld --crate-type lib note: some of the compiler flags provided by cargo are hidden query stack during panic: I'll try to setup a repo that reproduces the error (source repo isn't public, unfortunately). |
If it happens while compiling a public library (which it looks like it does), I think you in theory can just set up an empty repo depending on that crate and it should reproduce. |
Turns out it's not a edit: Likely to be a bug in QEMU, in case anyone is curious. |
Is there any work arounds for this? I'm trying to compile a rust image on m1 to amd64 and im coming across this same issue but i can't get a workaround. |
Also seeing this issue on an M1 Mac |
I am running into this issue as well. I am using |
These issues (and same conditions, http library) arise when trying to use a chroot (that runs Arch Linux ARM) on an |
Triage: Closing, since this is not a rustc bug, and can thus not be fixed in rustc. |
Code
Github code I was looking at
note: I switched "CONTAINER_RUNTIME" to docker
Meta
rustc --version --verbose
:Docker M1 Preview rustc
Host rustc
Error output
Backtrace
The text was updated successfully, but these errors were encountered: