Bazel fails during analysis phase - "Server terminated abruptly"

See original GitHub issue

Description of the problem / feature request / question:

When running Bazel in CI and building targets with rules_go the build will infrequently fail with the message

Server terminated abruptly (error code: 14, error message: '', log file: '...')

The “jvm.out” file given as the log file is empty. The last message in the bazel java.log file is “INFO: Starting analysis”

If possible, provide a minimal example to reproduce the problem:

N/A

Environment info

  • Operating System: Ubuntu 16.04, build inside docker container.

  • Bazel version (output of bazel info release):

Bazel 0.4.5

Have you found anything relevant by searching the web?

Same issue is seen here, but no resolution in sight https://github.com/bazelbuild/bazel/issues/2939

Anything else, information or logs or outputs that would be helpful?

(If they are large, please upload as attachment or provide link).

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:13 (1 by maintainers)

github_iconTop GitHub Comments

7reactions
ainscommented, May 17, 2017

Turns out this was the OOM killer, the CI machines were running out of memory during the Bazel run.

2reactions
cse19922021commented, Dec 27, 2021

@eduamf use --jobs=1. Please note that you have to place this argument after “build” not before it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

bazel - Cannot build with error `Server terminated abruptly`
1 Answer 1 ... The most common cause I've seen for this kind of thing (can't say for sure without the jvm.out )...
Read more >
Commands and Options | Bazel
This page covers the options that are available with various Bazel commands, such as bazel build , bazel run , and bazel test...
Read more >
Using pkg_tar from Skylark rules - Google Groups
If you try, pkg_tar's rule() call is run during the analysis of your custom rule, rather than the loading phase, and fails. I...
Read more >
Fixing Bazel out-of-memory problems - Aspect Blog
There are two potential problems: The Bazel server runs in a JVM, ... system like Bazel server terminated abruptly (error code: 14, ...
Read more >
Converting a polyglot project build to Bazel: part 1 - Tweag
On the very first run it will fail due to of Paths_* modules being required by the spec test suite. This requirement is...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found