NullPointerException in RepositoryDelegatorFunction
- Dominant language
- Java
- Stars
- 25.8k
- Forks
- 4.6k
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 72
Description
### Description of the bug:
I just got the following error:
```
(09:47:10) FATAL: bazel crashed due to an internal error. Printing stack trace:
java.lang.RuntimeException: Unrecoverable error while evaluating node 'REPOSITORY_DIRECTORY:@@_main~portage~alchemist' (requested by nodes 'PACKAGE_LOOKUP:@@_main~portage~alchemist//')
at com.google.devtools.build.skyframe.AbstractParallelEvaluator$Evaluate.run(AbstractParallelEvaluator.java:550)
at com.google.devtools.build.lib.concurrent.AbstractQueueVisitor$WrappedRunnable.run(AbstractQueueVisitor.java:414)
at java.base/java.util.concurrent.ForkJoinTask$AdaptedRunnableAction.exec(Unknown Source)
at java.base/java.util.concurrent.ForkJoinTask.doExec(Unknown Source)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(Unknown Source)
at java.base/java.util.concurrent.ForkJoinPool.scan(Unknown Source)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(Unknown Source)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source)
Caused by: java.lang.NullPointerException
at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:903)
at com.google.devtools.build.lib.rules.repository.RepositoryDelegatorFunction.fetchRepository(RepositoryDelegatorFunction.java:439)
at com.google.devtools.build.lib.rules.repository.RepositoryDelegatorFunction.compute(RepositoryDelegatorFunction.java:205)
at com.google.devtools.build.skyframe.AbstractParallelEvaluator$Evaluate.run(AbstractParallelEvaluator.java:461)
... 7 more
09:47:11.673: INFO: run: /mnt/host/source/chromite/bin/bazel run //bazel/portage/tools/process_artifacts -- '--build-events-jsonl=/tmp/chromeos_bazel_build_events.json' '--archive-logs=/tmp/allpackages_action_logs.tar.gz' '--prebuilts=/tmp/prebuilts.bzl'
09:47:11.780: DEBUG: Ensure file: fuchsia/third_party/bazelisk/${os}-${arch} version:2@1.20.0
Starting local Bazel server and connecting to it...
```
See the following [build](https://logs.chromium.org/logs/chromeos/buildbucket/cr-buildbucket/8746588296079805713/+/u/install_packages/call_chromite.api.SysrootService_InstallPackages/call_build_API_script/stdout) (Google internal only).
### Which category does this issue belong to?
Core
### What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
I have no idea...
### Which operating system are you running Bazel on?
Linux
### What is the output of `bazel info release`?
bazel-7.1.0-linux-x86_64...
### If `bazel info release` returns `development 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 HEAD` ?
_No response_
### Is this a regression? If yes, please try to identify the Bazel commit where the bug was introduced.
_No response_
### Have you found anything relevant by searching the web?
_No response_
### Any other information, logs, or outputs that you want to share?
_No response_
Contributor guide
Research direction
Start with the supplied stack trace and inspect RepositoryDelegatorFunction.fetchRepository at line 439, then review the linked ChromeOS build log for the repository and package context. Establish a minimal reproduction for the Linux Bazel 7.1.0 failure; done means the repository evaluation no longer crashes with a NullPointerException and the behavior is covered by a regression test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100