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

RUSTFLAGS="-Zthreads=8" cargo run fails (tested with arch WSL2 and Windows 11) #118632

Closed
sonicjhon1 opened this issue Dec 5, 2023 · 2 comments
Closed
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

@sonicjhon1
Copy link

Code

fn main() {
    println!("Hello, world!");
}

Meta

rustc --version --verbose:

rustc 1.76.0-nightly (0e2dac837 2023-12-04)
binary: rustc
commit-hash: 0e2dac8375950a12812ec65868e42b43ed214ef9
commit-date: 2023-12-04
host: x86_64-unknown-linux-gnu
release: 1.76.0-nightly
LLVM version: 17.0.5

Error output

 ╭─sonicj@LEGION in repo: ice on  master [?] is  v0.1.0 via  v1.76.0-nightly as 🧙 took 23ms
[🔴] × RUSTFLAGS="-Zthreads=8" cargo run
error: failed to run `rustc` to learn about target-specific information

Caused by:
  process didn't exit successfully: `/home/sonicj/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/rustc - --crate-name ___ --print=file-names -Zthreads=8 --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib --crate-type proc-macro --print=sysroot --print=split-debuginfo --print=crate-name --print=cfg` (signal: 6, SIGABRT: process abort signal)
  --- stderr
  thread 'rustc' panicked at compiler/rustc_data_structures/src/jobserver.rs:73:33:
  jobserver check should have been called earlier
  stack backtrace:
  thread 'rustc' panicked at compiler/rustc_data_structures/src/jobserver.rs:73:33:
  jobserver check should have been called earlier
  thread 'main' panicked at compiler/rustc_data_structures/src/jobserver.rs:77:33:
  jobserver check should have been called earlier
  thread 'rustc' panicked at compiler/rustc_data_structures/src/jobserver.rs:73:33:
  jobserver check should have been called earlier
  thread 'rustc' panicked at compiler/rustc_data_structures/src/jobserver.rs:73:33:
  jobserver check should have been called earlier
  thread 'rustc' panicked at compiler/rustc_data_structures/src/jobserver.rs:73:33:
  jobserver check should have been called earlier
  thread 'rustc' panicked at compiler/rustc_data_structures/src/jobserver.rs:73:33:
  jobserver check should have been called earlier
  thread 'rustc' panicked at compiler/rustc_data_structures/src/jobserver.rs:73:33:
  jobserver check should have been called earlier
  thread 'rustc' panicked at compiler/rustc_data_structures/src/jobserver.rs:73:33:
  jobserver check should have been called earlier

rustc-ice-2023-12-05T04_07_46-1469.txt

Backtrace

Caused by:
  process didn't exit successfully: `/home/sonicj/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/rustc - --crate-name ___ --print=file-names -Zthreads=8 --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib --crate-type proc-macro --print=sysroot --print=split-debuginfo --print=crate-name --print=cfg` (signal: 6, SIGABRT: process abort signal)
  --- stderr
  thread 'rustc' panicked at compiler/rustc_data_structures/src/jobserver.rs:73:33:
  jobserver check should have been called earlier
  stack backtrace:
  thread 'rustc' panicked at compiler/rustc_data_structures/src/jobserver.rs:73:33:
  jobserver check should have been called earlier
  thread 'main' panicked at compiler/rustc_data_structures/src/jobserver.rs:77:33:
  jobserver check should have been called earlier
  thread 'rustc' panicked at compiler/rustc_data_structures/src/jobserver.rs:73:33:
  jobserver check should have been called earlier
  thread 'rustc' panicked at compiler/rustc_data_structures/src/jobserver.rs:73:33:
  jobserver check should have been called earlier
  thread 'rustc' panicked at compiler/rustc_data_structures/src/jobserver.rs:73:33:
  jobserver check should have been called earlier
  thread 'rustc' panicked at compiler/rustc_data_structures/src/jobserver.rs:73:33:
  jobserver check should have been called earlier
  thread 'rustc' panicked at compiler/rustc_data_structures/src/jobserver.rs:73:33:
  jobserver check should have been called earlier
  thread 'rustc' panicked at compiler/rustc_data_structures/src/jobserver.rs:73:33:
  jobserver check should have been called earlier
     0: rust_begin_unwind
               at /rustc/0e2dac8375950a12812ec65868e42b43ed214ef9/library/std/src/panicking.rs:645:5
     1: core::panicking::panic_fmt
               at /rustc/0e2dac8375950a12812ec65868e42b43ed214ef9/library/core/src/panicking.rs:72:14
     2: core::panicking::panic_display
               at /rustc/0e2dac8375950a12812ec65868e42b43ed214ef9/library/core/src/panicking.rs:193:5
     3: core::panicking::panic_str
               at /rustc/0e2dac8375950a12812ec65868e42b43ed214ef9/library/core/src/panicking.rs:168:5
     4: core::option::expect_failed
               at /rustc/0e2dac8375950a12812ec65868e42b43ed214ef9/library/core/src/option.rs:1980:5
     5: rustc_data_structures::jobserver::acquire_thread
     6: <rayon_core::registry::ThreadBuilder>::run
     7: <<crossbeam_utils::thread::ScopedThreadBuilder>::spawn<<rayon_core::ThreadPoolBuilder>::build_scoped<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#3}::{closure#0}::{closure#0}, rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#3}::{closure#0}::{closure#1}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}::{closure#0}, ()>::{closure#0} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

  stack backtrace:
     0: rust_begin_unwind
               at /rustc/0e2dac8375950a12812ec65868e42b43ed214ef9/library/std/src/panicking.rs:645:5
     1: core::panicking::panic_fmt
               at /rustc/0e2dac8375950a12812ec65868e42b43ed214ef9/library/core/src/panicking.rs:72:14
     2: core::panicking::panic_display
               at /rustc/0e2dac8375950a12812ec65868e42b43ed214ef9/library/core/src/panicking.rs:193:5
     3: core::panicking::panic_str
               at /rustc/0e2dac8375950a12812ec65868e42b43ed214ef9/library/core/src/panicking.rs:168:5
     4: core::option::expect_failed
               at /rustc/0e2dac8375950a12812ec65868e42b43ed214ef9/library/core/src/option.rs:1980:5
     5: rustc_data_structures::jobserver::acquire_thread
     6: <rayon_core::registry::ThreadBuilder>::run
     7: <<crossbeam_utils::thread::ScopedThreadBuilder>::spawn<<rayon_core::ThreadPoolBuilder>::build_scoped<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#3}::{closure#0}::{closure#0}, rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#3}::{closure#0}::{closure#1}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}::{closure#0}, ()>::{closure#0} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

  stack backtrace:
     0: rust_begin_unwind
               at /rustc/0e2dac8375950a12812ec65868e42b43ed214ef9/library/std/src/panicking.rs:645:5
     1: core::panicking::panic_fmt
               at /rustc/0e2dac8375950a12812ec65868e42b43ed214ef9/library/core/src/panicking.rs:72:14
     2: core::panicking::panic_display
               at /rustc/0e2dac8375950a12812ec65868e42b43ed214ef9/library/core/src/panicking.rs:193:5
     3: core::panicking::panic_str
               at /rustc/0e2dac8375950a12812ec65868e42b43ed214ef9/library/core/src/panicking.rs:168:5
     4: core::option::expect_failed
               at /rustc/0e2dac8375950a12812ec65868e42b43ed214ef9/library/core/src/option.rs:1980:5
     5: rustc_data_structures::jobserver::release_thread
     6: crossbeam_utils::thread::scope::<<rayon_core::ThreadPoolBuilder>::build_scoped<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#3}::{closure#0}::{closure#0}, rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#3}::{closure#0}::{closure#1}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}, core::result::Result<core::result::Result<(), rustc_span::ErrorGuaranteed>, rayon_core::ThreadPoolBuildError>>
     7: rustc_driver_impl::run_compiler
     8: rustc_driver_impl::main
     9: rustc_main::main
  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: please attach the file at `/home/sonicj/Github/ice/rustc-ice-2023-12-05T04_07_46-1469.txt` to your bug report

  note: compiler flags: -Z threads=8 --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib --crate-type proc-macro

  query stack during panic:
  end of query stack
  Rayon: detected unexpected panic; aborting
  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/sonicj/Github/ice/rustc-ice-2023-12-05T04_07_46-1469.txt` to your bug report

  note: compiler flags: -Z threads=8 --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib --crate-type proc-macro

  query stack during panic:
  stack backtrace:
  end of query stack
     0: rust_begin_unwind
               at /rustc/0e2dac8375950a12812ec65868e42b43ed214ef9/library/std/src/panicking.rs:645:5
     1: core::panicking::panic_fmt
               at /rustc/0e2dac8375950a12812ec65868e42b43ed214ef9/library/core/src/panicking.rs:72:14
     2: core::panicking::panic_display
               at /rustc/0e2dac8375950a12812ec65868e42b43ed214ef9/library/core/src/panicking.rs:193:5
     3: core::panicking::panic_str
               at /rustc/0e2dac8375950a12812ec65868e42b43ed214ef9/library/core/src/panicking.rs:168:5
     4: core::option::expect_failed
               at /rustc/0e2dac8375950a12812ec65868e42b43ed214ef9/library/core/src/option.rs:1980:5
     5: rustc_data_structures::jobserver::acquire_thread
     6: <rayon_core::registry::ThreadBuilder>::run
     7: <<crossbeam_utils::thread::ScopedThreadBuilder>::spawn<<rayon_core::ThreadPoolBuilder>::build_scoped<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#3}::{closure#0}::{closure#0}, rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#3}::{closure#0}::{closure#1}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}::{closure#0}, ()>::{closure#0} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

  stack backtrace:
     0: rust_begin_unwind
               at /rustc/0e2dac8375950a12812ec65868e42b43ed214ef9/library/std/src/panicking.rs:645:5
     1: core::panicking::panic_fmt
               at /rustc/0e2dac8375950a12812ec65868e42b43ed214ef9/library/core/src/panicking.rs:72:14
  Rayon: detected unexpected panic; aborting
     2: core::panicking::panic_display
               at /rustc/0e2dac8375950a12812ec65868e42b43ed214ef9/library/core/src/panicking.rs:193:5
     3: core::panicking::panic_str
               at /rustc/0e2dac8375950a12812ec65868e42b43ed214ef9/library/core/src/panicking.rs:168:5
     4: core::option::expect_failed
               at /rustc/0e2dac8375950a12812ec65868e42b43ed214ef9/library/core/src/option.rs:1980:5
     5: rustc_data_structures::jobserver::acquire_thread
     6: <rayon_core::registry::ThreadBuilder>::run
     7: <<crossbeam_utils::thread::ScopedThreadBuilder>::spawn<<rayon_core::ThreadPoolBuilder>::build_scoped<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#3}::{closure#0}::{closure#0}, rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#3}::{closure#0}::{closure#1}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}::{closure#0}, ()>::{closure#0} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

  stack backtrace:
     0: rust_begin_unwind
               at /rustc/0e2dac8375950a12812ec65868e42b43ed214ef9/library/std/src/panicking.rs:645:5
     1: core::panicking::panic_fmt
               at /rustc/0e2dac8375950a12812ec65868e42b43ed214ef9/library/core/src/panicking.rs:72:14
     2: core::panicking::panic_display
               at /rustc/0e2dac8375950a12812ec65868e42b43ed214ef9/library/core/src/panicking.rs:193:5
     3: core::panicking::panic_str
               at /rustc/0e2dac8375950a12812ec65868e42b43ed214ef9/library/core/src/panicking.rs:168:5
     4: core::option::expect_failed
               at /rustc/0e2dac8375950a12812ec65868e42b43ed214ef9/library/core/src/option.rs:1980:5
     5: rustc_data_structures::jobserver::acquire_thread
     6: <rayon_core::registry::ThreadBuilder>::run
     7: <<crossbeam_utils::thread::ScopedThreadBuilder>::spawn<<rayon_core::ThreadPoolBuilder>::build_scoped<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#3}::{closure#0}::{closure#0}, rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#3}::{closure#0}::{closure#1}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}::{closure#0}, ()>::{closure#0} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

  stack backtrace:
     0: rust_begin_unwind
               at /rustc/0e2dac8375950a12812ec65868e42b43ed214ef9/library/std/src/panicking.rs:645:5
     1: core::panicking::panic_fmt
               at /rustc/0e2dac8375950a12812ec65868e42b43ed214ef9/library/core/src/panicking.rs:72:14
     2: core::panicking::panic_display
               at /rustc/0e2dac8375950a12812ec65868e42b43ed214ef9/library/core/src/panicking.rs:193:5
     3: core::panicking::panic_str
               at /rustc/0e2dac8375950a12812ec65868e42b43ed214ef9/library/core/src/panicking.rs:168:5
     4: core::option::expect_failed
               at /rustc/0e2dac8375950a12812ec65868e42b43ed214ef9/library/core/src/option.rs:1980:5
     5: rustc_data_structures::jobserver::acquire_thread
     6: <rayon_core::registry::ThreadBuilder>::run
     7: <<crossbeam_utils::thread::ScopedThreadBuilder>::spawn<<rayon_core::ThreadPoolBuilder>::build_scoped<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#3}::{closure#0}::{closure#0}, rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#3}::{closure#0}::{closure#1}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}::{closure#0}, ()>::{closure#0} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

@sonicjhon1 sonicjhon1 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 5, 2023
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Dec 5, 2023
@sonicjhon1 sonicjhon1 changed the title RUSTFLAGS="-Zthreads=8" cargo run fails (only tested with arch WSL2) RUSTFLAGS="-Zthreads=8" cargo run fails (tested with arch WSL2 and Windows 11) Dec 5, 2023
@crlf0710
Copy link
Member

crlf0710 commented Dec 5, 2023

Seems duplicate of #118588

@sonicjhon1
Copy link
Author

Seems duplicate of #118588

Ah yeah, I'll close this then.
Thank you for pointing it out ❤️

@sonicjhon1 sonicjhon1 closed this as not planned Won't fix, can't repro, duplicate, stale Dec 5, 2023
@fmease fmease removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Dec 7, 2023
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

No branches or pull requests

4 participants