Operational Defect Database

BugZero found this defect 53 days ago.

MongoDB | 2624305

Deadlock in VectorClockMongoD during shutdown

Last update date:

3/27/2024

Affected products:

MongoDB Server

Affected releases:

5.0.0

6.0.0

7.0.0

8.0.0-rc0

Fixed releases:

No fixed releases provided.

Description:

Info

The problem is coming from a waitForDurableConfigTime call after shutdown initiated. After shutdown initiation the ThreadPoolTaskExecutor won't accept more async requests, it will run everything on the same thread. Since the VectorClockMongoD relies on the assumption that the futures created in the context of waitForDurableConfigTime will run asynchronously, it locks the same mutex that will be locked in the future as well. Since on shutdown everything run on a single thread, it causes a deadlock (double locking the same mutex on the same thread) This behavior never happened before, because earlier the mongod crashed at this point. The fix of the crash revealed the deadlock.

Top User Comments


Steps to Reproduce


Additional Resources / Links

Share:

BugZero® Risk Score

What's this?

Coming soon

Status

In Code Review

Learn More

Search:

...