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

jobserver client called before set and panic #118588

Closed
oksbsb opened this issue Dec 4, 2023 · 2 comments
Closed

jobserver client called before set and panic #118588

oksbsb opened this issue Dec 4, 2023 · 2 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. WG-compiler-parallel Working group: Parallelizing the compiler

Comments

@oksbsb
Copy link
Contributor

oksbsb commented Dec 4, 2023

Code

set thread=8 in $CARGO_HOME/config.toml, then run cargo install --debug volo-cli

[build]
rustflags = ["-Z", "threads=8"]

seems caused by #113730

Meta

rustc --version --verbose:

rustc 1.76.0-nightly (9fad68599 2023-12-03)
binary: rustc
commit-hash: 9fad6859925b34f9a0b1af592a7839ccb1e71f60
commit-date: 2023-12-03
host: x86_64-unknown-linux-gnu
release: 1.76.0-nightly
LLVM version: 17.0.5

Error output

thread 'rustc' panicked at compiler/rustc_data_structures/src/jobserver.rs:73:33:
jobserver check should have been called earlier
stack backtrace:
   0:     0x7f964f3d1e51 - std::backtrace_rs::backtrace::libunwind::trace::h6061033325ca8d5f
                               at /rustc/9fad6859925b34f9a0b1af592a7839ccb1e71f60/library/std/src/../../backtrace/src/backtrace/libunwind.rs:104:5
   1:     0x7f964f3d1e51 - std::backtrace_rs::backtrace::trace_unsynchronized::h1167ea6c3040af89
                               at /rustc/9fad6859925b34f9a0b1af592a7839ccb1e71f60/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7f964f3d1e51 - std::backtrace::Backtrace::create::h07a13ab3f3a63a43
                               at /rustc/9fad6859925b34f9a0b1af592a7839ccb1e71f60/library/std/src/backtrace.rs:332:13
   3:     0x7f964f3d1da0 - std::backtrace::Backtrace::force_capture::h20eed95b80ca1ae2
                               at /rustc/9fad6859925b34f9a0b1af592a7839ccb1e71f60/library/std/src/backtrace.rs:313:9
   4:     0x7f964c0eb0cc - std[ca116cedd296397e]::panicking::update_hook::<alloc[f7f5c0c53ccdabe6]::boxed::Box<rustc_driver_impl[4e1279a210f875d1]::install_ice_hook::{closure#0}>>::{closure#0}
   5:     0x7f964f3ed6c8 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h2e3061dd490aba0e
                               at /rustc/9fad6859925b34f9a0b1af592a7839ccb1e71f60/library/alloc/src/boxed.rs:2021:9
   6:     0x7f964f3ed6c8 - std::panicking::rust_panic_with_hook::ha3012055304d5173
                               at /rustc/9fad6859925b34f9a0b1af592a7839ccb1e71f60/library/std/src/panicking.rs:783:13
   7:     0x7f964f3ed41e - std::panicking::begin_panic_handler::{{closure}}::h02b6031bba5f51a7
                               at /rustc/9fad6859925b34f9a0b1af592a7839ccb1e71f60/library/std/src/panicking.rs:657:13
   8:     0x7f964f3ea9d6 - std::sys_common::backtrace::__rust_end_short_backtrace::hbe288a9d366b23ce
                               at /rustc/9fad6859925b34f9a0b1af592a7839ccb1e71f60/library/std/src/sys_common/backtrace.rs:171:18
   9:     0x7f964f3ed182 - rust_begin_unwind
                               at /rustc/9fad6859925b34f9a0b1af592a7839ccb1e71f60/library/std/src/panicking.rs:645:5
  10:     0x7f964f439c15 - core::panicking::panic_fmt::h52558bfe023b0e56
                               at /rustc/9fad6859925b34f9a0b1af592a7839ccb1e71f60/library/core/src/panicking.rs:72:14
  11:     0x7f964f4399c3 - core::panicking::panic_display::hef3841c9df83bc38
                               at /rustc/9fad6859925b34f9a0b1af592a7839ccb1e71f60/library/core/src/panicking.rs:193:5
  12:     0x7f964f4399c3 - core::panicking::panic_str::h8fb4c8aeec0299be
                               at /rustc/9fad6859925b34f9a0b1af592a7839ccb1e71f60/library/core/src/panicking.rs:168:5
  13:     0x7f964f4399c3 - core::option::expect_failed::hd60cb7c60936bb3a
                               at /rustc/9fad6859925b34f9a0b1af592a7839ccb1e71f60/library/core/src/option.rs:1980:5
  14:     0x7f964c0c65fb - rustc_data_structures[352089fef12d5cf6]::jobserver::acquire_thread
  15:     0x7f964bcee582 - <rayon_core[387b610b1c020375]::registry::ThreadBuilder>::run
  16:     0x7f964c0ed3b7 - <<crossbeam_utils[96c2e0db14eff34e]::thread::ScopedThreadBuilder>::spawn<<rayon_core[387b610b1c020375]::ThreadPoolBuilder>::build_scoped<rustc_interface[de342c667529d873]::util::run_in_thread_pool_with_globals<rustc_interface[de342c667529d873]::interface::run_compiler<core[c0bc3e49ab39a50c]::result::Result<(), rustc_span[eae331e1b7d19547]::ErrorGuaranteed>, rustc_driver_impl[4e1279a210f875d1]::run_compiler::{closure#0}>::{closure#0}, core[c0bc3e49ab39a50c]::result::Result<(), rustc_span[eae331e1b7d19547]::ErrorGuaranteed>>::{closure#3}::{closure#0}::{closure#0}, rustc_interface[de342c667529d873]::util::run_in_thread_pool_with_globals<rustc_interface[de342c667529d873]::interface::run_compiler<core[c0bc3e49ab39a50c]::result::Result<(), rustc_span[eae331e1b7d19547]::ErrorGuaranteed>, rustc_driver_impl[4e1279a210f875d1]::run_compiler::{closure#0}>::{closure#0}, core[c0bc3e49ab39a50c]::result::Result<(), rustc_span[eae331e1b7d19547]::ErrorGuaranteed>>::{closure#3}::{closure#0}::{closure#1}, core[c0bc3e49ab39a50c]::result::Result<(), rustc_span[eae331e1b7d19547]::ErrorGuaranteed>>::{closure#0}::{closure#0}::{closure#0}, ()>::{closure#0} as core[c0bc3e49ab39a50c]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  17:     0x7f964c0e66be - std[ca116cedd296397e]::sys_common::backtrace::__rust_begin_short_backtrace::<alloc[f7f5c0c53ccdabe6]::boxed::Box<dyn core[c0bc3e49ab39a50c]::ops::function::FnOnce<(), Output = ()> + core[c0bc3e49ab39a50c]::marker::Send>, ()>
  18:     0x7f964c0ed043 - <<std[ca116cedd296397e]::thread::Builder>::spawn_unchecked_<alloc[f7f5c0c53ccdabe6]::boxed::Box<dyn core[c0bc3e49ab39a50c]::ops::function::FnOnce<(), Output = ()> + core[c0bc3e49ab39a50c]::marker::Send>, ()>::{closure#1} as core[c0bc3e49ab39a50c]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  19:     0x7f964f3f7555 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hd1c6f093d833cd0b
                               at /rustc/9fad6859925b34f9a0b1af592a7839ccb1e71f60/library/alloc/src/boxed.rs:2007:9
  20:     0x7f964f3f7555 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hc0da20453235ce5e
                               at /rustc/9fad6859925b34f9a0b1af592a7839ccb1e71f60/library/alloc/src/boxed.rs:2007:9
  21:     0x7f964f3f7555 - std::sys::unix::thread::Thread::new::thread_start::he4d6253d6192e596
                               at /rustc/9fad6859925b34f9a0b1af592a7839ccb1e71f60/library/std/src/sys/unix/thread.rs:108:17
  22:     0x7f964926cac3 - start_thread
                               at ./nptl/pthread_create.c:442:8
  23:     0x7f96492fea40 - clone3
                               at ./misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
  24:                0x0 - <unknown>


rustc version: 1.76.0-nightly (9fad68599 2023-12-03)
platform: x86_64-unknown-linux-gnu
@oksbsb oksbsb 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 Dec 4, 2023
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Dec 4, 2023
@saethlin saethlin added WG-compiler-parallel Working group: Parallelizing the compiler and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Dec 5, 2023
@HTGAzureX1212
Copy link
Contributor

Encountered a similar issue for my project as well. Attached is the CI output from GitHub: https://github.com/TeamHarTex/HarTex/actions/runs/7109233994/job/19353828878?pr=1693

@oksbsb
Copy link
Contributor Author

oksbsb commented Dec 8, 2023

fixed by #118709

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. WG-compiler-parallel Working group: Parallelizing the compiler
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants