llvm / llvm/llvm-project

llvm-profdata 21.1.8 SIGILL while merging Rust coverage profraw inputs

Open
#212,150 0 comments 0 reactions 0 assignees View on GitHub
PGO
Dominant language
LLVM
Stars
40.5k
Forks
18.7k
PR merge metrics
PR metrics pending

Description

### Summary

`llvm-profdata merge` crashed with `SIGILL` after a successful Rust coverage test run. Invalid profile input is suspected but not proven; the failure should be a diagnostic/nonzero exit, not a compiler-tool crash.

### Environment

* Ubuntu GitHub-hosted runner
* Rust toolchain: `1.94.1-x86_64-unknown-linux-gnu`
* LLVM from `21.1.8-rust-1.94.1-stable`
* Coverage run: https://github.com/zackees/running-process/actions/runs/30069521927
* Project issue and mitigation: https://github.com/zackees/running-process/issues/659

### Observed command and result

All 1,000 tests passed. The subsequent command failed with signal 4:

```text
/home/runner/.rustup/toolchains/1.94.1-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin/llvm-profdata merge -sparse -f /home/runner/work/running-process/running-process/target/llvm-cov-target/running-process-profraw-list -o /home/runner/work/running-process/running-process/target/llvm-cov-target/running-process.profdata

signal: 4 (SIGILL) (core dumped)
```

The public Actions artifact contains the test log, `core.llvm-worker-2.9713` (77 MB), the attempted merge output, and the surviving good-profile list: https://github.com/zackees/running-process/actions/runs/30069521927

The earlier workflow identified two 5,400-byte files for which individual `llvm-profdata show` also crashed:

```text
running-process-4673-17627210442999504848_1.profraw
running-process-4674-17627210442999504848_2.profraw
```

Those two inputs were not copied by the historical workflow before it pruned them, so they cannot be attached now. We are changing the workflow to preserve every rejected `.profraw` with its size, probe command/result, tool version, OS, run ID, and commit ID before it is excluded from the merge set, and to upload that evidence even when coverage ultimately succeeds. The next recurrence will provide the minimal artifact/reproducer.

### Expected behavior

Malformed or incomplete `.profraw` input should cause a clear diagnostic and nonzero exit from `llvm-profdata`, without SIGILL/crashing the tool.

### Related

* https://github.com/llvm/llvm-project/issues/92358
* https://github.com/llvm/llvm-project/issues/63179

Contributor guide

Open the contributing guide

Research direction

Start with the llvm-profdata merge and show commands described in the report, then review the preserved rejected .profraw evidence when the next recurrence provides it. Compare the diagnostic behavior for malformed or incomplete inputs with the SIGILL result; done means llvm-profdata exits nonzero with a clear diagnostic instead of crashing.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.