Skip to content

net/http: wrong error returned when request canceled via context after CL 546676 ("net/http: simplify HTTP/1 request cancelation"); detected via x/build/buildlet.TestExecTimeoutError failing #67439

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

Closed
dmitshur opened this issue May 16, 2024 · 3 comments
Assignees
Labels
FixPending Issues that have a fix which has not yet been reviewed or submitted. NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@dmitshur
Copy link
Member

As visible on the x/build by Go commit view, TestExecTimeoutError has started to fail consistently at Go tip starting with CL 546676:

=== RUN   TestExecTimeoutError
    buildletclient_test.go:210: cl.Exec error = error copying response: net/http: request canceled; want buildlet: timeout waiting for command to complete
--- FAIL: TestExecTimeoutError (0.00s)

This code in x/build hasn't changed in a long time. Either the test (or what it's testing) in x/build has a problem that is uncovered by the net/http change, otherwise this is a problem in net/http.

CC @neild.

@dmitshur dmitshur added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label May 16, 2024
@dmitshur dmitshur added this to the Unreleased milestone May 16, 2024
@gopherbot gopherbot added the Builders x/build issues (builders, bots, dashboards) label May 16, 2024
@dmitshur dmitshur self-assigned this May 16, 2024
@gopherbot
Copy link
Contributor

Change https://go.dev/cl/586077 mentions this issue: buildlet: don't rely on io.Copy error to be context.DeadlineExceeded

@dmitshur
Copy link
Member Author

I sent CL 586077 which fixes the immediate problem on the x/build side. It'd be good for Damien to check if this is working as expected.

@dmitshur dmitshur moved this to In Progress in Go Release May 16, 2024
@gopherbot
Copy link
Contributor

Change https://go.dev/cl/586315 mentions this issue: net/http: return correct error when reading from a canceled request body

@dmitshur dmitshur changed the title x/build/buildlet: TestExecTimeoutError fails consistently after CL 546676 ("net/http: simplify HTTP/1 request cancelation") net/http: wrong error returned when request canceled via context after CL 546676 ("net/http: simplify HTTP/1 request cancelation"); detected via x/build/buildlet.TestExecTimeoutError failing May 16, 2024
@dmitshur dmitshur assigned neild and unassigned dmitshur May 16, 2024
@dmitshur dmitshur added NeedsFix The path to resolution is known, but the work has not been done. FixPending Issues that have a fix which has not yet been reviewed or submitted. and removed Builders x/build issues (builders, bots, dashboards) NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels May 16, 2024
@dmitshur dmitshur modified the milestones: Unreleased, Go1.23 May 16, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Done in Go Release May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FixPending Issues that have a fix which has not yet been reviewed or submitted. NeedsFix The path to resolution is known, but the work has not been done.
Projects
Archived in project
Development

No branches or pull requests

3 participants