Skip to content

Compiling large projects with over-heating CPUs causes weird crashes #88902

Closed
@Gelox

Description

@Gelox

When I'm compiling a large project (500+ dependencies) then I will experience strange crashes usually due to SIGSEGV 11, sometimes due to other things.
This will happen after running for a while when my CPU starts getting high in temperature. I have other issues that are caused by over-heating CPUs so I find this to be the likely cause.

After compiling about 150-300 dependencies then the compiler will crash with some errors message and then I'll have to recompile. Recompiling works fine, the already compiled dependencies will be in the cache so I'll redo it a couple of times and it works fine. Another piece of evidence that this is due to over-heating CPUs is that the longer I wait between recompiles the longer it is able to run without crashing.

Here is an error I got today caused by this issue.

Meta

rustc --version --verbose:

rustc 1.55.0 (c8dfcfe04 2021-09-06)
binary: rustc
commit-hash: c8dfcfe046a7680554bf4eb612bad840e7631c4b
commit-date: 2021-09-06
host: x86_64-unknown-linux-gnu
release: 1.55.0
LLVM version: 12.0.1

Error output

thread 'rustc' panicked at 'index out of bounds: the len is 971 but the index is 2132081228', compiler/rustc_span/src/hygiene.rs:389:9
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

note: rustc 1.55.0 (c8dfcfe04 2021-09-06) running on x86_64-unknown-linux-gnu

note: compiler flags: -C embed-bitcode=no -C debuginfo=2 --crate-type lib

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

query stack during panic:
end of query stack
error: could not compile `object`
warning: build failed, waiting for other jobs to finish...
error: build failed
Backtrace

/home/user/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/../lib/librustc_driver-2d8919e595cbef4e.so(+0x52fca3)[0x7f1588c30ca3]
/usr/lib/libpthread.so.0(+0x13870)[0x7f1588353870]
error: could not compile `reqwest`

Caused by:
  process didn't exit successfully: `rustc --crate-name reqwest --edition=2018 /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/reqwest-0.10.10/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debuginfo=2 --cfg 'feature="__tls"' --cfg 'feature="blocking"' --cfg 'feature="default"' --cfg 'feature="default-tls"' --cfg 'feature="hyper-tls"' --cfg 'feature="json"' --cfg 'feature="native-tls-crate"' --cfg 'feature="serde_json"' --cfg 'feature="tokio-tls"' -C metadata=df5ad68783142d89 -C extra-filename=-df5ad68783142d89 --out-dir <--removed--> -L dependency=<--removed-personal-info-->-b47fd69f7fd43a4e.rmeta --cap-lints allow` (signal: 11, SIGSEGV: invalid memory reference)
warning: build failed, waiting for other jobs to finish...
error: build failed

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