Skip to content

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

Closed as not planned
@sonicjhon1

Description

@sonicjhon1

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions