Operational Defect Database

BugZero found this defect 2513 days ago.

MongoDB | 372076

[SERVER-28688] Deadlock between shutdown and stepdown

Last update date:

2/13/2018

Affected products:

MongoDB Server

Affected releases:

No affected releases provided.

Fixed releases:

3.4.5

3.5.6

Description:

Info

Stepdown calls ReplicationCoordinatorExternalStateImpl::startProducerIfStopped, which takes _threadMutex while holding the global exclusive lock. Shutdown calls ReplicationCoordinatorExternalStateImpl::shutdown which takes _threadMutex and then does a database read by calling _storageInterface->getAppliedThrough. We should probably be doing the database reads/writes in ReplicationCoordinatorExternalStateImpl::shutdown after releasing _threadMutex.

Top User Comments

xgen-internal-githook commented on Sat, 22 Apr 2017 00:51:29 +0000: Author: {u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'} Message: SERVER-28688 ReplicationCoordinatorExternalStateImpl::shutdown() performs database reads/writes outside lock (cherry picked from commit bc135d00323ccbe35d7ba9030b3c20f7d28b34ad) Branch: v3.4 https://github.com/mongodb/mongo/commit/861ebde6b8d83724f95fd8189da798ef5505a9f7 xgen-internal-githook commented on Sat, 15 Apr 2017 00:52:53 +0000: Author: {u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'} Message: SERVER-28688 ReplicationCoordinatorExternalStateImpl::shutdown() performs database reads/writes outside lock Branch: master https://github.com/mongodb/mongo/commit/bc135d00323ccbe35d7ba9030b3c20f7d28b34ad

Additional Resources / Links

Share:

BugZero Risk Score

Coming soon

Status

Closed

Have you been affected by this bug?

cost-cta-background

Do you know how much operational outages are costing you?

Understand the cost to your business and how BugZero can help you reduce those costs.

Discussion

Login to read and write comments.

Have you ever...

had your data corrupted from a

VMware

bug?

Search:

...