-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Bazel crashes with InterruptedException when certain benign errors happen #14787
Comments
@bazel-io flag |
Does this work in 4.2.2? |
was on 4.2.1, and it seems to have this issue as well.
however exit code seems to be 0. |
Bazel writes progress and error messages to Try running it like so: Or like so: Or like so (if you want to see the progress messages): This is 'standard' Unix behavior, although it is a bit unusual for a tool to generate that much |
Ok to clarify, the issue isn't
but the exception which then causes bazel to crash:
and then subsequent bazel invocation will have to start a new server. So it seems to be remain as a serious issue. And the issue did start with release 5.0.0 |
Hmm. This might be a new thing in 5.0.0 after all. @coeuvre does this look like an issue with remote execution? |
I regularly run ERROR: /xxx/build_rules/targets/something_library.bzl:63:19: name 'merged' is not defined (did you mean 'merged0'?)
FATAL: bazel crashed due to an internal error. Printing stack trace:
java.lang.RuntimeException: java.lang.InterruptedException: DefaultPromise@2eb04551(incomplete)
at io.netty.channel.pool.FixedChannelPool.close(FixedChannelPool.java:454)
at com.google.devtools.build.lib.remote.http.HttpCacheClient.close(HttpCacheClient.java:736)
at com.google.devtools.build.lib.remote.disk.DiskAndRemoteCacheClient.close(DiskAndRemoteCacheClient.java:71)
at com.google.devtools.build.lib.remote.RemoteCache.deallocate(RemoteCache.java:454)
at io.netty.util.AbstractReferenceCounted.handleRelease(AbstractReferenceCounted.java:86)
at io.netty.util.AbstractReferenceCounted.release(AbstractReferenceCounted.java:76)
at com.google.devtools.build.lib.remote.RemoteActionContextProvider.afterCommand(RemoteActionContextProvider.java:217)
at com.google.devtools.build.lib.remote.RemoteModule.afterCommand(RemoteModule.java:862)
at com.google.devtools.build.lib.runtime.BlazeRuntime.afterCommand(BlazeRuntime.java:626)
at com.google.devtools.build.lib.runtime.BlazeCommandDispatcher.execExclusively(BlazeCommandDispatcher.java:619)
at com.google.devtools.build.lib.runtime.BlazeCommandDispatcher.exec(BlazeCommandDispatcher.java:231)
at com.google.devtools.build.lib.server.GrpcServerImpl.executeCommand(GrpcServerImpl.java:550)
at com.google.devtools.build.lib.server.GrpcServerImpl.lambda$run$1(GrpcServerImpl.java:614)
at io.grpc.Context$1.run(Context.java:579)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.lang.InterruptedException: DefaultPromise@2eb04551(incomplete)
at io.netty.util.concurrent.DefaultPromise.await(DefaultPromise.java:244)
at io.netty.util.concurrent.DefaultPromise.await(DefaultPromise.java:35)
at io.netty.channel.pool.FixedChannelPool.close(FixedChannelPool.java:451)
... 16 more Maybe this is more to do with some deferred finalizer running in a thread-backed future, and it needs to ignore some exceptions? |
To add, unsurprisingly we are also seeing the error when interrupting bazel with ctrl-c.
|
@coeuvre could you take a look at this? If this is indeed a 5.0.0 regression, we could look at fixing it in 5.1.0. |
Sorry for the late reply, somehow I missed this from my inbox. This is indeed a 5.0.0 regression and I will fix it in 5.1.0. |
@bazel-io fork 5.1 |
Also cancels tasks submitted during `afterCommand` if interrupted. Fixes bazelbuild#14787. Closes bazelbuild#14992. PiperOrigin-RevId: 433205726 (cherry picked from commit a73aa12)
…14999) Also cancels tasks submitted during `afterCommand` if interrupted. Fixes #14787. Closes #14992. PiperOrigin-RevId: 433205726 (cherry picked from commit a73aa12) Co-authored-by: Chi Wang <[email protected]>
I am seeing this problem with Bazel 7.2.1:
Then you get:
However, if your script has
|
Slack discussion: https://bazelbuild.slack.com/archives/CA31HN1T3/p1644524174413049
Description of the problem:
bazel error with piped
Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
What operating system are you running Bazel on?
macos, but also observed similar issue on linux
What's the output of
bazel info release
?If
bazel info release
returns "development version" or "(@non-git)", tell us how you built Bazel.What's the output of
git remote get-url origin ; git rev-parse master ; git rev-parse HEAD
?Have you found anything relevant by searching the web?
None yet
Other info
writing to a file works.
The text was updated successfully, but these errors were encountered: