-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
cc_test coverage fails when fetching from remote cache #20556
Comments
Good writeup thank you. This is blocking our upgrade to Bazel 7.0.0. It also occurs with these flags set:
which we set due to requiring |
@anhlinh123 @sputt If you run with |
we ran into this issue with our coverage options:
|
@bazel-io flag |
@iancha1992 This looks like another 7.0.0 regression, just want to make sure it's tracked. |
@fmeum @Wyverald @meteorcloudy Should this be included in the 7.0.1 patch? or is it okay to go straight to 7.1.0? cc: @bazelbuild/triage |
Since this is a regression in 7.0.0, ideally we should include a fix in 7.0.1. But that depends on the timeline. @tjgq do you have an estimate for how long the fix might take? |
@bazel-io fork 7.0.1 |
@bazel-io fork 7.1.0 |
@nlou9 Same request as above: can you please run with |
Are you setting If so, I suspect that the root cause is the same as the coverage failure in #20753 and if so, have a fix for it that is in the process of being submitted (although CI is not really a happy camper now so it will take a bit of time to materialize at HEAD) |
@lberki we are using |
@tjgq, here is the log
|
Then I believe iancha1992@9463a4f is the fix (it'll be both in 7.0.1 and 7.1.0) |
@lberki wonder the ETA of 7.0.1 or 7.1.0? |
I think the idea is that 7.0.1 should be out sometime next week the latest (don't take this as a promise until @meteorcloudy confirms) |
Also, @tjgq suspects that there is another bug lurking in the deep that could cause your build to fail like this and he was working on confirming or denying that. My guess is that the above change is enough, but that's just a guess and an uninformed one. |
If we have confirmation that the repro requires |
Thanks, your mention of |
I see this on python tests as well. This issue blocks my ability to upgrade Bazel. |
@tjgq Sorry for the late reply. This is the error message when using --verbose_failures:
I don't think there will be a stacktrace as there is a function consuming all Exceptions. I don't remember what that is since it's been a while. Let me try to recall. |
Ok, so it all started with this function: But the critical point seems to be here: |
My repo also uses
|
@anhlinh123 Do you mind giving b0db044 a try? (The simplest way is to use Bazelisk with Otherwise, I think there might be something missing from your repro steps. You are building once, deleting a file from the disk cache, then rebuilding incrementally. I'd thus expect the incremental rebuild to be a no-op, since the output tree hasn't been touched and Bazel can tell it's up-to-date (and that's also what I'm seeing experimentally.) Is the second build a clean build? Are there any other flags in a .bazelrc? (Use |
(It's |
@tjgq This is what I've found so far.
|
That's great to hear, thanks. I will close this issue, since the fix has also been cherry-picked into the 7.0.1 branch (in #20819). |
@tjgq thank you for your support! |
@tjgq The version 7.0.1rc1 has a weird bug related to this.
The |
7.0.1rc1 was cut before the fix made it into the 7.0.1 branch. Can you try |
@tjgq It works!!! Thank you! |
Description of the bug:
Running coverage on a cc_test randomly fails with the following error:
I/O exception during sandboxed execution: Input is a directory: bazel-out/k8-fastbuild/testlogs/<path_to_the_test_dir>/_coverage
Afaik, the condition under which the bug happens might be:
Which category does this issue belong to?
Remote Execution
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
bazel coverage <test> --disk_cache=<cache> --remote_upload_local_results=true --execution_log_json_file=<file_name>
."commandArgs": ["external/bazel_tools/tools/test/collect_coverage.sh"],
I/O exception during sandboxed execution: Input is a directory: bazel-out/k8-fastbuild/testlogs/<path_to_the_test_dir>/_coverage
.Which operating system are you running Bazel on?
Ubuntu 20.04.6 LTS
What is the output of
bazel info release
?release 7.0.0
If
bazel info release
returnsdevelopment version
or(@non-git)
, tell us how you built Bazel.No response
What's the output of
git remote get-url origin; git rev-parse master; git rev-parse HEAD
?No response
Is this a regression? If yes, please try to identify the Bazel commit where the bug was introduced.
Probably it happens after this commit 1267631, when it tries to fetch metadata of a TreeArtifact (the _coverage directory).
Have you found anything relevant by searching the web?
No.
Any other information, logs, or outputs that you want to share?
No response
The text was updated successfully, but these errors were encountered: