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

Runfiles tree creation fails on Windows #16955

Closed
ozio85 opened this issue Dec 7, 2022 · 8 comments
Closed

Runfiles tree creation fails on Windows #16955

ozio85 opened this issue Dec 7, 2022 · 8 comments
Labels
team-Remote-Exec Issues and PRs for the Execution (Remote) team type: bug untriaged

Comments

@ozio85
Copy link

ozio85 commented Dec 7, 2022

Description of the bug:

The runfiles tree creation currently fails on Windows.

The error is:
ERROR: ../BUILD.bazel:1:10: Creating runfiles tree bazel-out/x64_windows-fastbuild/bin/....exe.runfiles failed: java.io.FileNotFoundException: .../MANIFEST (No such file or directory), However the MANIFEST file is created and exists after the action crashes.

It started in release 6.0.0-pre.20221020.1, and a git bisect shows that #16477 is the culprit.

I will analyze the commit tomorrow, and see what might be the cause

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

Create an actions.run that use a py_binary tool

Which operating system are you running Bazel on?

Windows

What is the output of bazel info release?

6.0.0-pre.20221020.1

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

No response

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

No response

Have you found anything relevant by searching the web?

No response

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

No response

@ozio85 ozio85 changed the title Runfile tree creation fails on Windows Runfiles tree creation fails on Windows Dec 7, 2022
@sgowroji
Copy link
Member

sgowroji commented Dec 8, 2022

Hello @ozio85, Could you please give complete steps to reproduce the above issue. Thanks!

@brentleyjones
Copy link
Contributor

@bazel-io flag

@bazel-io bazel-io added the potential release blocker Flagged by community members using "@bazel-io flag". Should be added to a release blocker milestone label Dec 8, 2022
@ozio85
Copy link
Author

ozio85 commented Dec 8, 2022

Ok so now I have made a small repro. The bug manifests with remote_cache enable AND remote_download_toplevel set
build:cache --remote_cache=grpc://my.remote.adress:8980
build:cache --remote_instance_name=remote-execution
build:cache --remote_download_toplevel

@sgowroji sgowroji added untriaged team-Remote-Exec Issues and PRs for the Execution (Remote) team and removed more data needed labels Dec 8, 2022
@ozio85
Copy link
Author

ozio85 commented Dec 8, 2022

Repro_16955.tar.gz

So to repro this bug, you need to fill in a valid remote cache in .bazelrc:
bazel build ///:metadata --config=cache

The build works fine with a local build.

@ozio85
Copy link
Author

ozio85 commented Dec 8, 2022

Note that you have to do a clean build in order to retrigger the runfiles tree build action, and this action has to be run in combination with the remote cache

@meteorcloudy
Copy link
Member

/cc @coeuvre

@coeuvre
Copy link
Member

coeuvre commented Dec 8, 2022

I cannot reproduce this on macOS. It seems that the issue only occurs on Windows (because IIRC, MANIFEST based solution is only used for Windows). I will setup a Windows machine tomorrow to investigate more.

@meteorcloudy
Copy link
Member

@bazel-io fork 6.0.0

@bazel-io bazel-io removed the potential release blocker Flagged by community members using "@bazel-io flag". Should be added to a release blocker milestone label Dec 9, 2022
Wyverald pushed a commit that referenced this issue Dec 12, 2022
`getLastModifiedTime` and `setLastModifiedTime` are used by `FileSystemUtils.copyFile` to copy files. When runfiles is disabled, `SymlinkTreeStrategy#createSymlinks` use it to copy MANIFEST file.

Fixes #16955.

Closes #16972.

PiperOrigin-RevId: 494712456
Change-Id: I9a77063f35e1f6e2559c02612790542e996994b8
Wyverald added a commit that referenced this issue Dec 12, 2022
…16993)

`getLastModifiedTime` and `setLastModifiedTime` are used by `FileSystemUtils.copyFile` to copy files. When runfiles is disabled, `SymlinkTreeStrategy#createSymlinks` use it to copy MANIFEST file.

Fixes #16955.

Closes #16972.

PiperOrigin-RevId: 494712456
Change-Id: I9a77063f35e1f6e2559c02612790542e996994b8

Co-authored-by: Chi Wang <chiwang@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team-Remote-Exec Issues and PRs for the Execution (Remote) team type: bug untriaged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants