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

[HW4] Couldn't Compile cargo test --test boc due to non-existent object file? #915

Closed
Coll1ns-cult opened this issue Apr 9, 2024 · 2 comments
Assignees
Labels
question Further information is requested tech-support various issues related to servers, tools, etc

Comments

@Coll1ns-cult
Copy link

I run cargo test --test boc, but I faced with the following error:
cargo test --test boc thread 'coordinator' panicked at compiler/rustc_middle/src/util/bug.rs:36:26: /rustc/a165f1f65015b1bd4afd2ec50700aaacf2e0c485/compiler/rustc_codegen_ssa/src/back/write.rs:1617: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 5: rustc_codegen_ssa::back::write::start_executing_work::<rustc_codegen_llvm::LlvmCodegenBackend>::{closure#5} note: Some details are omitted, run with RUST_BACKTRACE=full` for a verbose backtrace.

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

note: it seems that this compiler 1.78.0-nightly (a165f1f65 2024-03-12) is outdated, a newer nightly should have been released in the mean time
|
= note: please consider running rustup update nightly to update the nightly channel and check if this problem still persists
= note: if the problem still persists, 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/ubuntu/cs431/homework/rustc-ice-2024-04-09T05_00_27-779225.txt to your bug report

note: compiler flags: --crate-type lib -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: cached cgu 2bzdncuszlvs1fi3 should have an object file, but doesn't

Compiling cs431-homework v0.1.0 (/home/ubuntu/cs431/homework)
thread 'coordinator' panicked at compiler/rustc_middle/src/util/bug.rs:36:26:
/rustc/a165f1f65015b1bd4afd2ec50700aaacf2e0c485/compiler/rustc_codegen_ssa/src/back/write.rs:1617:29: worker thread panicked
stack backtrace:
0: 0x7f811218c6f2 - std::backtrace_rs::backtrace::libunwind::trace::h62f3b47628dd17b6
at /rustc/a165f1f65015b1bd4afd2ec50700aaacf2e0c485/library/std/src/../../backtrace/src/backtrace/libunwind.rs:105:5
1: 0x7f811218c6f2 - std::backtrace_rs::backtrace::trace_unsynchronized::h3892e36781ebd7a9
at /rustc/a165f1f65015b1bd4afd2ec50700aaacf2e0c485/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
2: 0x7f811218c6f2 - std::sys_common::backtrace::_print_fmt::h5753abb8ee14651e
at /rustc/a165f1f65015b1bd4afd2ec50700aaacf2e0c485/library/std/src/sys_common/backtrace.rs:68:5
3: 0x7f811218c6f2 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h641e95e38120aa19
at /rustc/a165f1f65015b1bd4afd2ec50700aaacf2e0c485/library/std/src/sys_common/backtrace.rs:44:22
4: 0x7f81121dd7fc - core::fmt::rt::Argument::fmt::h39826a56c345298d
at /rustc/a165f1f65015b1bd4afd2ec50700aaacf2e0c485/library/core/src/fmt/rt.rs:142:9
5: 0x7f81121dd7fc - core::fmt::write::hcfbdb7435841633f
at /rustc/a165f1f65015b1bd4afd2ec50700aaacf2e0c485/library/core/src/fmt/mod.rs:1153:17
6: 0x7f81121811df - std::io::Write::write_fmt::hcceb62a2bad26450
at /rustc/a165f1f65015b1bd4afd2ec50700aaacf2e0c485/library/std/src/io/mod.rs:1843:15
7: 0x7f811218c4c4 - std::sys_common::backtrace::_print::ha68066140c1e1d27
at /rustc/a165f1f65015b1bd4afd2ec50700aaacf2e0c485/library/std/src/sys_common/backtrace.rs:47:5
8: 0x7f811218c4c4 - std::sys_common::backtrace::print::h48d14ab80b242509
at /rustc/a165f1f65015b1bd4afd2ec50700aaacf2e0c485/library/std/src/sys_common/backtrace.rs:34:9
9: 0x7f811218f1cb - std::panicking::default_hook::{{closure}}::h6c98b71ccc05382a
10: 0x7f811218ef23 - std::panicking::default_hook::h78c2716692948d24
at /rustc/a165f1f65015b1bd4afd2ec50700aaacf2e0c485/library/std/src/panicking.rs:292:9
11: 0x7f81150a742f - std[d99a67f26152ed04]::panicking::update_hook::<alloc[3da730520fd9e9f]::boxed::Box<rustc_driver_impl[32be582443c69875]::install_ice_hook::{closure#0}>>::{closure#0}
12: 0x7f811218f930 - <alloc::boxed::Box<F,A> as core::ops::function::Fn>::call::h3123ef48483f5a9f
at /rustc/a165f1f65015b1bd4afd2ec50700aaacf2e0c485/library/alloc/src/boxed.rs:2034:9
13: 0x7f811218f930 - std::panicking::rust_panic_with_hook::hc8ea6fc0780cadf2
at /rustc/a165f1f65015b1bd4afd2ec50700aaacf2e0c485/library/std/src/panicking.rs:783:13
14: 0x7f81154db845 - std[d99a67f26152ed04]::panicking::begin_panic::<alloc[3da730520fd9e9f]::string::String>::{closure#0}
15: 0x7f81154d4166 - std[d99a67f26152ed04]::sys_common::backtrace::__rust_end_short_backtrace::<std[d99a67f26152ed04]::panicking::begin_panic<alloc[3da730520fd9e9f]::string::String>::{closure#0}, !>
16: 0x7f81154cf848 - std[d99a67f26152ed04]::panicking::begin_panic::<alloc[3da730520fd9e9f]::string::String>
17: 0x7f811555ce01 - rustc_middle[2167abb34cd9315b]::util::bug::opt_span_bug_fmt::<rustc_span[7af1910a94d968b0]::span_encoding::Span>::{closure#0}
18: 0x7f811554044a - rustc_middle[2167abb34cd9315b]::ty::context::tls::with_opt::<rustc_middle[2167abb34cd9315b]::util::bug::opt_span_bug_fmt<rustc_span[7af1910a94d968b0]::span_encoding::Span>::{closure#0}, !>::{closure#0}
19: 0x7f81155402e8 - rustc_middle[2167abb34cd9315b]::ty::context::tls::with_context_opt::<rustc_middle[2167abb34cd9315b]::ty::context::tls::with_opt<rustc_middle[2167abb34cd9315b]::util::bug::opt_span_bug_fmt<rustc_span[7af1910a94d968b0]::span_encoding::Span>::{closure#0}, !>::{closure#0}, !>
20: 0x7f8113ccbfd0 - rustc_middle[2167abb34cd9315b]::util::bug::bug_fmt
21: 0x7f811733c78a - rustc_codegen_ssa[dcde6b4f02088eed]::back::write::start_executing_work::<rustc_codegen_llvm[d8993c8d214294fd]::LlvmCodegenBackend>::{closure#5}
22: 0x7f811733a480 - std[d99a67f26152ed04]::sys_common::backtrace::_rust_begin_short_backtrace::<<rustc_codegen_llvm[d8993c8d214294fd]::LlvmCodegenBackend as rustc_codegen_ssa[dcde6b4f02088eed]::traits::backend::ExtraBackendMethods>::spawn_named_thread<rustc_codegen_ssa[dcde6b4f02088eed]::back::write::start_executing_work<rustc_codegen_llvm[d8993c8d214294fd]::LlvmCodegenBackend>::{closure#5}, core[d2efe8fd8090ae32]::result::Result<rustc_codegen_ssa[dcde6b4f02088eed]::back::write::CompiledModules, ()>>::{closure#0}, core[d2efe8fd8090ae32]::result::Result<rustc_codegen_ssa[dcde6b4f02088eed]::back::write::CompiledModules, ()>>
23: 0x7f811733a2b0 - <<std[d99a67f26152ed04]::thread::Builder>::spawn_unchecked
<<rustc_codegen_llvm[d8993c8d214294fd]::LlvmCodegenBackend as rustc_codegen_ssa[dcde6b4f02088eed]::traits::backend::ExtraBackendMethods>::spawn_named_thread<rustc_codegen_ssa[dcde6b4f02088eed]::back::write::start_executing_work<rustc_codegen_llvm[d8993c8d214294fd]::LlvmCodegenBackend>::{closure#5}, core[d2efe8fd8090ae32]::result::Result<rustc_codegen_ssa[dcde6b4f02088eed]::back::write::CompiledModules, ()>>::{closure#0}, core[d2efe8fd8090ae32]::result::Result<rustc_codegen_ssa[dcde6b4f02088eed]::back::write::CompiledModules, ()>>::{closure#1} as core[d2efe8fd8090ae32]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
24: 0x7f8112199135 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce>::call_once::h5044a91960b98ce7
at /rustc/a165f1f65015b1bd4afd2ec50700aaacf2e0c485/library/alloc/src/boxed.rs:2020:9
25: 0x7f8112199135 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce>::call_once::hcd8b5448afe6ea4e
at /rustc/a165f1f65015b1bd4afd2ec50700aaacf2e0c485/library/alloc/src/boxed.rs:2020:9
26: 0x7f8112199135 - std::sys::pal::unix::thread::Thread::new::thread_start::hd4b31b2f3db552cc
at /rustc/a165f1f65015b1bd4afd2ec50700aaacf2e0c485/library/std/src/sys/pal/unix/thread.rs:108:17
27: 0x7f8111f42ac3 - start_thread
at ./nptl/pthread_create.c:442:8
28: 0x7f8111fd3a04 - __GI___clone
at ./misc/../sysdeps/unix/sysv/linux/x86_64/clone.S:100
29: 0x0 -

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

note: it seems that this compiler 1.78.0-nightly (a165f1f65 2024-03-12) is outdated, a newer nightly should have been released in the mean time
|
= note: please consider running rustup update nightly to update the nightly channel and check if this problem still persists
= note: if the problem still persists, 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/ubuntu/cs431/homework/rustc-ice-2024-04-09T08_24_24-63815.txt to your bug report

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: cached cgu 51iehjp6x6isq1vv should have an object file, but doesn't

error: could not compile cs431-homework (test "boc") due to 1 previous error`

I tried to google the error, but couldn't get any results. I believe the reason for this error is because of lldb debugger on vscode-remote. Previously, I didn't have any problems with complications, but later when I tried to debug a unit test by lldb, after a few successful tries, it showed an error: linking with cc failed: exit status: 1. I saw this reply on Github Issue: rust-lang/rustup#3581 (comment)
But I don't know what I am supposed to do at this point, since it is not the exact problem.

@Coll1ns-cult Coll1ns-cult added the question Further information is requested label Apr 9, 2024
@Lee-Janggun
Copy link
Member

Lee-Janggun commented Apr 9, 2024

Does running cargo clean first and trying again work?

This is an ICE, so it's a Rust error. So hopefully that fixes it...

@Coll1ns-cult
Copy link
Author

Yes, It worked, thanks for this!

@Lee-Janggun Lee-Janggun added the tech-support various issues related to servers, tools, etc label Apr 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested tech-support various issues related to servers, tools, etc
Projects
None yet
Development

No branches or pull requests

3 participants