bazel: Bazel 8 hangs during build event upload

Description of the bug:

I’m seeing an intermittent issue where a build will fail to exit after uploading build events. Seems like Bazel is waiting for background upload tasks even though they have all completed.

Which category does this issue belong to?

Core

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

This happens intermittently and I haven’t found a straightforward repro.

Which operating system are you running Bazel on?

Amazon Linux 2023.6.20250115

What is the output of bazel info release?

release 8.0.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 HEAD ?


If this is a regression, please try to identify the Bazel commit where the bug was introduced with bazelisk --bisect.

No response

Have you found anything relevant by searching the web?

Seems potentially related to https://github.com/bazelbuild/bazel/issues/21626 but I’m not using remote execution.

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

jstack dump

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Comments: 38 (12 by maintainers)

Commits related to this issue

Most upvoted comments

TOMORROW. IT WILL DEFINITELY HAPPEN, AT THE TOP OF MY PRIORITY LIST.

@rkwon-retool it’s not clear to me why it is hanging from the stack dump. Are the log files ($OUTPUT_BASE/java.log, $OUTPUT_BASE/command.log and $OUTPUT_BASE/server/jvm.out) still around?

If not, can you capture the logs along with the stack dump next it happens?

@bazel-io fork 8.2.0

--noremote_cache_async is the only workaround I see at the moment.

@bazel-io fork 8.2.0

We (@tanium) were seeing frequent hangs with 8.0.1. Hangs seem to be resolved with 8.1.0 rc4.

Thank you!

@bazel-io fork 8.1.0