Loading
Fix Race Condition
Currently, it is possible for two threads in statsd to concurrently access/modify memory in ConditionTrackers since they do not have locks. This happens when one thread is processing LogEvents (lock on StatsLogProcessor mutex), while the other thread receives uidmap updates and locks on the mutex in the MetricProducer. This Cl changes uidmap updates to also go through the mutex in StatsLogProcessor. Test: bit statsd_test:* Test: atest CtsStatsdHostTestCases Test: local test (ag/9725088) that forced the race condition now passes Bug: 144373785 Change-Id: I04ae2f7ed025f5ce8bc4fdeb7f10717e20d76282