Skip to content
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

Error in loading coverage data, on nightly-2022-01-15 or later #128

Closed
YJDoc2 opened this issue Jan 17, 2022 · 3 comments
Closed

Error in loading coverage data, on nightly-2022-01-15 or later #128

YJDoc2 opened this issue Jan 17, 2022 · 3 comments
Labels
C-upstream-bug Category: This is a bug of compiler or dependencies (the fix may require action in the upstream)

Comments

@YJDoc2
Copy link

YJDoc2 commented Jan 17, 2022

Hey, we are using cargo-llvm-cov in our CI to get the coverage information, and for the last two days we are getting error saying failed to load the coverage information

info: when --target option is used, coverage for proc-macro and build script will not be displayed because cargo does not pass RUSTFLAGS to them
error: failed to generate report: process didn't exit successfully: `/home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin/llvm-cov export -format=lcov -instr-profile=/home/runner/work/youki/youki/target/llvm-cov-target/youki.profdata -object /home/runner/work/youki/youki/target/llvm-cov-target/x86_64-unknown-linux-gnu/debug/deps/integration_test-70ccadba5ff3eeb2 -object /home/runner/work/youki/youki/target/llvm-cov-target/x86_64-unknown-linux-gnu/debug/deps/integration_test-897d63685f9f06f0 -object /home/runner/work/youki/youki/target/llvm-cov-target/x86_64-unknown-linux-gnu/debug/deps/libcgroups-de8628be3307ab15 -object /home/runner/work/youki/youki/target/llvm-cov-target/x86_64-unknown-linux-gnu/debug/deps/libcontainer-69decfa1a73d5aab -object /home/runner/work/youki/youki/target/llvm-cov-target/x86_64-unknown-linux-gnu/debug/deps/liboci_cli-772485136e063db8 -object /home/runner/work/youki/youki/target/llvm-cov-target/x86_64-unknown-linux-gnu/debug/deps/libseccomp-c6eee5d114d66b56 -object /home/runner/work/youki/youki/target/llvm-cov-target/x86_64-unknown-linux-gnu/debug/deps/test_framework-672ff83324cabc04 -object /home/runner/work/youki/youki/target/llvm-cov-target/x86_64-unknown-linux-gnu/debug/deps/youki-894d6d4b690bb21f -ignore-filename-regex 'libseccomp/src|integration_test/src|test_framework/src|systemd_api.rs|(^|/)(rustc/[0-9a-f]+|tests|examples|benches|target/llvm-cov-target)/|^/home/runner($|/)|^/home/runner/.cargo($|/)|^/home/runner/.rustup($|/)'` (exit status: 1)
--- stderr
error: /home/runner/work/youki/youki/target/llvm-cov-target/x86_64-unknown-linux-gnu/debug/deps/integration_test-70ccadba5ff3eeb2, /home/runner/work/youki/youki/target/llvm-cov-target/x86_64-unknown-linux-gnu/debug/deps/integration_test-897d63685f9f06f0, /home/runner/work/youki/youki/target/llvm-cov-target/x86_64-unknown-linux-gnu/debug/deps/libcgroups-de8628be3307ab15, /home/runner/work/youki/youki/target/llvm-cov-target/x86_64-unknown-linux-gnu/debug/deps/libcontainer-69decfa1a73d5aab, /home/runner/work/youki/youki/target/llvm-cov-target/x86_64-unknown-linux-gnu/debug/deps/liboci_cli-772485136e063db8, /home/runner/work/youki/youki/target/llvm-cov-target/x86_64-unknown-linux-gnu/debug/deps/libseccomp-c6eee5d114d66b56, /home/runner/work/youki/youki/target/llvm-cov-target/x86_64-unknown-linux-gnu/debug/deps/test_framework-672ff83324cabc04, /home/runner/work/youki/youki/target/llvm-cov-target/x86_64-unknown-linux-gnu/debug/deps/youki-894d6d4b690bb21f: Failed to load coverage: Truncated coverage data
error: Could not load coverage information

Error: Process completed with exit code 1.

This is the exact error we are getting in our CI.

for reference, our CI yaml is https://github.com/containers/youki/blob/main/.github/workflows/main.yml#L68 and the PR where the CI is failing is https://github.com/containers/youki/runs/4832086318?check_suite_focus=true

The reason I suspect this is due to an error in nightly is that the same CI worked about 3 days ago, here https://github.com/containers/youki/runs/4817746220?check_suite_focus=true

To make sure it is not due to changes made in the PR, I tried puling the PR and running the steps for coverage manually with nightly version about ~1 month old, which generated coverage without any error. Then after updating rust using rustup on 16 Jan 2022 (yesterday) I got the exact same error on my local as well.

Can you please confirm that this is indeed some issue with nightly and not some accidental breakage from our side? And if so should I open an issue on rust repo?

Thanks for the help :)

@taiki-e
Copy link
Owner

taiki-e commented Jan 17, 2022

Thanks for the report. Looks like a rustc bug: rust-lang/rust#79645 (comment)
For now, you can probably work around this by pinning nightly to 2022-01-14 or older.

@taiki-e taiki-e added the C-upstream-bug Category: This is a bug of compiler or dependencies (the fix may require action in the upstream) label Jan 17, 2022
@taiki-e taiki-e pinned this issue Jan 17, 2022
@YJDoc2
Copy link
Author

YJDoc2 commented Jan 17, 2022

Hey thanks a lot for the quick reply 😄 Pinning the nightly as you suggested fixed the issue. Thanks a lot :)

@taiki-e
Copy link
Owner

taiki-e commented Jan 26, 2022

This has been fixed in nightly-2022-01-26 (by rust-lang/rust#93144).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-upstream-bug Category: This is a bug of compiler or dependencies (the fix may require action in the upstream)
Projects
None yet
Development

No branches or pull requests

2 participants