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

Concurrency issue in http.go #189

Closed
miekg opened this issue Jan 5, 2016 · 4 comments
Closed

Concurrency issue in http.go #189

miekg opened this issue Jan 5, 2016 · 4 comments
Assignees
Labels

Comments

@miekg
Copy link

miekg commented Jan 5, 2016

The call in https://github.com/prometheus/client_golang/blob/master/prometheus/http.go#L146

go computeApproximateRequestSize(r, out, urlLen)

creates concurrency issues because it iterates on request's Header map, if (for some reason) you happen to call this function more than once.

@beorn7 beorn7 self-assigned this Jan 7, 2016
@beorn7 beorn7 added the bug label Jan 7, 2016
@beorn7
Copy link
Member

beorn7 commented Jan 7, 2016

The header map is only read in the function. Is there any code path where the request header map is modified?

@juliusv
Copy link
Member

juliusv commented Jan 21, 2016

@miekg ping

@miekg
Copy link
Author

miekg commented Jan 21, 2016

[ Quoting [email protected] in "Re: [client_golang] Concurrency iss..." ]

@miekg ping

This might be us doing whacky things, while this is being called. We basically
hacked around this, but not using these wrappers (that eventually call this
function) anymore.

Can't guarantee I can find enough time to properly debug this.

Close it?

/Miek

Miek Gieben

@beorn7
Copy link
Member

beorn7 commented Jan 21, 2016

I'll close it then. Please re-open if you find evidence.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants