-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Closed
Copy link
Labels
A-code-coverageArea: Source-based code coverage (-Cinstrument-coverage)Area: Source-based code coverage (-Cinstrument-coverage)C-bugCategory: This is a bug.Category: This is a bug.P-mediumMedium priorityMedium priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.Performance or correctness regression from stable to nightly.
Description
Code
Beginning with today's nightly, processing coverage produced by rustc binaries fails. Here is an example CI run: https://github.com/pyca/cryptography/actions/runs/12077661037/job/33681030705?pr=12066
The relevant snippet:
nox > /home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin/llvm-cov export /home/runner/work/cryptography/cryptography/.nox/tests/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust.abi3.so -instr-profile=rust-cov.profdata '--ignore-filename-regex=[/\].cargo[/\]' '--ignore-filename-regex=[/\]rustc[/\]' '--ignore-filename-regex=[/\].rustup[/\]toolchains[/\]' '--ignore-filename-regex=[/\]target[/\]' --format=lcov
nox > Command /home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin/llvm-cov export /home/runner/work/cryptography/cryptography/.nox/tests/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust.abi3.so -instr-profile=rust-cov.profdata '--ignore-filename-regex=[/\].cargo[/\]' '--ignore-filename-regex=[/\]rustc[/\]' '--ignore-filename-regex=[/\].rustup[/\]toolchains[/\]' '--ignore-filename-regex=[/\]target[/\]' --format=lcov failed with exit code 1:
error: failed to load coverage: '/home/runner/work/cryptography/cryptography/.nox/tests/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust.abi3.so': truncated coverage data
error: could not load coverage information
#133418 is the only change in the regression range with a commit message mentioning coverage. cc: @Zalathar
Happy Thanksgiving!
Version it worked on
rustc 1.85.0-nightly (6b6a867ae 2024-11-27)
Version with regression
rustc 1.85.0-nightly (a2545fd6f 2024-11-28)
Zalathar and grant0417
Metadata
Metadata
Assignees
Labels
A-code-coverageArea: Source-based code coverage (-Cinstrument-coverage)Area: Source-based code coverage (-Cinstrument-coverage)C-bugCategory: This is a bug.Category: This is a bug.P-mediumMedium priorityMedium priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.Performance or correctness regression from stable to nightly.
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
Zalathar commentedon Nov 29, 2024
Hmm, my guess is that 619a272 is making it possible for all of a CGU's functions to be discarded at a late stage, so parts of the metadata end up being empty in a way that the
llvm-cov
isn't happy with.Finding and testing a fix is probably going to be non-trivial (especially without a small repro), so for now it's probably wisest to revert.
alex commentedon Nov 29, 2024
Regrettably, I don't have a reproducer smaller than "our entire large project with a bunch of deps" :-(
Revert "Rollup merge of rust-lang#133418 - Zalathar:spans, r=jieyouxu"
4 remaining items
Auto merge of rust-lang#133609 - Zalathar:rollup-1825fa8, r=Zalathar
Auto merge of rust-lang#133608 - Zalathar:spans-revert, r=jieyouxu
jieyouxu commentedon Nov 29, 2024
Revert PR #133608 landed.
arnodb commentedon Nov 29, 2024
Hi!
It's not minimized but https://github.com/arnodb/quirky_binder/actions/runs/12090701392/job/33718146447 faces exactly this problem.
It occurs with a build script. Unfortunately it's one of the last modules of the workspace to compile.
Commit
7c0ae33c25363b8b4637bb6501e10f2d2117f24c
crashes but it is also possible that other commits crash in the same way.Hope this helps.
apiraino commentedon Dec 2, 2024
WG-prioritization assigning priority (Zulip discussion).
@rustbot label -I-prioritize +P-medium
Zalathar commentedon Dec 2, 2024
The revert has landed and seems to have fixed the regression, so closing as fixed.
(I'll need to be mindful of this failure when working on a new version of #133418.)
Span
until codegen (take 2) #134497Rollup merge of rust-lang#134497 - Zalathar:spans, r=jieyouxu
Unrolled build for rust-lang#134497
Zalathar commentedon Dec 20, 2024
A new version of the original PR has been merged in #134497, and will be included in the next nightly.
Based on my testing, I believe that this issue should not reoccur, but let me know if something does go wrong.