Skip to content
Commit 051001c4 authored by Tej Singh's avatar Tej Singh
Browse files

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.

This is a cherry pick from internal.

Test: bit statsd_test:*
Test: atest CtsStatsdHostTestCases
Test: local test that forced the race condition now passes
Bug: 144373785
Change-Id: I04ae2f7ed025f5ce8bc4fdeb7f10717e20d76282
Merged-In: I04ae2f7ed025f5ce8bc4fdeb7f10717e20d76282
parent 9dd718c5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment