-
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
Actions stuck in "active" and thus "[Prepa]" #13985
Comments
This issue also exists in the latest rolling release. |
cc @coeuvre Also seeing this after upgrading to 4.2.1 from 4.0.0. These are the changes that have gone in since the 4.1.0 release:
It looks like there was an attempt at fixing the UI bug in By adding the below patch you can reproduce this issue:
The problem seems to be like @DavidANeil mentioned -- I wonder if the right fix is for Patch:
|
Also for anyone who OK with compiling bazel from source and applying a patch (patch based off
|
@bjacklyn Would you mind sending your patch as a pull request? |
Fixed bazelbuild#13985 UiStateTracker can process ActionProgress events after an ActionCompletion event has been fired. This has the effect of recreating the action object in the activeActions Map because Map.computeIfAbsent() is being used to retrieve the action. Therefore, a new method getActionStateIfPresent is created which will return the action if it exists, otherwise return null, and actionProgress() uses this method so as to not inadverntantly recreate actions after they have already completed and been removed from the Map. Closes bazelbuild#14020. PiperOrigin-RevId: 398165993 (cherry picked from commit 639f89d)
Fixed #13985 UiStateTracker can process ActionProgress events after an ActionCompletion event has been fired. This has the effect of recreating the action object in the activeActions Map because Map.computeIfAbsent() is being used to retrieve the action. Therefore, a new method getActionStateIfPresent is created which will return the action if it exists, otherwise return null, and actionProgress() uses this method so as to not inadverntantly recreate actions after they have already completed and been removed from the Map. Closes #14020. PiperOrigin-RevId: 398165993 (cherry picked from commit 639f89d) Co-authored-by: Brandon Jacklyn <brandonjacklyn@gmail.com>
See bazelbuild/bazel#13985 Signed-off-by: Miguel Young de la Sota <mcyoung@google.com>
See bazelbuild/bazel#13985 Signed-off-by: Miguel Young de la Sota <mcyoung@google.com>
See bazelbuild/bazel#13985 Signed-off-by: Miguel Young de la Sota <mcyoung@google.com>
See bazelbuild/bazel#13985 Signed-off-by: Miguel Young de la Sota <mcyoung@google.com>
See bazelbuild/bazel#13985 Signed-off-by: Miguel Young de la Sota <mcyoung@google.com>
Description of the problem:
The UiStateTracker sometimes reports actions in "Preparing" status (shortened to "[Prepa]") indefinitely.
Because this "stuck" action will be the longest running, it will often be the only displayed action (when
--curses=no
).For example, here is what a sample CI run looks like:
Which is just ... not useful.
Note that actual action execution is not affected by this. This is purely a visual bug.
Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
This bug appears to be caused by a race condition, so is not easily reproducible.
I reckon it is a case where an action is added to the
activeActions
map, then removed after it completes, then re-added by a call tocomputeIfAbsent
being called in a racy manner.What operating system are you running Bazel on?
Linux 20.04
What's the output of
bazel info release
?release 4.2.0
I have not been able to reproduce this issue on 4.1.0
The text was updated successfully, but these errors were encountered: