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
net/http/httputil: data race in DumpRequestOut #37669
Comments
Hello @schreik, thank you for filing this issue and welcome to the Go project! So we got the same bug report in #32571, and @agnivade fixed it for Go1.14 with CL https://go-review.googlesource.com/c/go/+/182037 aka commit e7a4ab4. This issue had existed for a while. Could you please try upgrading to Go1.14? Thank you. |
@odeke-em Thanks for looking into it! Our build system is quite complicated and we have periodic schedule go upgrade rollout. It will take a bit of time for me to learn how to upgrade go for my test only. I will try to build an isolated test to repro the issue. Looking at the commit you mentioned though, it does not look like it will solve the issue, since modification of Thanks |
We see (I believe) the same issue with Go 1.14.1
|
Potential fix
|
@nerd2, if you have a fix, please contribute it! 🙂 |
… clobbered when early quitting Fixes golang#37669
… clobbered when early quitting Fixes golang#37669
… clobbered when early quitting Fixes golang#37669
Change https://golang.org/cl/227717 mentions this issue: |
@schreik, the race-detector output that you provided looks like it is on the server side, but |
@nerd2, I can't see the source code for |
Change https://golang.org/cl/227773 mentions this issue: |
This is the same issue as #38352. |
Well that's fun! Unfortunately the race is inside DumpRequestOut itself, racing between the local transport and the cancellation of the request context.
|
Change https://golang.org/cl/232799 mentions this issue: |
Timed out in state WaitingForInfo. Closing. (I am just a bot, though. Please speak up if this is a mistake or you have the requested information.) |
Hasn’t yet been fixed. |
Gobot, this issue is still valid. |
Reverted the fix CL due to failing tests, so reopening. |
Change https://golang.org/cl/251858 mentions this issue: |
What version of Go are you using (
go version
)?1.12.17
Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?linux/amd64
What did you do?
I am using AWS Go SDK code has a call to
Unit test are running with GORACE=1 and fail inside the DumpRequestOut.
From the look at the code, DumpRequestOut creates a Go routine at line 115, which reads from req.Body, and then immediately changes req.Body to "save" at line 128 without waiting for routine to finish
What did you expect to see?
No data race.
What did you see instead?
The text was updated successfully, but these errors were encountered: