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

BES sending invalid authority headers when using --bes_backend=unix:// #23417

Open
BryceBeagle opened this issue Aug 24, 2024 · 0 comments
Open
Labels
team-Core Skyframe, bazel query, BEP, options parsing, bazelrc type: bug untriaged

Comments

@BryceBeagle
Copy link

BryceBeagle commented Aug 24, 2024

Description of the bug:

When Bazel is configured to use a unix:// endpoint for the BES backend (--bes_backend=unix://xyz.sock), it sends the socket path as the authority. This is an invalid authority and some HTTP2 servers, such as h2, (rightfully) reject it.

[2024-08-24T18:02:06Z DEBUG h2::server] malformed headers: malformed authority (b"/var/folders/19/9rpslp2162z1pt_3vn2dw_fm0000gn/T/.tmpvRc94o.sock"): invalid uri character
[2024-08-24T18:02:06Z DEBUG h2::codec::framed_read] received frame=Data { stream_id: StreamId(3), flags: (0x1: END_STREAM) }
[2024-08-24T18:02:06Z DEBUG h2::codec::framed_write] send frame=Reset { stream_id: StreamId(3), error_code: PROTOCOL_ERROR }

This issue is discussed in detail in

As a workaround I am using hyperium/h2#487 to force h2 to be less strict, but this should be fixed on Bazel's side.

I'm not sure where Bazel is constructing its GRPC requests, but it prevents using an h2 server as a BES backend when using Unix sockets. There was a change made a while back to grpc-go to resolve this; please let me know if I should open an issue with grpc-java instead.

Which category does this issue belong to?

Remote Execution

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

Point bes_backend=unix:// at an h2/tonic server

Which operating system are you running Bazel on?

MacOS

What is the output of bazel info release?

release 7.1.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 ?

No response

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?

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

No response

@github-actions github-actions bot added the team-Remote-Exec Issues and PRs for the Execution (Remote) team label Aug 24, 2024
@coeuvre coeuvre added team-Core Skyframe, bazel query, BEP, options parsing, bazelrc and removed team-Remote-Exec Issues and PRs for the Execution (Remote) team labels Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team-Core Skyframe, bazel query, BEP, options parsing, bazelrc type: bug untriaged
Projects
None yet
Development

No branches or pull requests

5 participants