-
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
Bazel hangs on INFO: Invocation ID
while fetching dependencies
#16927
Comments
@fmeum Have you noticed similar issue with Bazel 5.x releases? |
@meteorcloudy I am fairly certain that I haven't seen it with 5.0.0, but since we switched to rolling releases after that, I unfortunately can't tell whether it is present in 5.X or not. I also can't easily run a full bisect since the monorepo uses relatively recent Bazel features. I will investigate this further. It isn't too bad since it's essentially only a UI issue. |
OK, then I'll not consider it as a release blocker for 6.0 for now, if we figure out a fix we can cherry pick it later into 6.x. |
I can now reliably reproduce this by modifying the |
Turned out to be a dupe of #14215, I didn't notice that a Starlark flag was added. |
@meteorcloudy Nevermind, this is a regression and #14215 provides the reproducer for it (https://github.com/fmeum/bazel-hangs-on-startup). If you run the example linked there, you get:
So this appears to be different variant of #14215 with the same root cause: The loading phase is never properly started since the fetch is triggered by some preparatory phase (option parsing, main repo mapping computation). Just that with Bazel 6, this can trigger even without Starlark flags. Sorry for the back and forth, all the flags in our repo made this somewhat confusing. |
The first commit this reproduces with is 943e8cf. |
/cc @Wyverald |
While this is indeed a regression in 6.0, but as @fmeum analysed, this is only a UI issue and a proper fix probably requires more time, so let's not block the 6.0.0 release in the last minute. We'll fix this in later 6.x.x releases. |
@bazel-io fork 6.1.0 |
I think this might be a dupe of #16338. Something around the event reporting during the initial main repo mapping computation must be broken. |
The eagerly-loaded issue referenced above is a significant clue, I believe. My observation is that this bug happens only if a I discovered this while cloning a large git repo with I can confirm that this bug does not happen in 5.2.0, but does in 6.0.0, and still does in the latest 7.0.0 prerelease. |
Description of the bug:
I am regularly (but not reproducibly, not even very frequently) experiencing Bazel hanging for a long time (> 1 min) after printing the initial invocation ID, but before printing the current date. According to the recorded profile, it is fetching a toolchain repo, but doesn't print any progress information.
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
I haven't been able to produce a reliable reproducer yet. I am observing this in a medium-size monorepo that fetches large hermetic toolchains.
Which operating system are you running Bazel on?
Linux
What is the output of
bazel info release
?6.0.0rc4
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
Have you found anything relevant by searching the web?
No response
Any other information, logs, or outputs that you want to share?
Happy to provide additional information, I just don't know what kind would be helpful.
The text was updated successfully, but these errors were encountered: