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 failing on ci.bazel.io due to NPE in RuleContext.getPrerequisite #516

Closed
laszlocsomor opened this issue Oct 16, 2015 · 4 comments
Closed
Assignees
Labels
P0 This is an emergency and more important than other current work. (Assignee required) type: bug

Comments

@laszlocsomor
Copy link
Contributor

http://ci.bazel.io/job/Bazel/JAVA_VERSION=1.8,PLATFORM_NAME=linux-x86_64/lastBuild/console:

  1. testNonConformingPackageName(com.google.devtools.build.lib.ideinfo.AndroidStudioInfoAspectTest)
    java.lang.RuntimeException: Unrecoverable error while evaluating node 'CONFIGURED_TARGET://bad/package/google/example:test 21bea8d354fc6b02e61718b43611a3fe' (requested by nodes 'ASPECT://bad/package/google/example:test#AndroidStudioInfoAspect 21bea8d354fc6b02e61718b43611a3fe {}')
    at com.google.devtools.build.skyframe.ParallelEvaluator$Evaluate.run(ParallelEvaluator.java:903)
    at com.google.devtools.build.lib.concurrent.AbstractQueueVisitor$2.run(AbstractQueueVisitor.java:459)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
    Caused by: java.lang.NullPointerException
    at com.google.devtools.build.lib.analysis.RuleContext.getPrerequisites(RuleContext.java:584)
    at com.google.devtools.build.lib.analysis.RuleContext.getPrerequisites(RuleContext.java:693)
    at com.google.devtools.build.lib.rules.android.ResourceDependencies.extractFromAttribute(ResourceDependencies.java:80)
    at com.google.devtools.build.lib.rules.android.ResourceDependencies.fromRuleResourceAndDeps(ResourceDependencies.java:62)
    at com.google.devtools.build.lib.rules.android.AndroidLibrary.create(AndroidLibrary.java:105)
    at com.google.devtools.build.lib.rules.android.AndroidLibrary.create(AndroidLibrary.java:50)
    at com.google.devtools.build.lib.analysis.ConfiguredTargetFactory.createRule(ConfiguredTargetFactory.java:256)
    at com.google.devtools.build.lib.analysis.ConfiguredTargetFactory.createConfiguredTarget(ConfiguredTargetFactory.java:170)
    at com.google.devtools.build.lib.skyframe.SkyframeBuildView.createConfiguredTarget(SkyframeBuildView.java:479)
    at com.google.devtools.build.lib.skyframe.ConfiguredTargetFunction.createConfiguredTarget(ConfiguredTargetFunction.java:736)
    at com.google.devtools.build.lib.skyframe.ConfiguredTargetFunction.compute(ConfiguredTargetFunction.java:195)
    at com.google.devtools.build.skyframe.ParallelEvaluator$Evaluate.run(ParallelEvaluator.java:867)
@laszlocsomor laszlocsomor added type: bug P0 This is an emergency and more important than other current work. (Assignee required) labels Oct 16, 2015
@laszlocsomor
Copy link
Contributor Author

Lukacs, could you take a look? The issue seems to be related to Aspects and, IIUC, attributes missing from them.

@laszlocsomor
Copy link
Contributor Author

Repro:

  1. download and install the Android SDK and NDK
  2. export the ANDROID_SDK_PATH and ANDROID_NDK_PATH envvars, make sure bazel is on the PATH
  3. adjust the android_sdk_repository and android_ndk_repository rules and their corresponding bind rules in bazel's main WORKSPACE [1] file
  4. run bazel test //src/test/shell/bazel/android:android_integration_test

The test consistently fails with a NPE in RuleContext.

[1] https://github.com/bazelbuild/bazel/blob/15e9a506118b4067655e5e7f72ff852be5b797ca/WORKSPACE

@laszlocsomor laszlocsomor assigned c-parsons and unassigned lberki Oct 16, 2015
@lberki
Copy link
Contributor

lberki commented Oct 16, 2015

I'll fix this -- I reviewed the offending code and I know what I overlooked.

@lberki
Copy link
Contributor

lberki commented Oct 16, 2015

Even better: the change has already been rolled back.

@lberki lberki closed this as completed Oct 16, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P0 This is an emergency and more important than other current work. (Assignee required) type: bug
Projects
None yet
Development

No branches or pull requests

3 participants