Skip to content

'failed to spawn thread' from OS is not handled early on and causes ICEs later. #81239

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

Closed
egeyar opened this issue Jan 21, 2021 · 1 comment
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

@egeyar
Copy link

egeyar commented Jan 21, 2021

Not easily reproducible.
Seems related to the issue #77894.

A colleague saw ICEs after spawning a thread failed. Maybe the compiler can exit gracefully at that point, rather than continuing and throwing ICEs later on.

The error logs state the version as:
note: rustc 1.45.2 running on x86_64-unknown-linux-gnu

The following is the logs we got:

building
   Compiling <our_sources> v0.1.0 (/build/source)
thread '<unnamed>' panicked at 'failed to spawn thread: Os { code: 11, kind: WouldBlock, message: "Resource temporarily unavailable" }', /build/rustc-1.45.2-src/src/libstd/thread/mod.rs:619:5
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/blob/master/CONTRIBUTING.md#bug-reports

note: rustc 1.45.2 running on x86_64-unknown-linux-gnu

note: compiler flags: -C embed-bitcode=no -C debuginfo=2 -C linker=/nix/store/azayfhqyg9mjyv6rv9bcypi6ws8aqfmy-gcc-wrapper-9.3.0/bin/cc -C incremental -C rpath --crate-type lib

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

thread 'rustc' panicked at 'src/librustc_codegen_ssa/back/write.rs:1701: panic during codegen/LLVM phase', src/librustc_middle/util/bug.rs:37: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/blob/master/CONTRIBUTING.md#bug-reports

note: rustc 1.45.2 running on x86_64-unknown-linux-gnu

note: compiler flags: -C embed-bitcode=no -C debuginfo=2 -C linker=/nix/store/azayfhqyg9mjyv6rv9bcypi6ws8aqfmy-gcc-wrapper-9.3.0/bin/cc -C incremental -C rpath --crate-type lib

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

error: could not compile `<our_sources>`.

To learn more, run the command again with --verbose.
builder for '/nix/store/wnnqgm71yim8l4cz6bzxkqw79k4wil9b-<our_sources>-0.1.0.drv' failed with exit code 101
@egeyar egeyar 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 Jan 21, 2021
@jyn514
Copy link
Member

jyn514 commented Jan 21, 2021

This indeed looks like a duplicate of #77894.

@jyn514 jyn514 closed this as completed Jan 21, 2021
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

2 participants