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

Windows: cannot shorten the path enough #19710

Open
sluongng opened this issue Oct 3, 2023 · 0 comments
Open

Windows: cannot shorten the path enough #19710

sluongng opened this issue Oct 3, 2023 · 0 comments
Labels
area-Windows Windows-specific issues and feature requests team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website type: bug untriaged

Comments

@sluongng
Copy link
Contributor

sluongng commented Oct 3, 2023

Description of the bug:

When running tests on windows with --windows_enable_symlinks and --enable_runfiles, the test would fail with

==================== Test output for //enterprise/server/remote_execution/commandutil:commandutil_test:
ERROR(tools/test/windows/tw.cc:1297) 
ERROR: src/main/native/windows/process.cc(95): WaitableProcess::Create(D:\0\ihlv26j4\execroot\buildbuddy\bazel-out\x64_windows-fastbuild\bin\enterprise\server\remote_execution\commandutil\commandutil_test_\commandutil_test.exe.runfiles\buildbuddy\enterprise\server\remote_execution\commandutil\commandutil_test_\commandutil_test.exe): 
ERROR: src/main/native/windows/util.cc(292): AsExecutablePathForCreateProcess(D:\0\ihlv26j4\execroot\buildbuddy\bazel-out\x64_windows-fastbuild\bin\enterprise\server\remote_execution\commandutil\commandutil_test_\commandutil_test.exe.runfiles\buildbuddy\enterprise\server\remote_execution\commandutil\commandutil_test_\commandutil_test.exe): 
ERROR: src/main/native/windows/util.cc(262): GetShortPathNameW(\\?\D:\0\ihlv26j4\execroot\buildbuddy\bazel-out\x64_windows-fastbuild\bin\enterprise\server\remote_execution\commandutil\commandutil_test_\commandutil_test.exe.runfiles\buildbuddy\enterprise\server\remote_execution\commandutil\commandutil_test_\commandutil_test.exe): cannot shorten the path enough

ERROR(tools/test/windows/tw.cc:1456) Failed to start test process (arg: D:\0\ihlv26j4\execroot\buildbuddy\bazel-out\x64_windows-fastbuild\bin\enterprise\server\remote_execution\commandutil\commandutil_test_\commandutil_test.exe.runfiles\buildbuddy\enterprise\server\remote_execution\commandutil\commandutil_test_\commandutil_test.exe)
================================================================================

(reformatted log to multiple lines for readability)

This is not expected as the Windows instance has been configured with Long Paths support

Which category does this issue belong to?

Core, Local Execution

What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

Perform any test on Windows with a sufficient long package path.

Which operating system are you running Bazel on?

Windows

What is the output of bazel info release?

release 6.4.0rc1

If bazel info release returns development version or (@non-git), tell us how you built Bazel.

N/A

What's the output of git remote get-url origin; git rev-parse master; git rev-parse HEAD ?

N/A

Is this a regression? If yes, please try to identify the Bazel commit where the bug was introduced.

No response

Have you found anything relevant by searching the web?

No response

Any other information, logs, or outputs that you want to share?

https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-getshortpathnamew

Starting with Windows 10, Version 1607, you can opt-in to remove the MAX_PATH limitation without prepending "\?". See the "Maximum Path Length Limitation" section of Naming Files, Paths, and Namespaces for details.

So ideally, we should just migrate Windows syscalls to the new behavior.

@iancha1992 iancha1992 added area-Windows Windows-specific issues and feature requests team-Core Skyframe, bazel query, BEP, options parsing, bazelrc team-Local-Exec Issues and PRs for the Execution (Local) team labels Oct 3, 2023
@meisterT meisterT removed the team-Local-Exec Issues and PRs for the Execution (Local) team label Oct 9, 2023
@meteorcloudy meteorcloudy added team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website and removed team-Core Skyframe, bazel query, BEP, options parsing, bazelrc labels Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Windows Windows-specific issues and feature requests team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website type: bug untriaged
Projects
None yet
Development

No branches or pull requests

6 participants