buildbarn/bb-deployments

JDK 11 support

olib963 opened this issue · 3 comments

Setting the JDK to 11 seems to cause the worker to hang on

Action external/bazel_tools/tools/jdk/platformclasspath_classes/DumpPlatformClassPath.class [for host];
Action external/bazel_tools/tools/jdk/platformclasspath_classes/DumpPlatformClassPath.class;

For the record we updated to JDK11 by changing bazelrc values:

build:rbe-ubuntu16-04 --host_java_toolchain=@bazel_tools//tools/jdk:toolchain_java11
build:rbe-ubuntu16-04 --host_javabase=@bazel_tools//tools/jdk:remote_jdk11
build:rbe-ubuntu16-04 --java_toolchain=@bazel_tools//tools/jdk:toolchain_java11
build:rbe-ubuntu16-04 --javabase=@bazel_tools//tools/jdk:remote_jdk11

Everything else is the same as the example in the README. I feel I am missing some obvious config option. Please let me know if you support JDK 11/have encountered this.

Sorry, I think I figured this one out. I am just struggling to parse and navigate the Bazel documentation especially RBE.

fmeum commented

@olib963 Could you share how you resolved the issue? I'm experiencing the exact same problem.

@olib963 Could you share how you resolved the issue? I'm experiencing the exact same problem.

I believe the problem was that the JDK is being taken from the RBE config for remote builds and the bazel config for local builds. I switched up our config to have:

rbe_autoconfig(
    name = "rbe_default",
    java_home = "/usr/lib/jvm/11.29.3-ca-jdk11.0.2/reduced",
    use_checked_in_confs = "Force",
)

in the WORKSPACE. It seemed a little odd to me that I had to specify a path on the worker rather than being able to use the built in JDK, seems like the worker should also have access to this. Hope this helps, perhaps someone out there has a better solution.