openzipkin / zipkin-go

Zipkin distributed tracing library for go.
Apache License 2.0
612 stars 114 forks source link

Running data race at : github.com/openzipkin/zipkin-go@v0.2.1/span_implementation.go:61 #201

Closed wugang8068 closed 3 years ago

wugang8068 commented 3 years ago

The source code is below, but I don't know the reason.

func (s *spanImpl) Annotate(t time.Time, value string) {
    a := model.Annotation{
        Timestamp: t,
        Value:     value,
    }
    s.mtx.Lock()
    s.Annotations = append(s.Annotations, a)
    s.mtx.Unlock()
}
basvanbeek commented 3 years ago

Is it possible you are trying to Annotate a span while Finish on that span is called concurrently?

basvanbeek commented 3 years ago

Closing due to inactivity and unable to replicate in proper usage patterns.