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

java.exe failures on Buildkite #4924

Closed
buchgr opened this issue Mar 27, 2018 · 9 comments
Closed

java.exe failures on Buildkite #4924

buchgr opened this issue Mar 27, 2018 · 9 comments
Assignees

Comments

@buchgr
Copy link
Contributor

buchgr commented Mar 27, 2018

https://buildkite.com/bazel/google-bazel-presubmit/builds/588#60311e60-e262-4ee1-83c9-270ce5296aa4

INFO: From Compiling Java headers src/main/java/com/google/devtools/build/lib/libbuild-base-hjar.jar (455 files):

  | Action failed to execute: java.io.IOException: ERROR: src/main/native/windows/processes-jni.cc(161): CreateProcessWithExplicitHandles("D:\temp_bazel_buildkite\ogez2d-n\execroot\io_bazel\external\local_jdk\bin\java.exe" -Xverify:none -Xbootclasspath/p:external/bazel_tools/third_party/java/jdk/langtools/javac-9+181-r4173-1.jar -jar e(...)): command is longer than CreateProcessW's limit (32768 characters)

and also

ERROR: Caught I/O exception: java.io.IOException: D:/temp/_bazel_buildkite/ogez2d-n/execroot/io_bazel/_tmp/8a0a6eaca3beedecec9a7a670beca254/_bazel_buildkite/install/06be74defec9017c98119afd3362b681/_embedded_binaries/embedded_tools/jdk/bin/java.exe (Permission denied)

Any thoughts on this error @laszlocsomor @meteorcloudy ?

@laszlocsomor
Copy link
Contributor

Started debugging.

Known so far:

@laszlocsomor
Copy link
Contributor

@buchgr , the first error ("Action failed to execute ... command is longer than CreateProcessW's limit (32768 characters)") is #4096

@laszlocsomor
Copy link
Contributor

I don't know how to repro this and cannot spend more time looking for it. Please reopen if you see it again.

@jasharpe
Copy link

jasharpe commented Apr 9, 2018

@jasharpe
Copy link

jasharpe commented Apr 9, 2018

Seeing it consistently for the test I'm adding. Here's another one: https://buildkite.com/bazel/google-bazel-presubmit/builds/1481#5779278d-89d5-4ac7-9e9b-2393872df4f1/179-236

@jin jin reopened this Apr 10, 2018
@laszlocsomor
Copy link
Contributor

I suspect this is #5038

@laszlocsomor
Copy link
Contributor

@mhlopko saw the Permission Denied error on BuildKite even with Bazel 0.13.0, so it's not #5038.

https://buildkite.com/bazel/google-bazel-presubmit/builds/2469#4098e7a1-1dd1-419f-97d4-99ed19869fe5

@hlopko
Copy link
Member

hlopko commented May 16, 2018

Another: https://buildkite.com/bazel/google-bazel-presubmit/builds/2738, trying to rerun.

@laszlocsomor
Copy link
Contributor

Thanks! What I know is that the error is reported here:

actionExecutionContext.getEventHandler().handle(Event.error("Caught I/O exception: " + e));
throw new EnvironmentalExecException("unexpected I/O exception", e);

Without a stack trace it's difficult to know what exactly threw the exception. Let me change Bazel to report the stacktrace there.

laszlocsomor added a commit to laszlocsomor/bazel that referenced this issue May 16, 2018
Print the stacktrace of unexpected I/O errors in
StandaloneTestStrategy, to ease diagnosing the
root cause of the exception.

See bazelbuild#4924

Without the stacktrace, all we see in BuildKite
is, for example:

```
ERROR: Caught I/O exception: java.io.IOException: C:/users/b/_bazel_b/bnp8s_vg/execroot/io_bazel/_tmp/b6bda2f0385d1152d3a7f550c6cc1938/_bazel_b/install/23a47abea50baae4d7e032437c1cecc9/_embedded_binaries/embedded_tools/jdk/bin/java.exe (Permission denied)
ERROR: C:/build/buildkite-worker-windows-java8-lfl8-1/bazel/google-bazel-presubmit/src/test/py/bazel/BUILD:71:1: Couldn't build file src/test/py/bazel/bazel_windows_test/test.log:  failed: unexpected I/O exception: C:/users/b/_bazel_b/bnp8s_vg/execroot/io_bazel/_tmp/b6bda2f0385d1152d3a7f550c6cc1938/_bazel_b/install/23a47abea50baae4d7e032437c1cecc9/_embedded_binaries/embedded_tools/jdk/bin/java.exe (Permission denied)
```

The above log contains no information on what
exactly tried accessing java.exe and how, and why
it failed. With a stacktrace I'm hoping to shed
light on the culprit.

Change-Id: I4f3851cd1bc1b2b348217de5b41069591a8f4446
bazel-io pushed a commit that referenced this issue May 16, 2018
Print the stacktrace of unexpected I/O errors in
StandaloneTestStrategy, to ease diagnosing the
root cause of the exception.

See #4924

Without the stacktrace, all we see in BuildKite
is, for example:

```
ERROR: Caught I/O exception: java.io.IOException: C:/users/b/_bazel_b/bnp8s_vg/execroot/io_bazel/_tmp/b6bda2f0385d1152d3a7f550c6cc1938/_bazel_b/install/23a47abea50baae4d7e032437c1cecc9/_embedded_binaries/embedded_tools/jdk/bin/java.exe (Permission denied)
ERROR: C:/build/buildkite-worker-windows-java8-lfl8-1/bazel/google-bazel-presubmit/src/test/py/bazel/BUILD:71:1: Couldn't build file src/test/py/bazel/bazel_windows_test/test.log:  failed: unexpected I/O exception: C:/users/b/_bazel_b/bnp8s_vg/execroot/io_bazel/_tmp/b6bda2f0385d1152d3a7f550c6cc1938/_bazel_b/install/23a47abea50baae4d7e032437c1cecc9/_embedded_binaries/embedded_tools/jdk/bin/java.exe (Permission denied)
```

The above log contains no information on what
exactly tried accessing java.exe and how, and why
it failed. With a stacktrace I'm hoping to shed
light on the culprit.

Change-Id: I4f3851cd1bc1b2b348217de5b41069591a8f4446

Closes #5207.

Change-Id: I792f4a36c1e31ca6332db2dc2d37bd8e597050b3
PiperOrigin-RevId: 196815410
luca-digrazia pushed a commit to luca-digrazia/DatasetCommitsDiffSearch that referenced this issue Sep 4, 2022
    Print the stacktrace of unexpected I/O errors in
    StandaloneTestStrategy, to ease diagnosing the
    root cause of the exception.

    See bazelbuild/bazel#4924

    Without the stacktrace, all we see in BuildKite
    is, for example:

    ```
    ERROR: Caught I/O exception: java.io.IOException: C:/users/b/_bazel_b/bnp8s_vg/execroot/io_bazel/_tmp/b6bda2f0385d1152d3a7f550c6cc1938/_bazel_b/install/23a47abea50baae4d7e032437c1cecc9/_embedded_binaries/embedded_tools/jdk/bin/java.exe (Permission denied)
    ERROR: C:/build/buildkite-worker-windows-java8-lfl8-1/bazel/google-bazel-presubmit/src/test/py/bazel/BUILD:71:1: Couldn't build file src/test/py/bazel/bazel_windows_test/test.log:  failed: unexpected I/O exception: C:/users/b/_bazel_b/bnp8s_vg/execroot/io_bazel/_tmp/b6bda2f0385d1152d3a7f550c6cc1938/_bazel_b/install/23a47abea50baae4d7e032437c1cecc9/_embedded_binaries/embedded_tools/jdk/bin/java.exe (Permission denied)
    ```

    The above log contains no information on what
    exactly tried accessing java.exe and how, and why
    it failed. With a stacktrace I'm hoping to shed
    light on the culprit.

    Change-Id: I4f3851cd1bc1b2b348217de5b41069591a8f4446

    Closes #5207.

    Change-Id: I792f4a36c1e31ca6332db2dc2d37bd8e597050b3
    PiperOrigin-RevId: 196815410
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants