Skip to content

Deadlock in http.Client #994

Closed
Closed

Description

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:

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

Metadata

Assignees

No one assigned

    Labels

    agent-gobugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions