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

Data race when use http client #71

Closed
domashevskyi opened this issue Oct 17, 2018 · 1 comment
Closed

Data race when use http client #71

domashevskyi opened this issue Oct 17, 2018 · 1 comment
Milestone

Comments

@domashevskyi
Copy link

Reproduced on:

  • SDK version: V1.0.0-rc.8.
  • GO version: go1.11.1 linux/amd64

When build with - race flag, data race warning occurs upon sending http request:

WARNING: DATA RACE
Read at 0x00c000a201b0 by goroutine 56:
vendor/github.com/aws/aws-xray-sdk-go/xray.(*HTTPSubsegments).GotFirstResponseByte()
vendor/github.com/aws/aws-xray-sdk-go/xray/httptrace.go:159 +0x47
privacyapi/vendor/github.com/aws/aws-xray-sdk-go/xray.NewClientTrace.func10()
vendor/github.com/aws/aws-xray-sdk-go/xray/httptrace.go:212 +0x41
net/http.http2traceFirstResponseByte()
/usr/local/go/src/net/http/h2_bundle.go:3035 +0x7d
net/http.(*http2clientConnReadLoop).processHeaders()
/usr/local/go/src/net/http/h2_bundle.go:8360 +0x52a
net/http.(*http2clientConnReadLoop).run()
/usr/local/go/src/net/http/h2_bundle.go:8292 +0x87d
net/http.(*http2ClientConn).readLoop()
/usr/local/go/src/net/http/h2_bundle.go:8189 +0x8c

Previous write at 0x00c000a201b0 by main goroutine:
vendor/github.com/aws/aws-xray-sdk-go/xray.(*HTTPSubsegments).WroteRequest()
vendor/github.com/aws/aws-xray-sdk-go/xray/httptrace.go:152 +0x156
vendor/github.com/aws/aws-xray-sdk-go/xray.NewClientTrace.func9()
vendor/github.com/aws/aws-xray-sdk-go/xray/httptrace.go:209 +0x55
net/http.http2traceWroteRequest()

@luluzhao
Copy link
Contributor

@domashevskiy , sorry for the late response. I merged @t-yuki PR and will make sure bring this fix to next release.

@luluzhao luluzhao added this to the wait-to-be-released milestone Nov 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants