[SERVER-13420] the notifier and syncSourceFeedback threads can reach a deadlock Created: 31/Mar/14  Updated: 11/Jul/16  Resolved: 01/Apr/14

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: 2.6.0-rc2
Fix Version/s: 2.6.0-rc3

Type: Bug Priority: Major - P3
Reporter: Matt Dannenberg Assignee: Matt Dannenberg
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Participants:

 Description   

In connectOplogNotifier, the notifier thread grabs bgsync's _mutex and then calls syncSourceFeedback.connect() which grabs SyncSourceFeedback's _mtx and _connmtx. Meanwhile SyncSourceFeedback's run() loop grabs its _mtx and _connmtx and then calls bgsync's getSyncTarget() which grabs bgsync's _mutex. If each of these threads grabs their first lock, we end up deadlocked.



 Comments   
Comment by Githook User [ 01/Apr/14 ]

Author:

{u'username': u'dannenberg', u'name': u'matt dannenberg', u'email': u'matt.dannenberg@10gen.com'}

Message: SERVER-13420 remove syncSourceFeedback connection management from the notifier thread

(cherry picked from commit 26f3c3140d6c49732d3462235d9dd496e17c504f)
Branch: v2.6
https://github.com/mongodb/mongo/commit/9d9fcde8659cb103d68632064550fb490e370bef

Comment by Githook User [ 01/Apr/14 ]

Author:

{u'username': u'dannenberg', u'name': u'matt dannenberg', u'email': u'matt.dannenberg@10gen.com'}

Message: SERVER-13420 remove syncSourceFeedback connection management from the notifier thread
Branch: master
https://github.com/mongodb/mongo/commit/26f3c3140d6c49732d3462235d9dd496e17c504f

Generated at Thu Feb 08 03:31:40 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.