Repository navigation
Closed
Labels
area-WindowsWindows-specific issues and feature requestsplatform: windowsteam-OSSIssues for the Bazel OSS team: installation, release processBazel packaging, websiteunder investigationuntriagedHas not yet been seen by appropriate subteam
Description
On bazel@HEAD:
$ bazel test src/java_tools/buildjar/javatests/com/google/devtools/build/java/turbine/javac/JavacTurbineTest -s --verbose_failures
Loading:
Loading: 0 packages loaded
INFO: Analysed target //src/java_tools/buildjar/javatests/com/google/devtools/build/java/turbine/javac:JavacTurbineTest (0 packages loaded).
INFO: Found 1 test target...
[0 / 2] BazelWorkspaceStatusAction stable-status.txt
SUBCOMMAND: # //src/java_tools/buildjar/javatests/com/google/devtools/build/java/turbine/javac:JavacTurbineTest [action 'Testing //src/java_tools/buildjar/javatests/com/google/devtools/build/java/turbine/javac:JavacTurbineTest']
cd C:/msys64/tmp/_bazel_davido/e7lhz0a0/execroot/io_bazel
SET JAVA_RUNFILES=bazel-out/x64_windows-fastbuild/bin/src/java_tools/buildjar/javatests/com/google/devtools/build/java/turbine/javac/JavacTurbineTest.exe.runfiles
SET PATH=C:\msys64\usr\bin;C:\msys64\bin;C:\Users\davido\pgm\nodejs;C:\Users\davido\AppData\Roaming\npm;C:\Python36;C:\msys64\usr\local\bin;C:\msys64\usr\bin;C:\msys64\usr\bin;C:\msys64\opt\bin;C:\Windows\System32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\msys64\usr\bin\site_perl;C:\msys64\usr\bin\vendor_perl;C:\msys64\usr\bin\core_perl
SET PYTHON_RUNFILES=bazel-out/x64_windows-fastbuild/bin/src/java_tools/buildjar/javatests/com/google/devtools/build/java/turbine/javac/JavacTurbineTest.exe.runfiles
SET RUNFILES_DIR=bazel-out/x64_windows-fastbuild/bin/src/java_tools/buildjar/javatests/com/google/devtools/build/java/turbine/javac/JavacTurbineTest.exe.runfiles
SET RUNFILES_MANIFEST_ONLY=1
SET RUN_UNDER_RUNFILES=1
SET TEMP=C:\Users\davido\AppData\Local\Temp
SET TEST_BINARY=src/java_tools/buildjar/javatests/com/google/devtools/build/java/turbine/javac/JavacTurbineTest.exe
SET TEST_INFRASTRUCTURE_FAILURE_FILE=bazel-out/x64_windows-fastbuild/testlogs/src/java_tools/buildjar/javatests/com/google/devtools/build/java/turbine/javac/JavacTurbineTest/test.infrastructure_failure
SET TEST_LOGSPLITTER_OUTPUT_FILE=bazel-out/x64_windows-fastbuild/testlogs/src/java_tools/buildjar/javatests/com/google/devtools/build/java/turbine/javac/JavacTurbineTest/test.raw_splitlogs/test.splitlogs
SET TEST_PREMATURE_EXIT_FILE=bazel-out/x64_windows-fastbuild/testlogs/src/java_tools/buildjar/javatests/com/google/devtools/build/java/turbine/javac/JavacTurbineTest/test.exited_prematurely
SET TEST_SIZE=medium
SET TEST_SRCDIR=bazel-out/x64_windows-fastbuild/bin/src/java_tools/buildjar/javatests/com/google/devtools/build/java/turbine/javac/JavacTurbineTest.exe.runfiles
SET TEST_TIMEOUT=300
SET TEST_TMPDIR=_tmp/be0e05b7bca0f645bc898e36ab614213
SET TEST_UNDECLARED_OUTPUTS_ANNOTATIONS=bazel-out/x64_windows-fastbuild/testlogs/src/java_tools/buildjar/javatests/com/google/devtools/build/java/turbine/javac/JavacTurbineTest/test.outputs_manifest/ANNOTATIONS
SET TEST_UNDECLARED_OUTPUTS_ANNOTATIONS_DIR=bazel-out/x64_windows-fastbuild/testlogs/src/java_tools/buildjar/javatests/com/google/devtools/build/java/turbine/javac/JavacTurbineTest/test.outputs_manifest
SET TEST_UNDECLARED_OUTPUTS_DIR=bazel-out/x64_windows-fastbuild/testlogs/src/java_tools/buildjar/javatests/com/google/devtools/build/java/turbine/javac/JavacTurbineTest/test.outputs
SET TEST_UNDECLARED_OUTPUTS_MANIFEST=bazel-out/x64_windows-fastbuild/testlogs/src/java_tools/buildjar/javatests/com/google/devtools/build/java/turbine/javac/JavacTurbineTest/test.outputs_manifest/MANIFEST
SET TEST_UNDECLARED_OUTPUTS_ZIP=bazel-out/x64_windows-fastbuild/testlogs/src/java_tools/buildjar/javatests/com/google/devtools/build/java/turbine/javac/JavacTurbineTest/test.outputs/outputs.zip
SET TEST_UNUSED_RUNFILES_LOG_FILE=bazel-out/x64_windows-fastbuild/testlogs/src/java_tools/buildjar/javatests/com/google/devtools/build/java/turbine/javac/JavacTurbineTest/test.unused_runfiles_log
SET TEST_WARNINGS_OUTPUT_FILE=bazel-out/x64_windows-fastbuild/testlogs/src/java_tools/buildjar/javatests/com/google/devtools/build/java/turbine/javac/JavacTurbineTest/test.warnings
SET TEST_WORKSPACE=io_bazel
SET TMP=C:\Users\davido\AppData\Local\Temp
SET TZ=UTC
SET XML_OUTPUT_FILE=bazel-out/x64_windows-fastbuild/testlogs/src/java_tools/buildjar/javatests/com/google/devtools/build/java/turbine/javac/JavacTurbineTest/test.xml
C:/msys64/usr/bin/bash.exe -c $0 $* external/bazel_tools/tools/test/test-setup.sh src/java_tools/buildjar/javatests/com/google/devtools/build/java/turbine/javac/JavacTurbineTest.exe
[1 / 2] 1 / 1 tests, 1 failed; Testing //src/java_tools/buildjar/javatests/com/google/devtools/build/java/turbine/javac:JavacTurbineTest; 1s local
FAIL: //src/java_tools/buildjar/javatests/com/google/devtools/build/java/turbine/javac:JavacTurbineTest (see C:/msys64/tmp/_bazel_davido/e7lhz0a0/execroot/io_bazel/bazel-out/x64_windows-fastbuild/testlogs/src/java_tools/buildjar/javatests/com/google/devtools/build/java/turbine/javac/JavacTurbineTest/test.log)
Target //src/java_tools/buildjar/javatests/com/google/devtools/build/java/turbine/javac:JavacTurbineTest up-to-date:
C:/msys64/tmp/_bazel_davido/e7lhz0a0/execroot/io_bazel/bazel-out/x64_windows-fastbuild/bin/src/java_tools/buildjar/javatests/com/google/devtools/build/java/turbine/javac/JavacTurbineTest.jar
C:/msys64/tmp/_bazel_davido/e7lhz0a0/execroot/io_bazel/bazel-out/x64_windows-fastbuild/bin/src/java_tools/buildjar/javatests/com/google/devtools/build/java/turbine/javac/JavacTurbineTest.exe
INFO: Elapsed time: 2,279s, Critical Path: 1,50s
INFO: Build completed, 1 test FAILED, 2 total actions
//src/java_tools/buildjar/javatests/com/google/devtools/build/java/turbine/javac:JavacTurbineTest FAILED in 1,5s
C:/msys64/tmp/_bazel_davido/e7lhz0a0/execroot/io_bazel/bazel-out/x64_windows-fastbuild/testlogs/src/java_tools/buildjar/javatests/com/google/devtools/build/java/turbine/javac/JavacTurbineTest/test.log
Executed 1 out of 1 test: 1 fails locally.
It seems, that jvm_flags doesn't have the desired effect on Windows, and -Xbootclasspath/p:<path-to-java9> option doesn't have effect and that the default javac from Java 8 is used.
jvm_flags = [
# Simulates how Bazel invokes turbine
"-Xbootclasspath/p:$(location //third_party/java/jdk/langtools:javac_jar)",
],
The same test is passing on Linux without any issue.
Metadata
Metadata
Assignees
Labels
area-WindowsWindows-specific issues and feature requestsplatform: windowsteam-OSSIssues for the Bazel OSS team: installation, release processBazel packaging, websiteunder investigationuntriagedHas not yet been seen by appropriate subteam
Activity
laszlocsomor commentedon Nov 27, 2017
Thanks for filing this issue. I could also repro it.
I agree the problem seems to be caused by the boot class path:
Bazel propagates the jvm flags to the java launcher (good), but the
$(location)expansion yields the runfiles path (third_party/java/jdk/langtools/javac-9-dev-r4023-3.jar) which doesn't exist on Windows, because Bazel doesn't create runfiles on Windows.$(location)should expand to the actual path of the runfile. I'll create a separate bug about that.Temporarily hardcoding the absolute path in the BUILD file doesn't fix the test, but makes it fail later, giving the impression of progress.
laszlocsomor commentedon Nov 27, 2017
I added debugging info to
src/java_tools/buildjar/javatests/com/google/devtools/build/java/turbine/javac/JavacTurbineTest.java:and I commented out the rest of the tests in that class to make it faster.
The test output is:
Then I changed
src/java_tools/buildjar/javatests/com/google/devtools/build/java/turbine/javac/BUILD:Now the test output is:
Now the
java.lang.NoSuchFieldError: ANNOTATION_PROCESSOR_MODULE_PATHis gone, but we haveUnable to find package java.lang in classpath or bootclasspathinstead.On both Linux and Windows, adding/removing the
jvm_flagsattribute results in adding/removingthird_party/java/jdk/langtools/javac-9-dev-r4023-3.jarorC:/work/bazel/third_party/java/jdk/langtools/javac-9-dev-r4023-3.jar, to/from the beginning ofsun.boot.class.path.Yet on Linux I don't see the
Unable to find package java.lang in classpath or bootclasspatherror when adding thejvm_flags, like I do on Windows.@cushon , do you know what could be going on?
davido commentedon Nov 27, 2017
//CC @damienmg @meteorcloudy
Great! This raises the question, why/how the Bazel-CI is green then? Today we know (#4108), that java_tools are inherently broken on Windows: transitive class path construction compares '/'-separated paths with '\'-separated paths. And, ironically,
JavacTurbineTesttest would probably catch this breakage, if it would run on Windows?Or are java_tools tests not active on Bazel CI for some reasons (or not active on Windows)?
Inevitably, this raises another question: what other crucial unit tests are disabled/not active on Windows and why? And consequently, what other severe bugs (like #4108) are still undiscovered on Windows, that would have been discovered, when the existing Bazel unit tests would run on Bazel CI, on Windows as well?
laszlocsomor commentedon Nov 28, 2017
I'm guessing we don't run the JavacTurbineTest on Windows, since it's not accessible from
//src:all_windows_tests.@cushon has a pending internal commit that fixes this test on Windows. I'm working on fixing the
$(location)expansion for data-deps on Windows (#4171). When those are both in, I can enable JavacTurbineTest on Windows.Make turbine tests more compatible with Windows
Make turbine tests more compatible with Windows
dslomov commentedon Feb 15, 2019
Please do not assign issues to more than one team.
meisterT commentedon May 11, 2020
@meteorcloudy is this still relevant?
davido commentedon May 27, 2020
Not working on Windows Bazel QA any more.