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

ci.bazel.io breakage: bazel-tests on windows, //src/test/shell/bazel:bazel_windows_example_test#test_cpp fails #2178

Closed
damienmg opened this issue Dec 5, 2016 · 9 comments
Assignees
Labels
P1 I'll work on this now. (Assignee required) platform: windows type: bug
Milestone

Comments

@damienmg
Copy link
Contributor

damienmg commented Dec 5, 2016

Log at:
http://ci.bazel.io/job/bazel-tests/BAZEL_VERSION=HEAD,PLATFORM_NAME=windows-x86_64/380/console

** test_cpp ********************************************************************
INFO: Reading 'startup' options from /c/windows/TEMP/_bazel_SYSTEM/LhCiLHCO/execroot/windows-x86_64/_tmp/bazel_windows_example_test_1/bazelrc: --output_user_root=/c/windows/TEMP/_bazel_SYSTEM/LhCiLHCO/execroot/windows-x86_64/_tmp/bazel_windows_example_test_1/root --host_javabase=C:/windows/TEMP/_bazel_SYSTEM/LhCiLHCO/external/local_jdk
INFO: $TEST_TMPDIR defined: output root default is '/c/windows/TEMP/_bazel_SYSTEM/LhCiLHCO/execroot/windows-x86_64/_tmp/bazel_windows_example_test_1'.
.............................................................................
____Loading package: examples/cpp
____Loading package: @bazel_tools//tools/cpp
____Loading package: @bazel_tools//tools/jdk
____Loading package: @local_config_xcode//
____Loading package: @local_jdk//
WARNING: C:/windows/TEMP/_bazel_SYSTEM/LhCiLHCO/execroot/windows-x86_64/_tmp/bazel_windows_example_test_1/root/nrtg4st0/external/bazel_tools/tools/cpp/cc_configure.bzl:57:3: 
Auto-Configuration Warning: 'BAZEL_PYTHON' is not set, start looking for python in PATH.
.
WARNING: C:/windows/TEMP/_bazel_SYSTEM/LhCiLHCO/execroot/windows-x86_64/_tmp/bazel_windows_example_test_1/root/nrtg4st0/external/bazel_tools/tools/cpp/cc_configure.bzl:57:3: 
Auto-Configuration Warning: Python found at C:/python_27_amd64/files/python.exe
.
WARNING: C:/windows/TEMP/_bazel_SYSTEM/LhCiLHCO/execroot/windows-x86_64/_tmp/bazel_windows_example_test_1/root/nrtg4st0/external/bazel_tools/tools/cpp/cc_configure.bzl:57:3: 
Auto-Configuration Warning: 'BAZEL_VS' is not set, start looking for the latest Visual Studio installed.
.
ERROR: in target '//external:cc_toolchain': no such package '@local_config_cc//': Traceback (most recent call last):
	File "C:/windows/TEMP/_bazel_SYSTEM/LhCiLHCO/execroot/windows-x86_64/_tmp/bazel_windows_example_test_1/root/nrtg4st0/external/bazel_tools/tools/cpp/cc_configure.bzl", line 520
		_find_vs_path(repository_ctx)
	File "C:/windows/TEMP/_bazel_SYSTEM/LhCiLHCO/execroot/windows-x86_64/_tmp/bazel_windows_example_test_1/root/nrtg4st0/external/bazel_tools/tools/cpp/cc_configure.bzl", line 420, in _find_vs_path
		int(path_segments[-(3)].split(" ")[-..."))])
	File "C:/windows/TEMP/_bazel_SYSTEM/LhCiLHCO/execroot/windows-x86_64/_tmp/bazel_windows_example_test_1/root/nrtg4st0/external/bazel_tools/tools/cpp/cc_configure.bzl", line 420, in int
		path_segments[-(3)]
Index out of range (index is -3, but sequence has 0 elements).
____Elapsed time: 10.363s
-- Test log: -----------------------------------------------------------
------------------------------------------------------------------------
test_cpp FAILED: Failed to build examples/cpp:hello-world .
/c/jenkins/workspace/bazel-tests/BAZEL_VERSION/HEAD/PLATFORM_NAME/windows-x86_64/src/test/shell/testenv.sh:447: in call to assert_build
/c/jenkins/workspace/bazel-tests/BAZEL_VERSION/HEAD/PLATFORM_NAME/windows-x86_64/src/test/shell/testenv.sh:453: in call to assert_build_output
C:/windows/TEMP/_bazel_SYSTEM/LhCiLHCO/execroot/windows-x86_64/bazel-out/local-fastbuild/bin/src/test/shell/bazel/bazel_windows_example_test:57: in call to test_cpp
FAILED: test_cpp
@damienmg damienmg added breakage platform: windows P1 I'll work on this now. (Assignee required) type: bug labels Dec 5, 2016
@laszlocsomor
Copy link
Contributor

Looking.

@damienmg
Copy link
Contributor Author

damienmg commented Dec 5, 2016

Note that I got that earlier with the previous build at http://ci.bazel.io/job/Gerrit-bazel-tests/216/ but wasn't present at HEAD so I suspect a flake

@meteorcloudy
Copy link
Member

Looks like it's caused by my change 325b155

But not sure why, I'll look into it.

@laszlocsomor
Copy link
Contributor

Thanks @meteorcloudy .

@damienmg , the test is flaky, test_java_test failed for me on the first try, and there's a really insightful error message just 20 lines above the failure message or so:

==================== Test output for //examples/java-native/src/test/java/com/example/myproject:hello:
Error: Current working directory has a path longer than allowed for a
Win32 working directory.
Can't start native Windows application from here.

Meaning we need to focus on supporting long paths. That means we'll have to use the widechar version of Win32 API functions and prefix paths with \\?\.

@damienmg
Copy link
Contributor Author

damienmg commented Dec 5, 2016

Deactivating the test until the underlying reason is fixed as there is no clear culprit.

@meteorcloudy
Copy link
Member

The first appearance of this failure I can find is from http://ci.bazel.io/job/bazel-tests/BAZEL_VERSION=HEAD,PLATFORM_NAME=windows-x86_64/365/

So maybe it's a good start to investigate changes in that push.

bazel-io pushed a commit that referenced this issue Dec 5, 2016
This test has became flaky due to long path, see #2178

--
PiperOrigin-RevId: 141044418
MOS_MIGRATED_REVID=141044418
@damienmg damienmg removed the breakage label Dec 5, 2016
@damienmg
Copy link
Contributor Author

damienmg commented Dec 5, 2016

Removed the breakage label now the test is deactivated. please reactivate when fixed :)

@dslomov dslomov added this to the 0.5 milestone Dec 6, 2016
@meteorcloudy
Copy link
Member

I investigated on this, it turns out the result.stdout of repository_ctx.execute is sometimes incomplete and sometimes empty.

Having doubts on https://bazel-review.googlesource.com/#/c/7373/...

@meteorcloudy
Copy link
Member

bazel_windows_example_test was originally failing due to VC detection was flaky on Windows, especially in shell test. This is no longer a problem since #2430 #2440 was fixed.

Currently, it is still failing because of two reasons:

  1. workspace in shell test is getting too long (>260 chars), this can be workaround by setting TEST_TMPDIR to a short tmp directory.
Error: couldn't create '/c/tmp/_bazel_pcloudy/GYQDuV_U/execroot/bazel/_tmp/bazel_windows_example_test_1/root/install/912c8e92c0642cd6164a4c6f3bd7fed7.tmp.6488/_embedded_binaries/embedded_tools/third_party/checker_framework_dataflow/java/org/checkerframework/dataflow/analysis/AbstractValue.java': (error: 206): The filename or extension is too long.
  1. bazel_windows_example_test#test_java_test fails when cleanup the workspace
    Haven't found a good solution for this, I'm planning to disable this test case first and fix it later, follow up //src/test/shell/bazel:bazel_windows_example_test#test_java_test fails on Windows  #2558

After these two issues, I think we can re-enable bazel_windows_example_test, which is important for getting test coverage for the major three languages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 I'll work on this now. (Assignee required) platform: windows type: bug
Projects
None yet
Development

No branches or pull requests

4 participants