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

Panic while compiling on 1.75.0, aarch64-apple-darwin #120854

Closed
CinchBlue opened this issue Feb 9, 2024 · 1 comment · Fixed by #120865
Closed

Panic while compiling on 1.75.0, aarch64-apple-darwin #120854

CinchBlue opened this issue Feb 9, 2024 · 1 comment · Fixed by #120865
Assignees
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

@CinchBlue
Copy link

CinchBlue commented Feb 9, 2024

Overview

I cannot share details, but I was doing cargo test and cargo nextest on my codebase after a cargo sweep --time 10 and it had an error. Could this be due to incoherence of the cache?

Meta

╰─➤  rustc --version --verbose
rustc 1.75.0 (82e1608df 2023-12-21)
binary: rustc
commit-hash: 82e1608dfa6e0b5569232559e3d385fea5a93112
commit-date: 2023-12-21
host: aarch64-apple-darwin
release: 1.75.0
LLVM version: 17.0.6

Error output

Running cargo nextest
   Compiling my2_abc_types v0.1.0 (/Users/bob/work/3.myrepo/myrepo/lib/rust/my2/abc_types)
   Compiling customrouting_api v0.1.0 (/Users/bob/work/3.myrepo/myrepo/lib/rust/customrouting/api)
   Compiling my2_roleplay_model v0.1.0 (/Users/bob/work/3.myrepo/myrepo/lib/rust/my2/roleplay/model)
   Compiling repo_tools_bazel_build_codegen v0.1.0 (/Users/bob/work/3.myrepo/myrepo/lib/rust/repo_tools/bazel_build_codegen)
   Compiling asterisk_controller v0.1.0 (/Users/bob/work/3.myrepo/myrepo/services/asterisk_controller)
   Compiling generate_code v0.1.0 (/Users/bob/work/3.myrepo/myrepo/lib/rust/codegen/generate)
   Compiling commonlib_github v0.1.0 (/Users/bob/work/3.myrepo/myrepo/lib/rust/commonlib/github)
   Compiling goodb_storage_mysql v0.1.0 (/Users/bob/work/3.myrepo/myrepo/lib/rust/goodb/storage_mysql)
   Compiling goodb_api v0.1.0 (/Users/bob/work/3.myrepo/myrepo/lib/rust/goodb/api)
   Compiling my2_roleplay_api v0.1.0 (/Users/bob/work/3.myrepo/myrepo/lib/rust/my2/roleplay/api)
   Compiling customrouting_server v0.1.0 (/Users/bob/work/3.myrepo/myrepo/lib/rust/customrouting/server)
   Compiling playground v0.1.0 (/Users/bob/work/3.myrepo/myrepo/lib/rust/playground)
   Compiling my2_lib_content v0.1.0 (/Users/bob/work/3.myrepo/myrepo/lib/rust/my2/lib_shared/content)
thread 'cpy 20tg1ci7pxyvfa4j' panicked at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/compiler/rustc_codegen_ssa/src/back/write.rs:917:45:
no saved object file in work product
stack backtrace:
thread 'cpy 2uyiqw3khmcm5oym' panicked at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/compiler/rustc_codegen_ssa/src/back/write.rs:917:45:
no saved object file in work product
thread 'cpy 4i85ziw116l3ch2f' panicked at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/compiler/rustc_codegen_ssa/src/back/write.rs:917:45:
no saved object file in work product
   0: _rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::option::expect_failed
   3: rustc_codegen_ssa::back::write::execute_copy_from_cache_work_item::<rustc_codegen_llvm::LlvmCodegenBackend>
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

stack backtrace:
   0: _rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::option::expect_failed
   3: rustc_codegen_ssa::back::write::execute_copy_from_cache_work_item::<rustc_codegen_llvm::LlvmCodegenBackend>
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

stack backtrace:
   0: _rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::option::expect_failed
   3: rustc_codegen_ssa::back::write::execute_copy_from_cache_work_item::<rustc_codegen_llvm::LlvmCodegenBackend>
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

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

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

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: rustc 1.75.0 (82e1608df 2023-12-21) running on aarch64-apple-darwin

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.75.0 (82e1608df 2023-12-21) running on aarch64-apple-darwin

note: compiler flags: --crate-type lib -C embed-bitcode=no -C debuginfo=2 -C split-debuginfo=unpacked -C incremental=[REDACTED]

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

query stack during panic:
end of query stack
note: compiler flags: --crate-type lib -C embed-bitcode=no -C debuginfo=2 -C split-debuginfo=unpacked -C incremental=[REDACTED]

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

query stack during panic:
end of query stack
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.75.0 (82e1608df 2023-12-21) running on aarch64-apple-darwin

note: compiler flags: --crate-type lib -C embed-bitcode=no -C debuginfo=2 -C split-debuginfo=unpacked -C incremental=[REDACTED]

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

query stack during panic:
end of query stack
thread 'coordinator' panicked at compiler/rustc_middle/src/util/bug.rs:36:26:
/rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/compiler/rustc_codegen_ssa/src/back/write.rs:1590:29: worker thread panicked
stack backtrace:
   0: std::panicking::begin_panic::<alloc::string::String>
   1: rustc_middle::util::bug::opt_span_bug_fmt::<rustc_span::span_encoding::Span>::{closure#0}
   2: rustc_middle::ty::context::tls::with_opt::<rustc_middle::util::bug::opt_span_bug_fmt<rustc_span::span_encoding::Span>::{closure#0}, !>::{closure#0}
   3: rustc_middle::ty::context::tls::with_context_opt::<rustc_middle::ty::context::tls::with_opt<rustc_middle::util::bug::opt_span_bug_fmt<rustc_span::span_encoding::Span>::{closure#0}, !>::{closure#0}, !>
   4: rustc_middle::util::bug::bug_fmt
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

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: rustc 1.75.0 (82e1608df 2023-12-21) running on aarch64-apple-darwin

note: compiler flags: --crate-type lib -C embed-bitcode=no -C debuginfo=2 -C split-debuginfo=unpacked -C incremental=[REDACTED]

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

query stack during panic:
end of query stack
   Compiling goodb_coredb_server_side v0.1.0 (/Users/bob/work/3.myrepo/myrepo/lib/rust/goodb/coredb_server_side)
thread 'rustc' panicked at compiler/rustc_middle/src/util/bug.rs:36:26:
/rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/compiler/rustc_codegen_ssa/src/back/write.rs:1964:17: panic during codegen/LLVM phase
stack backtrace:
   0: std::panicking::begin_panic::<alloc::string::String>
   1: rustc_middle::util::bug::opt_span_bug_fmt::<rustc_span::span_encoding::Span>::{closure#0}
   2: rustc_middle::ty::context::tls::with_opt::<rustc_middle::util::bug::opt_span_bug_fmt<rustc_span::span_encoding::Span>::{closure#0}, !>::{closure#0}
   3: rustc_middle::ty::context::tls::with_context_opt::<rustc_middle::ty::context::tls::with_opt<rustc_middle::util::bug::opt_span_bug_fmt<rustc_span::span_encoding::Span>::{closure#0}, !>::{closure#0}, !>
   4: rustc_middle::util::bug::bug_fmt
   5: <rustc_session::session::Session>::time::<rustc_codegen_ssa::back::write::CompiledModules, <rustc_codegen_ssa::back::write::OngoingCodegen<rustc_codegen_llvm::LlvmCodegenBackend>>::join::{closure#0}>
   6: <rustc_codegen_ssa::back::write::OngoingCodegen<rustc_codegen_llvm::LlvmCodegenBackend>>::join
   7: <rustc_codegen_llvm::LlvmCodegenBackend as rustc_codegen_ssa::traits::backend::CodegenBackend>::join_codegen
   8: <rustc_interface::queries::Linker>::link
   9: rustc_span::set_source_map::<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#1}>::{closure#0}::{closure#0}>
  10: <scoped_tls::ScopedKey<rustc_span::SessionGlobals>>::set::<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>
  11: rustc_span::create_session_globals_then::<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#1}>::{closure#0}>
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

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: rustc 1.75.0 (82e1608df 2023-12-21) running on aarch64-apple-darwin

note: compiler flags: --crate-type lib -C embed-bitcode=no -C debuginfo=2 -C split-debuginfo=unpacked -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 `my_api` (lib)
warning: build failed, waiting for other jobs to finish...
error: command `/Users/bob/.rustup/toolchains/1.75.0-aarch64-apple-darwin/bin/cargo test --no-run --message-format json-render-diagnostics --workspace --exclude my-wasm --exclude my-android --target aarch64-apple-darwin` exited with code 101

@CinchBlue CinchBlue 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 Feb 9, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Feb 9, 2024
@saethlin saethlin self-assigned this Feb 10, 2024
@saethlin saethlin removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Feb 10, 2024
@saethlin
Copy link
Member

Could this be due to incoherence of the cache?

That seems very likely.

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Feb 10, 2024
…rcote

Turn the "no saved object file in work product" ICE into a translatable fatal error

I don't know if it's fair to say this fixes rust-lang#120854 but it surely makes the error reporting better and should encourage people with good instincts like `@CinchBlue.`
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Feb 10, 2024
…rcote

Turn the "no saved object file in work product" ICE into a translatable fatal error

I don't know if it's fair to say this fixes rust-lang#120854 but it surely makes the error reporting better and should encourage people with good instincts like ``@CinchBlue.``
@bors bors closed this as completed in 9a8958f Feb 10, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Feb 10, 2024
Rollup merge of rust-lang#120865 - saethlin:missing-o-files, r=nnethercote

Turn the "no saved object file in work product" ICE into a translatable fatal error

I don't know if it's fair to say this fixes rust-lang#120854 but it surely makes the error reporting better and should encourage people with good instincts like ```@CinchBlue.```
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

Successfully merging a pull request may close this issue.

3 participants