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

Bazel hangs loading the JDK #30636

Closed
alxhub opened this issue May 23, 2019 · 4 comments
Closed

Bazel hangs loading the JDK #30636

alxhub opened this issue May 23, 2019 · 4 comments
Labels
area: build & ci Related the build and CI infrastructure of the project freq1: low regression Indicates than the issue relates to something that worked in a previous version type: bug/fix
Milestone

Comments

@alxhub
Copy link
Member

alxhub commented May 23, 2019

Across both of my machines lately, I've been seeing an issue where Bazel hangs at currently loading: @local_jdk//, or in the analysis phase. It spends O(minutes) here if it even completes at all, and CPU usage maxes out to the point where the machine becomes unusable otherwise. bazel clean --expunge solves the problem temporarily, but it will return without warning on future builds.

$ bazel test //tools/public_api_guard/...
INFO: Invocation ID: f4f2d880-00c4-4ec6-8ef7-791019fcc2fa
INFO: Build option --legacy_external_runfiles has changed, discarding analysis cache.
Analyzing: 93 targets (4 packages loaded, 11414 targets configured)
    currently loading: @local_jdk//

This is making it difficult for me to work.

@alxhub alxhub added type: bug/fix area: build & ci Related the build and CI infrastructure of the project freq1: low regression Indicates than the issue relates to something that worked in a previous version labels May 23, 2019
@ngbot ngbot bot added this to the Backlog milestone May 23, 2019
@alexeagle
Copy link
Contributor

Asked the Bazel team about it, it's apparently this: bazelbuild/bazel#8355
I think to fix it on our side, we would need to use native node binary for the nodejs_test in ts-api-guardian/index.bzl rather than a sh_test wrapper that we use now for Windows support

@alexeagle
Copy link
Contributor

As a workaround, try replacing
load("@build_bazel_rules_nodejs//:defs.bzl", "nodejs_binary", "nodejs_test")
with
load("@build_bazel_rules_nodejs//internal/node:node.bzl", "nodejs_binary", "nodejs_test")
and add "@bazel_tools//tools/bash/runfiles" to the data[] of the test

this will avoid the macro that expands to an sh_test and give you just pure node

@alxhub
Copy link
Member Author

alxhub commented Feb 28, 2020

Haven't seen this in months; closing.

@alxhub alxhub closed this as completed Feb 28, 2020
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Mar 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: build & ci Related the build and CI infrastructure of the project freq1: low regression Indicates than the issue relates to something that worked in a previous version type: bug/fix
Projects
None yet
Development

No branches or pull requests

2 participants