Repository navigation
Closed
Labels
P0This is an emergency and more important than other current work. (Assignee required)
Description
Description of the problem / feature request:
Upgrading from 0.17.2 to 0.18 we suddenly see turbine failures
(17:38:03) ERROR: /workspace/...-hjar.jar: Compiling Java headers ...-hjar.jar (11 files) failed (Exit 1)
An exception has occurred in turbine.
java.lang.AssertionError: VOID_TY_SIG
at com.google.turbine.binder.bytecode.BytecodeBinder.bindTy(BytecodeBinder.java:89)
at com.google.turbine.binder.bytecode.BytecodeBoundClass.bindMethod(BytecodeBoundClass.java:381)
at com.google.turbine.binder.bytecode.BytecodeBoundClass.access$600(BytecodeBoundClass.java:66)
at com.google.turbine.binder.bytecode.BytecodeBoundClass$13.get(BytecodeBoundClass.java:365)
at com.google.turbine.binder.bytecode.BytecodeBoundClass$13.get(BytecodeBoundClass.java:356)
at com.google.common.base.Suppliers$NonSerializableMemoizingSupplier.get(Suppliers.java:166)
at com.google.turbine.binder.bytecode.BytecodeBoundClass.methods(BytecodeBoundClass.java:406)
at com.google.turbine.binder.ConstEvaluator.evaluateAnnotation(ConstEvaluator.java:912)
at com.google.turbine.binder.ConstEvaluator.evaluateAnnotations(ConstEvaluator.java:901)
at com.google.turbine.binder.ConstBinder.bindMethod(ConstBinder.java:136)
at com.google.turbine.binder.ConstBinder.bindMethods(ConstBinder.java:115)
at com.google.turbine.binder.ConstBinder.bind(ConstBinder.java:92)
at com.google.turbine.binder.Binder.constants(Binder.java:333)
at com.google.turbine.binder.Binder.bind(Binder.java:106)
at com.google.turbine.main.Main.compile(Main.java:97)
at com.google.devtools.build.java.turbine.Turbine.compile(Turbine.java:76)
at com.google.devtools.build.java.turbine.Turbine.compile(Turbine.java:69)
at com.google.devtools.build.java.turbine.Turbine.main(Turbine.java:46)
Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
We don't have a repro yet
What operating system are you running Bazel on?
linux (gcb/rbe)
What's the output of bazel info release?
0.18.0
Activity
laurentlb commentedon Oct 21, 2018
cc @aehlig
cushon commentedon Oct 21, 2018
@lberki @iirina
It's hard to say without context, but all of the turbine changes that were included in 0.18 should have been validated and released internally by now, so this could be a Bazel-specific issue.
ittaiz commentedon Oct 21, 2018
ittaiz commentedon Oct 21, 2018
ittaiz commentedon Oct 21, 2018
This class is causing the issue and if I remove the
@CrossOriginannotation the problem goes away.Unfortunately this class by itself isn't enough and I'm not sure what else triggers it (there are around 40 files in that package).
Does that help?
cushon commentedon Oct 21, 2018
dois a keyword, so that example doesn't compile with javac either. Does this code definitely build with 0.17.2, or with 0.18 and--nojava_header_compilation?cushon commentedon Oct 21, 2018
This could have been b5099a2. Does passing
--experimental_java_header_compilation_disable_javac_fallbackreproduce the crash with 0.17.2?ittaiz commentedon Oct 22, 2018
You’re right about the “do”, I changed the text when copying. I’ll check soon
ittaiz commentedon Oct 22, 2018
0.18.0 with
--nojava_header_compilationpasses. guessing 0.17.2 with--experimental_java_header_compilation_disable_javac_fallbackwill fail.This is that AFAICT we don't have any annotation processing there.
Any idea why this is happening?
Update:
Indeed fails with 0.17.2 and the experimental flag
cushon commentedon Oct 22, 2018
Thanks! I have a theory, do you mind checking if #6467 makes a difference?
ittaiz commentedon Oct 22, 2018
cushon commentedon Oct 22, 2018
Yes, thanks: building at head with that PR patched in.
(I think the same problem will reproduce at head or with 0.18, and patching the fix into 0.18 should also fix the crash. If there ends up being a point release we can probably backport it.)
ittaiz commentedon Oct 23, 2018
I checked out 0.18.0 tag, cherry-picked your commit from the PR and it indeed passes.
Any chance you can ask it will be cherry-picked to 0.18.0 (if they create a point release) and to 0.19.0?
Thanks!
We can live with the flag if a point release isn't an option but would rather not
cushon commentedon Oct 23, 2018
paging @katre @lberki
This issue affects class reading of annotation declarations where the default value of an annotation method is a class literal for a non-class type, e.g. the
void.classandint.classin:It was fixed in google/turbine@7ef8412, and there's a PR to update Bazel's version of turbine to include the fix: #6467
We validated this version of turbine internally and didn't encounter this, so it seems like a fairly rare problem. #6467 includes some other changes to turbine that I'm still validating, so it isn't risk-free.
lberki commentedon Oct 23, 2018
Meh. Java compilation regressions are certainly cherrypick-worthy.
ittaiz commentedon Oct 23, 2018
katre commentedon Oct 23, 2018
SGTM for 0.19.0 (#6116).
cushon commentedon Oct 23, 2018
Ok, sounds like a plan. I did some internal validation of #6467 and it looks fine. Can I get a review for the PR?
ittaiz commentedon Oct 23, 2018
So @aehlig can this get on to 0.18.1?
katre commentedon Oct 23, 2018
In the 0.19.0rc7 build, bazel_determinism_test is failing:
https://storage.googleapis.com/bazel-buildkite-artifacts/ad153be8-d848-4ccc-b0df-4f0c631b1ab3/src/test/shell/bazel/bazel_determinism_test/attempt_1.log
katre commentedon Oct 23, 2018
This actually appears to be a different error.
cushon commentedon Oct 24, 2018
As discussed offline that was the fix for #6433, which has been reverted.
This issue is fixed, and the fix will be included in 0.19.
ittaiz commentedon Oct 24, 2018
aehlig commentedon Oct 25, 2018