[SERVER-49020] Data race in MongosTopologyCoordinator test Created: 22/Jun/20  Updated: 29/Oct/23  Resolved: 09/Jul/20

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: None
Fix Version/s: 4.7.0

Type: Bug Priority: Major - P3
Reporter: Janna Golden Assignee: Siyuan Zhou
Resolution: Fixed Votes: 0
Labels: thread-sanitizer
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Repl 2020-07-13
Participants:
Linked BF Score: 0

 Description   

This was found in the TSAN suite - there's a data race between reading and writing the deadline on the opCtx in MongosTopoCoordTest's IsMasterReturnsErrorOnEnteringQuiesceMode test case. The spawned thread that calls MongosTopologyCoordinator::awaitIsMasterResponse() ultimately sets the deadline on the opCtx. In the main thread, MongosTopologyCoordinator::enterQuiesceModeAndWait reads the deadline on the opCtx when checking if it has expired.



 Comments   
Comment by Githook User [ 09/Jul/20 ]

Author:

{'name': 'Siyuan Zhou', 'email': 'siyuan.zhou@mongodb.com', 'username': 'visualzhou'}

Message: SERVER-49020 Fix data race in MongosTopologyCoordinator test.
Branch: master
https://github.com/mongodb/mongo/commit/882b737c34fb9ca5707942a8a6ad05d29de0985a

Comment by Andrew Morrow (Inactive) [ 08/Jul/20 ]

Thanks siyuan.zhou!

Comment by Siyuan Zhou [ 08/Jul/20 ]

acm, sure! I'll work on this today or tomorrow.

Comment by Andrew Morrow (Inactive) [ 08/Jul/20 ]

siyuan.zhou - Any chance we could get a fix for this bumped up in priority a little? It represents one of the last four remaining unit test failures under TSAN. Passing the unittests under TSAN is a prerequisite to beginning to run the JS tests, which is where we hope to find the really interesting data races.

Comment by Janna Golden [ 24/Jun/20 ]

I filed this because the BF was on sharding so I diagnosed it, but this is on the replication backlog as they own this test. cc judah.schvimer tess.avitabile

Comment by Andrew Morrow (Inactive) [ 24/Jun/20 ]

janna.golden - Would it be possible to get this ticket scheduled into an upcoming sprint? Until the TSAN unit tests are green we are basically blocked from expanding the scope of TSAN coverage, which we are eager to do.

Generated at Thu Feb 08 05:18:43 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.