-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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 in ProbeHTTP #922
Labels
Comments
I just ran into this. It's because the caser is reused. The docs say not to do that. I'll upload a fix. |
mem
added a commit
that referenced
this issue
Jun 13, 2022
The cases.Caser returned by calling cases.Title *cannot* be shared among goroutines. This might happen when Prometheus tries to scrape multiple targets at the same time. From the docs: A Caser may be stateful and should therefore not be shared between goroutines. Fixes: #922 Signed-off-by: Marcelo E. Magallon <[email protected]>
mem
added a commit
that referenced
this issue
Jun 13, 2022
The cases.Caser returned by calling cases.Title *cannot* be shared among goroutines. This might happen when Prometheus tries to scrape multiple targets at the same time. From the docs: A Caser may be stateful and should therefore not be shared between goroutines. Fixes: #922 Signed-off-by: Marcelo E. Magallon <[email protected]>
For the record, my own build of BBE doesn't use -race, but this manifests itself as a panic, because one caser overrides the indices of the other and it ends up e.g. with an out of bounds slice access. |
mem
added a commit
to grafana/blackbox_exporter
that referenced
this issue
Jun 14, 2022
The cases.Caser returned by calling cases.Title *cannot* be shared among goroutines. This might happen when Prometheus tries to scrape multiple targets at the same time. From the docs: A Caser may be stateful and should therefore not be shared between goroutines. Fixes: prometheus#922 Signed-off-by: Marcelo E. Magallon <[email protected]>
roidelapluie
pushed a commit
to roidelapluie/blackbox_exporter
that referenced
this issue
Jun 17, 2022
The cases.Caser returned by calling cases.Title *cannot* be shared among goroutines. This might happen when Prometheus tries to scrape multiple targets at the same time. From the docs: A Caser may be stateful and should therefore not be shared between goroutines. Fixes: prometheus#922 Signed-off-by: Marcelo E. Magallon <[email protected]>
roidelapluie
pushed a commit
that referenced
this issue
Jun 17, 2022
The cases.Caser returned by calling cases.Title *cannot* be shared among goroutines. This might happen when Prometheus tries to scrape multiple targets at the same time. From the docs: A Caser may be stateful and should therefore not be shared between goroutines. Fixes: #922 Signed-off-by: Marcelo E. Magallon <[email protected]>
roidelapluie
pushed a commit
that referenced
this issue
Jun 17, 2022
The cases.Caser returned by calling cases.Title *cannot* be shared among goroutines. This might happen when Prometheus tries to scrape multiple targets at the same time. From the docs: A Caser may be stateful and should therefore not be shared between goroutines. Fixes: #922 Signed-off-by: Marcelo E. Magallon <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, with blackbox_exporter 0.21.0 I get data races in
ProbeHTTP
, caused by the newcaser
used here https://github.com/prometheus/blackbox_exporter/blob/master/prober/http.go#L355.Here is an example to reproduce the issue:
The text was updated successfully, but these errors were encountered: