llvm / llvm/llvm-project

rust-lld crashes with signal 7 (Bus error) during linking phase in CI environment

Open
#169,729 4 comments 2 reactions 0 assignees View on GitHub
incomplete lld
Dominant language
LLVM
Stars
40.5k
Forks
18.7k
PR merge metrics
PR metrics pending

Description

The Rust linker (rust-lld) is crashing with a bus error (signal 7) during the linking phase of test compilation in GitHub Actions CI. The crash is intermittent and does not occur in local development environments. Environment:

- OS: Linux (GitHub Actions runner: ubuntu-latest)
- Rust version: Stable (latest from rustup)
- Toolchain: stable-x86_64-unknown-linux-gnu
- Project: Rust workspace with multiple crates
- Linker: rust-lld (bundled with rustc)

Error Output:
```
collect2: fatal error: ld terminated with signal 7 [Bus error], core dumped
compilation terminated.

PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
```

Steps to Reproduce:

1. Run cargo test --workspace in CI environment (GitHub Actions)
2. Error occurs during linking phase of integration tests
3. Specifically fails while linking test binaries with feature flag --cfg 'feature="full"'

Expected Behavior: Tests should compile and link successfully (as they do locally). Actual Behavior: Linker crashes with signal 7 (SIGBUS - Bus error), indicating a hardware/memory fault. Additional Context:

- All 544+ tests pass successfully on local Windows and Linux machines
- cargo build --release succeeds locally
- The crash is non-deterministic (re-running sometimes succeeds)
- This appears to be a CI infrastructure issue rather than code-related
- Error occurs during test binary linking, not during compilation or test execution

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.