rust-lang / rust

Empowering everyone to build reliable and efficient software.
https://www.rust-lang.org
Other
96.94k stars 12.53k forks source link

Panic during compilation of Subspace binaries #116547

Open Shekelme opened 11 months ago

Shekelme commented 11 months ago

Sorry, I am not a programmer, but the compiler asked me to report this bug. Subspace: https://github.com/subspace/subspace/releases/tag/gemini-3f-2023-oct-06 There was no file at file at /home/rabinovitch/subspace/rustc-ice-2023-10-08T22:30:04.17578496Z-955370.txt which I was adviced to attach here.

rustc --version --verbose:

rustc 1.73.0-nightly (399b06823 2023-07-20)
binary: rustc
commit-hash: 399b068235ceea440540539b3bfd1aeb82214a28
commit-date: 2023-07-20
host: x86_64-unknown-linux-gnu
release: 1.73.0-nightly
LLVM version: 16.0.5

Error output

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 attach the file at `/home/rabinovitch/subspace/rustc-ice-2023-10-08T22:30:04.17578496Z-955370.txt` to your bug report

note: compiler flags: --crate-type bin -C opt-level=3 -C lto=fat -C codegen-units=1 -C target-cpu=native -C opt-level=3

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

``` thread 'rustc' panicked at 'index out of bounds: the len is 1073 but the index is 140080358359040', /rustc/399b068235ceea440540539b3bfd1aeb82214a28/compiler/rustc_data_structures/src/obligation_forest/mod.rs:719:29 stack backtrace: 0: 0x7f67202a3e71 - std::backtrace_rs::backtrace::libunwind::trace::h8fd05b5a530fa3a7 at /rustc/399b068235ceea440540539b3bfd1aeb82214a28/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5 1: 0x7f67202a3e71 - std::backtrace_rs::backtrace::trace_unsynchronized::h8a8d11ec8ab673c4 at /rustc/399b068235ceea440540539b3bfd1aeb82214a28/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5 2: 0x7f67202a3e71 - std::sys_common::backtrace::_print_fmt::h7d69e6adf84af8e3 at /rustc/399b068235ceea440540539b3bfd1aeb82214a28/library/std/src/sys_common/backtrace.rs:65:5 3: 0x7f67202a3e71 - ::fmt::h14edde268589a7dc at /rustc/399b068235ceea440540539b3bfd1aeb82214a28/library/std/src/sys_common/backtrace.rs:44:22 4: 0x7f672030a1fc - core::fmt::rt::Argument::fmt::had85f85f75a9e38f at /rustc/399b068235ceea440540539b3bfd1aeb82214a28/library/core/src/fmt/rt.rs:138:9 5: 0x7f672030a1fc - core::fmt::write::h9d64dcd16df3df12 at /rustc/399b068235ceea440540539b3bfd1aeb82214a28/library/core/src/fmt/mod.rs:1094:21 6: 0x7f672029677e - std::io::Write::write_fmt::hea568404be2874a7 at /rustc/399b068235ceea440540539b3bfd1aeb82214a28/library/std/src/io/mod.rs:1714:15 7: 0x7f67202a3c85 - std::sys_common::backtrace::_print::h76db4f3016b100e4 at /rustc/399b068235ceea440540539b3bfd1aeb82214a28/library/std/src/sys_common/backtrace.rs:47:5 8: 0x7f67202a3c85 - std::sys_common::backtrace::print::h40b955855ddd547c at /rustc/399b068235ceea440540539b3bfd1aeb82214a28/library/std/src/sys_common/backtrace.rs:34:9 9: 0x7f67202a6cda - std::panicking::panic_hook_with_disk_dump::{{closure}}::h8ac97856201eec78 at /rustc/399b068235ceea440540539b3bfd1aeb82214a28/library/std/src/panicking.rs:278:22 10: 0x7f67202a6973 - std::panicking::panic_hook_with_disk_dump::h0bf2ea8ad57ecce9 at /rustc/399b068235ceea440540539b3bfd1aeb82214a28/library/std/src/panicking.rs:312:9 11: 0x7f67234d6029 - >::call_once::{shim:vtable#0} 12: 0x7f67202a7580 - as core::ops::function::Fn>::call::h29cdf48b8ba8b6ae at /rustc/399b068235ceea440540539b3bfd1aeb82214a28/library/alloc/src/boxed.rs:2021:9 13: 0x7f67202a7580 - std::panicking::rust_panic_with_hook::h63b949f8416b37cd at /rustc/399b068235ceea440540539b3bfd1aeb82214a28/library/std/src/panicking.rs:733:13 14: 0x7f67202a7307 - std::panicking::begin_panic_handler::{{closure}}::hfb56b1e1c19df446 at /rustc/399b068235ceea440540539b3bfd1aeb82214a28/library/std/src/panicking.rs:621:13 15: 0x7f67202a42d6 - std::sys_common::backtrace::__rust_end_short_backtrace::hf52a9a1a7e5ba35f at /rustc/399b068235ceea440540539b3bfd1aeb82214a28/library/std/src/sys_common/backtrace.rs:151:18 16: 0x7f67202a7052 - rust_begin_unwind at /rustc/399b068235ceea440540539b3bfd1aeb82214a28/library/std/src/panicking.rs:617:5 17: 0x7f67203065a3 - core::panicking::panic_fmt::hbd58ebc5e2ca0d10 at /rustc/399b068235ceea440540539b3bfd1aeb82214a28/library/core/src/panicking.rs:67:14 18: 0x7f6720306702 - core::panicking::panic_bounds_check::h4ec25c313dddf1aa at /rustc/399b068235ceea440540539b3bfd1aeb82214a28/library/core/src/panicking.rs:162:5 19: 0x7f672158489d - >::apply_rewrites 20: 0x7f67217a18ad - >::compress::<>::process_obligations::{closure#1}> 21: 0x7f67217a00a8 - >::process_obligations:: 22: 0x7f672244d0b6 - ::make_canonicalized_query_response:: 23: 0x7f672244c5b8 - ::enter_canonical_trait_query::, rustc_middle[ad940b573bf0e24a]::traits::query::NormalizationResult, rustc_traits[cc8add84767b24b0]::normalize_projection_ty::normalize_projection_ty::{closure#0}> 24: 0x7f67215f08a7 - rustc_query_impl[38c8fda5da4ce4ba]::plumbing::__rust_begin_short_backtrace::> 25: 0x7f672285a5e1 - rustc_query_system[f9705d2eaa4cb9d4]::query::plumbing::try_execute_query::>, rustc_middle[ad940b573bf0e24a]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[38c8fda5da4ce4ba]::plumbing::QueryCtxt, false> 26: 0x7f672285a1e1 - rustc_query_impl[38c8fda5da4ce4ba]::query_impl::normalize_projection_ty::get_query_non_incr::__rust_end_short_backtrace 27: 0x7f67221779e6 - >::try_fold_ty 28: 0x7f672248aaf1 - )>>::call_once 29: 0x7f672156cf56 - rustc_query_impl[38c8fda5da4ce4ba]::plumbing::__rust_begin_short_backtrace::> 30: 0x7f672252631b - rustc_query_system[f9705d2eaa4cb9d4]::query::plumbing::try_execute_query::, rustc_middle[ad940b573bf0e24a]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[38c8fda5da4ce4ba]::plumbing::QueryCtxt, false> 31: 0x7f6722525ff4 - rustc_query_impl[38c8fda5da4ce4ba]::query_impl::try_normalize_generic_arg_after_erasing_regions::get_query_non_incr::__rust_end_short_backtrace 32: 0x7f67216afbe0 - >::fold_ty 33: 0x7f6721bf8a38 - <&rustc_middle[ad940b573bf0e24a]::ty::list::List as rustc_type_ir[60cd2614b586a6cd]::fold::TypeFoldable>::try_fold_with:: 34: 0x7f6721ba2335 - rustc_ty_utils[f751fc2bbef1180a]::abi::fn_abi_new_uncached 35: 0x7f6721b9eca3 - rustc_ty_utils[f751fc2bbef1180a]::abi::fn_abi_of_instance 36: 0x7f67215567cf - rustc_query_impl[38c8fda5da4ce4ba]::plumbing::__rust_begin_short_backtrace::> 37: 0x7f67223ff6f1 - rustc_query_system[f9705d2eaa4cb9d4]::query::plumbing::try_execute_query::)>, rustc_middle[ad940b573bf0e24a]::query::erase::Erased<[u8; 16usize]>>, false, false, false>, rustc_query_impl[38c8fda5da4ce4ba]::plumbing::QueryCtxt, false> 38: 0x7f67223ff2da - rustc_query_impl[38c8fda5da4ce4ba]::query_impl::fn_abi_of_instance::get_query_non_incr::__rust_end_short_backtrace 39: 0x7f6721a5ff2b - ::predefine_fn 40: 0x7f67225accfc - rustc_codegen_llvm[21bc3649f5d59a65]::base::compile_codegen_unit::module_codegen 41: 0x7f67225ab159 - ::compile_codegen_unit 42: 0x7f67225a6dc2 - rustc_codegen_ssa[76ed43e445576600]::base::codegen_crate:: 43: 0x7f67225a66cb - ::codegen_crate 44: 0x7f6722708182 - ::time::, rustc_interface[fb497e4e8d0d6e95]::passes::start_codegen::{closure#0}> 45: 0x7f6722707ccb - rustc_interface[fb497e4e8d0d6e95]::passes::start_codegen 46: 0x7f6722701a3a - ::enter::<::ongoing_codegen::{closure#0}, core[cd6e598b5651e7ef]::result::Result, rustc_span[15bad65b23151bca]::ErrorGuaranteed>> 47: 0x7f6722700349 - rustc_span[15bad65b23151bca]::set_source_map::, rustc_interface[fb497e4e8d0d6e95]::interface::run_compiler, rustc_driver_impl[7a6d5a32edd3e2a]::run_compiler::{closure#1}>::{closure#0}::{closure#0}> 48: 0x7f67226fae37 - std[28b408c5a4d1cfeb]::sys_common::backtrace::__rust_begin_short_backtrace::, rustc_driver_impl[7a6d5a32edd3e2a]::run_compiler::{closure#1}>::{closure#0}, core[cd6e598b5651e7ef]::result::Result<(), rustc_span[15bad65b23151bca]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[cd6e598b5651e7ef]::result::Result<(), rustc_span[15bad65b23151bca]::ErrorGuaranteed>> 49: 0x7f67226fa76e - <::spawn_unchecked_, rustc_driver_impl[7a6d5a32edd3e2a]::run_compiler::{closure#1}>::{closure#0}, core[cd6e598b5651e7ef]::result::Result<(), rustc_span[15bad65b23151bca]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[cd6e598b5651e7ef]::result::Result<(), rustc_span[15bad65b23151bca]::ErrorGuaranteed>>::{closure#1} as core[cd6e598b5651e7ef]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0} 50: 0x7f67202b1c75 - as core::ops::function::FnOnce>::call_once::h388b23a3322b34b3 at /rustc/399b068235ceea440540539b3bfd1aeb82214a28/library/alloc/src/boxed.rs:2007:9 51: 0x7f67202b1c75 - as core::ops::function::FnOnce>::call_once::h52bd1f089925e77e at /rustc/399b068235ceea440540539b3bfd1aeb82214a28/library/alloc/src/boxed.rs:2007:9 52: 0x7f67202b1c75 - std::sys::unix::thread::Thread::new::thread_start::h422b2dcbc6cfda3a at /rustc/399b068235ceea440540539b3bfd1aeb82214a28/library/std/src/sys/unix/thread.rs:108:17 53: 0x7f671fff6ac3 - 54: 0x7f6720088a40 - 55: 0x0 - 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 attach the file at `/home/rabinovitch/subspace/rustc-ice-2023-10-08T22:30:04.17578496Z-955370.txt` to your bug report note: compiler flags: --crate-type bin -C opt-level=3 -C lto=fat -C codegen-units=1 -C target-cpu=native -C opt-level=3 note: some of the compiler flags provided by cargo are hidden query stack during panic: #0 [normalize_projection_ty] normalizing `>>, libp2p_swarm::upgrade::SendWrapper>>>, libp2p_swarm::upgrade::SendWrapper>, libp2p_swarm::upgrade::SendWrapper>>>>, libp2p_swarm::upgrade::SendWrapper>>>, libp2p_swarm::upgrade::SendWrapper>>> as libp2p_core::upgrade::InboundUpgrade>::Future` #1 [try_normalize_generic_arg_after_erasing_regions] normalizing `>>, libp2p_swarm::upgrade::SendWrapper>>>, libp2p_swarm::upgrade::SendWrapper>, libp2p_swarm::upgrade::SendWrapper>>>>, libp2p_swarm::upgrade::SendWrapper>>>, libp2p_swarm::upgrade::SendWrapper>>> as libp2p_core::upgrade::InboundUpgrade>::Future` #2 [fn_abi_of_instance] computing call ABI of `>>, libp2p_swarm::upgrade::SendWrapper>>>, libp2p_swarm::upgrade::SendWrapper>, libp2p_swarm::upgrade::SendWrapper>>>>, libp2p_swarm::upgrade::SendWrapper>>>, libp2p_swarm::upgrade::SendWrapper>>> as libp2p_swarm::upgrade::InboundUpgradeSend>::upgrade_inbound` end of query stack error: could not compile `subspace-farmer` (bin "subspace-farmer") ```

workingjubilee commented 11 months ago

@Shekelme Did you run the compiler, or was the compiler automatically executed by the software you downloaded?

Shekelme commented 11 months ago

Sorry, I found that file rustc-ice-2023-10-08T22%3A30%3A04.17578496Z-955370.txt . Not automatically, I was compiling the binary with cargo build --profile production --bin subspace-farmer.

workingjubilee commented 11 months ago

@Shekelme While in the directory, can you run the following script?

rm rust-toolchain.toml # this makes the next command work
rustup update nightly # use the latest rustc version
cargo +nightly build --profile production --bin subspace-farmer # try the build
# save the .txt for reporting later by shoving it in here:
mkdir report-this-log
mv ./rustc-ice-*.txt ./report-this-log
cargo clean # starting over to check if it's an incremental build cache failure
cargo +nightly build --profile production --bin subspace-farmer
mv ./rustc-ice*.txt ./report-this-log