Summary: We were frequently seeing a race between SyncPoint::Process() and SyncPoint::~SyncPoint() (e.g., https://our.intern.facebook.com/intern/sandcastle/log/?instance_id=207289975&step_id=2412725431). The issue was marked_thread_id_ gets deleted when the main thread is exiting and simultaneously background threads may access it. We can prevent this race condition by checking whether sync points are disabled (assuming the test terminates with them disabled) before attempting to access that member. I do not understand why accesses to other members (mutex_ and enabled_) are ok but anyways the test no longer fails tsan. Test Plan: ran tests Reviewers: sdong, yhchiang, IslamAbdelRahman, yiwu, wanning Subscribers: andrewkr, dhruba, leveldb Differential Revision: https://reviews.facebook.net/D62133main
parent
64a0082c69
commit
236756f2cf
Loading…
Reference in new issue