Skip to content

rust-lld corruption with Ctrl+C #128860

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
Axel-Reactor opened this issue Aug 9, 2024 · 2 comments
Closed

rust-lld corruption with Ctrl+C #128860

Axel-Reactor opened this issue Aug 9, 2024 · 2 comments
Labels
A-incr-comp Area: Incremental compilation A-linkage Area: linking into static, shared libraries and binaries C-bug Category: This is a bug.

Comments

@Axel-Reactor
Copy link

Axel-Reactor commented Aug 9, 2024

When interrupting linking with rust-lld.exe it sometimes corrupts the target and the only recovery is cargo clean.
I'm getting tones of errors like this if I try cargo build again after:
= note: rust-lld: error: undefined symbol: anon.8ff5a01038e5b419b80b5d238bffa21c.22.llvm.13741956020784447919
rust-lld: error: undefined symbol: xx::xxxx::xxxx::GLOBAL::h22b2a472d7972d2f (.llvm.10192556018238492745)
rust-lld: error: undefined symbol: core::hint::unreachable_unchecked::precondition_check::h644ec5c1a75164f9 (.llvm.10192556018238492745)

This isn't a good UX. Ctrl+C should be robust and not leave things in a bad state.

@Axel-Reactor Axel-Reactor added the C-bug Category: This is a bug. label Aug 9, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Aug 9, 2024
@Axel-Reactor Axel-Reactor changed the title rust-lld corruption with Cltr+C rust-lld corruption with Ctrl+C Aug 9, 2024
@bjorn3
Copy link
Member

bjorn3 commented Aug 9, 2024

Duplicate of #81280. Recovering from this can also be done by clearing the incr comp cache using rm -r target/debug/incremental. The incr comp cache should only be finalized after it is fully written, but this bug seems to indicate that finalization of the incr comp cache is done just a bit too early.

@bjorn3 bjorn3 added A-incr-comp Area: Incremental compilation A-linkage Area: linking into static, shared libraries and binaries labels Aug 9, 2024
@workingjubilee
Copy link
Member

closing as duplicate.

@workingjubilee workingjubilee closed this as not planned Won't fix, can't repro, duplicate, stale Aug 10, 2024
@jieyouxu jieyouxu removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Aug 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-incr-comp Area: Incremental compilation A-linkage Area: linking into static, shared libraries and binaries C-bug Category: This is a bug.
Projects
None yet
Development

No branches or pull requests

5 participants