question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bazel CI: tests tagged as "block-network" fail on macOS

See original GitHub issue

Description of the problem / feature request:

Bazel’s own tests that are tagged as “block-network” now fail on macOS when testing with Bazel built from HEAD, but work when testing with Bazel 1.2.1.

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

Edit //src/test/shell/bazel/workspace_resolved_test.sh, and remove every test method. Add a test method that just runs bazel info, then test. Witness this error in the log:

Server crashed during startup. Now printing /private/var/tmp/_bazel_buildkite/0f6cf1b347f184bdf59fc3dbd70d52bf/sandbox/darwin-sandbox/4257/execroot/io_bazel/_tmp/81731060611f1135fb37d82b4c16c3ce/root/0776a7d52f698afa6331a0f743d059a6/server/jvm.out
I/O Error: Failed to bind
-- Test log: -----------------------------------------------------------
------------------------------------------------------------------------

Update: culprit is 8e7c3494831edba5fef8a29d200d3b63fc282e46

What operating system are you running Bazel on?

macOS Catalina (10.15.1)

What’s the output of bazel info release?

Using Bazel built at 5be24a81ff374ab7690ef08a933501f6eaf05efe

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:13 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
philwocommented, Feb 15, 2022

@ngeor Could you please file a new issue and add log output etc.? This makes it easier for us to prioritize and handle it than a comment on an old and already closed issue. Feel free to reference this one as a prior occurrence, of course! Thank you 😊

0reactions
ngeorcommented, Feb 15, 2022

Hi folks,

I seem to have stumbled upon this issue with Bazel 5.0 and macOS Monterey 12.2.1

Only on Mac, unit tests that try to listen on localhost are failing with “block-network”.

They pass fine on CI (Linux).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Common Definitions - Bazel 3.0.0
Tags can be used on any rule. Tags on test and test_suite rules are useful for categorizing the tests. Tags on non-test rules...
Read more >
CHANGELOG.md - bazel - Git at Google
Previously, Bazel. would fail to report any status for the test attempt. - Fixed an issue where Bazel could erroneously report a test...
Read more >
Change log for 4.8.22
Promoted from registry.ci.openshift.org/ocp/release:4.8.0-0.nightly-2021-11-24-020113 ... Don't exit script prematurely if test fails #802 ...
Read more >
README.md - Aspect's Bazel Documentation
This project extends Bazel with build rules for Haskell. ... sandboxing on (this is Bazel's default on Linux and macOS) protects against this...
Read more >
Alpine and macOS support for LiveHD - UC Santa Cruz
Preparation - Clean up infrastructure, fix build, make CI green again ... [b3b16cb2] README: add new CI badge; [1693dbb7] build: tag failing tests...
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