-
Notifications
You must be signed in to change notification settings - Fork 197
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
Deadlock in http.Client #994
Comments
@AyWa thank you for the detailed issue and reproducer - I can reproduce the issue with your program. I haven't gotten to the bottom of it yet, but it appears to be related to the use of |
Sorry for the delay in getting back to you. I've found a couple of different concurrency bugs, both of which are addressed in #997. |
@AyWa we've just released v1.13.1 that should fix this issue. Please upgrade and let us know how it goes. |
@axw Thank you a lot for the quick fix. I will try it soon -> I can not reproduce it 👍 |
versions
go version go1.16.3 darwin/amd64
go.elastic.co/apm v1.12.0
go.elastic.co/apm/module/apmhttp v1.12.0
Bug
When the default http client is wrap with
apmhttp.WrapClient(http.DefaultClient, apmhttp.WithClientTrace())
there is some case where an http request, will never answer. Even if the request has acontext
deadline.To Reproduce
It is little hard to reproduce so I made code to reproduce it: https://github.com/AyWa/goapmdeadlock
I guess the scenario is like that:
Expected behavior
The
http.Client
should not be in deadlock when wrap byapmhttp
( I think the deadlock happen for a given trace id so new request might work fine)The text was updated successfully, but these errors were encountered: