You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixed inconsistency and also potential data race in trace/events.go:
el.discarded is read/written 5 times in trace/events.go; 4 out of 5 times it is protected by el.mu.Lock(); 1 out of 5 times it is write without a Lock, which is in func reset() on L280.
A data race may happen when reset() and other func like Stop() which cotains operation about el.discarded are called in parallel.
In order to avoid potential data race here, I use el.mu.Lock(); defer el.mu.Unlock() to make sure that all usages of items is in critical section.
I don't know whether it is accurate, so I 'm looking forward to your reply.
The text was updated successfully, but these errors were encountered:
Fixed inconsistency and also potential data race in trace/events.go:
el.discarded is read/written 5 times in trace/events.go; 4 out of 5 times it is protected by el.mu.Lock(); 1 out of 5 times it is write without a Lock, which is in func reset() on L280.
A data race may happen when reset() and other func like Stop() which cotains operation about el.discarded are called in parallel.
In order to avoid potential data race here, I use el.mu.Lock(); defer el.mu.Unlock() to make sure that all usages of items is in critical section.
I don't know whether it is accurate, so I 'm looking forward to your reply.
The text was updated successfully, but these errors were encountered: