This repository has been archived by the owner on May 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 288
DATA RACE : span.context overwritten in span.SetBaggageItem() without any guards #526
Comments
yurishkuro
pushed a commit
that referenced
this issue
Aug 16, 2020
Reported in #526. Signed-off-by: Yuri Shkuro <ys@uber.com>
yurishkuro
pushed a commit
that referenced
this issue
Aug 16, 2020
Per issue #526. Signed-off-by: Yuri Shkuro <ys@uber.com>
Thanks for reporting. I added a unit test (currently disabled) that illustrates the race. We need to ensure that access to To answer your question, I believe the intention was for Context object to not contain any lock objects, because it was designed to be passed by-value (a decision that I regret in retrospect, since it does not actually reduce memory allocations due to conversion to |
keer25
added a commit
to keer25/jaeger-client-go
that referenced
this issue
Aug 25, 2020
This commit addresses data race issues where span.context is accessed without locks in methods which can be called concurrently with method setBaggageItem which modifies context Per issue jaegertracing#526 Signed-off-by: Keerthana Selvakumar <keerukeerthana8@gmail.com>
keer25
added a commit
to keer25/jaeger-client-go
that referenced
this issue
Aug 25, 2020
This commit addresses data race issues where span.context is accessed without locks in methods which can be called concurrently with method setBaggageItem which modifies context Per issue jaegertracing#526 Signed-off-by: Keerthana Selvakumar <keerukeerthana8@gmail.com>
keer25
added a commit
to keer25/jaeger-client-go
that referenced
this issue
Aug 25, 2020
This commit addresses data race issues where span.context is accessed without locks in methods which can be called concurrently with method setBaggageItem which modifies context Resolves issue jaegertracing#526 Signe-off-by: Keerthana Selvakumar <keerukeerthana8@gmail.com>
keer25
added a commit
to keer25/jaeger-client-go
that referenced
this issue
Aug 25, 2020
This commit addresses data race issues where span.context is accessed without locks in methods which can be called concurrently with method setBaggageItem which modifies context Resolves issue jaegertracing#526 Signed-off-by: Keerthana Selvakumar <keerukeerthana8@gmail.com>
keer25
added a commit
to keer25/jaeger-client-go
that referenced
this issue
Aug 25, 2020
This commit addresses data race issues where span.context is accessed without locks in methods which can be called concurrently with method setBaggageItem which modifies context Per issue jaegertracing#526 Signed-off-by: Keerthana Selvakumar <keerukeerthana8@gmail.com>
keer25
added a commit
to keer25/jaeger-client-go
that referenced
this issue
Aug 26, 2020
This commit addresses data race issues where span.context is accessed without locks in methods which can be called concurrently with method setBaggageItem which modifies context Per issue jaegertracing#526 Signed-off-by: Keerthana Selvakumar <keerukeerthana8@gmail.com>
keer25
added a commit
to keer25/jaeger-client-go
that referenced
this issue
Aug 26, 2020
This commit addresses data race issues where span.context is accessed without locks in methods which can be called concurrently with method setBaggageItem which modifies context Per issue jaegertracing#526 Signed-off-by: Keerthana Selvakumar <keerukeerthana8@gmail.com>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Problem : DATA RACE when setting baggage item and tag concurrently
In Version : 2.25.0
span.context = span.context.WithBaggageItem(key, value)
WARNING: DATA RACE
Read at 0x00c0000824e0 by goroutine 45:
...../vendor/github.com/uber/jaeger-client-go.(*Span).isSamplingFinalized()
/home/paasuser/..../vendor/github.com/uber/jaeger-client-go/span.go:446 +0x3e
.../vendor/github.com/uber/jaeger-client-go.(*Span).setTagInternal()
/home/paasuser/..../vendor/github.com/uber/jaeger-client-go/span.go:107 +0x109
.../vendor/github.com/uber/jaeger-client-go.(*Span).SetTag()
/home/paasuser/src/.../vendor/github.com/uber/jaeger-client-go/span.go:99 +0x6c
Previous write at 0x00c0000824e0 by goroutine 46:
.../vendor/github.com/uber/jaeger-client-go.(*baggageSetter).setBaggage()
/home/paasuser/.../vendor/github.com/uber/jaeger-client-go/baggage_setter.go:54 +0x3ca
.../vendor/github.com/uber/jaeger-client-go.(*Span).SetBaggageItem()
/home/paasuser/.../vendor/github.com/uber/jaeger-client-go/tracer.go:470 +0xf3
Proposal
(OR)
Any open questions to address
The text was updated successfully, but these errors were encountered: