Skip to content

ICE panic because the compiler failed to spawn a thread #76230

Closed as not planned
@eleanor-em

Description

@eleanor-em

While compiling my (rather large) Cargo project, I hit an ICE panic because rustc failed to start a new thread. This was because my system was overloaded, which makes sense, but I assume the compiler shouldn't panic in this case and instead exit gracefully? I asked on the Rust Discord and was advised to post the report here.

Meta

rustc --version --verbose:

binary: rustc
commit-hash: d006f5734f49625c34d6fc33bf6b9967243abca8
commit-date: 2020-08-28
host: x86_64-unknown-linux-gnu
release: 1.48.0-nightly
LLVM version: 11.0

Error output

thread '<unnamed>' panicked at 'failed to spawn thread: Os { code: 11, kind: WouldBlock, message: "Resource temporarily unavailable" }', /rustc/de521cbb303c08febd9fa3755caccd4f3e491ea3/library/std/src/thread/mod.rs:596:29
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

thread 'rustc' panicked at 'failed to spawn thread: Os { code: 11, kind: WouldBlock, message: "Resource temporarily unavailable" }', /rustc/de521cbb303c08febd9fa3755caccd4f3e491ea3/library/std/src/thread/mod.rs:596:29
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

error: internal compiler error: unexpected panic

note: 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

error: internal compiler error: unexpected panic

note: 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.47.0-nightly (de521cbb3 2020-08-21) running on x86_64-unknown-linux-gnu

note: compiler flags: -C opt-level=3 -C embed-bitcode=no --crate-type lib

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

note: rustc 1.47.0-nightly (de521cbb3 2020-08-21) running on x86_64-unknown-linux-gnu

note: compiler flags: -C opt-level=3 -C embed-bitcode=no --crate-type lib

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

thread 'rustc' panicked at '/rustc/de521cbb303c08febd9fa3755caccd4f3e491ea3/src/librustc_codegen_ssa/back/write.rs:1713:17: panic during codegen/LLVM phase', src/librustc_middle/util/bug.rs:34:26

error: internal compiler error: unexpected panic

note: 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.47.0-nightly (de521cbb3 2020-08-21) running on x86_64-unknown-linux-gnu

note: compiler flags: -C opt-level=3 -C embed-bitcode=no --crate-type lib

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

error: could not compile `color_quant`.

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed
Makefile:2: recipe for target 'all' failed
make: *** [all] Error 101

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.E-needs-mcveCall for participation: This issue has a repro, but needs a Minimal Complete and Verifiable ExampleI-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