Open Morfly opened 3 years ago
This looks like it could be a concurrency issue between java workers and databinding tooling. Or maybe databinding tooling is keeping stale state around from previous javac worker invocations. Try disabling java workers with --strategy=Javac=sandboxed
and if the problem goes away. If it doesn't, then there's probably some other cause.
@ahumesky I found this
Fix thread safety issue when getting api-versions.xml resource
I think this commit is not present in the Databinding version Bazel is currently using.
The issue boils down to usage of getClass().getClassLoader().getResourceAsStream
.
Google issue: https://issuetracker.google.com/issues/137929327?pli=1
I did try the fix by manually applying the fix and updating databinding jars but I still faced the issue. The Google issue mentions Jetifier was also updated to remove usage of getResourceAsStream
. It could be that somewhere else this is still getting called in Bazel and causes issue on highly parallel builds.
This issue looks similar to an issue I reported to google yesterday, perhaps the knowledge of these 2 threads can be combined?
Google issue: https://issuetracker.google.com/issues/196847367
i am tired
Thank you for contributing to the Bazel repository! This issue has been marked as stale since it has not had any activity in the last 1+ years. It will be closed in the next 14 days unless any other activity occurs or one of the following labels is added: "not stale", "awaiting-bazeler". Please reach out to the triage team (@bazelbuild/triage
) if you think this issue is still relevant or you are interested in getting the issue resolved.
This issue has been automatically closed due to inactivity. If you're still interested in pursuing this, please reach out to the triage team (@bazelbuild/triage
). Thanks!
Description of the problem / feature request:
When I'm building an Android project that consists of many data-binding enabled targets, Bazel constantly randomly crashes while building one of them. After I start to build the project again, the crashed module builds successfully. Looks like the issue does not relate to the specific target as after retry they build successfully.
The project itself is written in Kotlin, so additionally I'm using Bazel Kotlin Rules
Stacktrace:
Feature requests: what underlying problem are you trying to solve with this feature?
To avoid random Bazel crashes while building data-binding modules.
Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Try to build the project with multiple data-binding enabled targets (can start with 20)
What operating system are you running Bazel on?
macOS Catalina
What's the output of
bazel info release
?development version
If
bazel info release
returns "development version" or "(@non-git)", tell us how you built Bazel.From master using this approach: https://github.com/bazelbuild/bazel/issues/2694#issuecomment-649912743
What's the output of
git remote get-url origin ; git rev-parse master ; git rev-parse HEAD
?https://github.com/bazelbuild/bazel.git https://github.com/bazelbuild/bazel/commit/7a65cadb1a1496af4d4f01fbb15d82da79fa7403 https://github.com/bazelbuild/bazel/commit/7a65cadb1a1496af4d4f01fbb15d82da79fa7403
Have you found anything relevant by searching the web?
Any other information, logs, or outputs that you want to share?
Related issue: https://github.com/bazelbuild/bazel/issues/12697