Closed
Description
openedon Jul 29, 2021
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 a context
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:
- make many sub request that timeout concurrently. In my example I do 50 sub request concurrently https://github.com/AyWa/goapmdeadlock/blob/main/main.go#L68 * 100 times.
Expected behavior
The http.Client
should not be in deadlock when wrap by apmhttp
( I think the deadlock happen for a given trace id so new request might work fine)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment