Operational Defect Database

BugZero found this defect 25 days ago.

MongoDB | 2652720

BlockingResultsMerger doesn't yield session when disposing cursors

Last update date:

4/25/2024

Affected products:

MongoDB Server

Affected releases:

No affected releases provided.

Fixed releases:

No fixed releases provided.

Description:

Info

Suppose the following scenario: Operation A runs an aggregation on shard S1 with an AsyncResultsMerger of cursors C1 on S1, C2 on S2. Operation A then sends a getMore to S1 (itself) for C1 Operation A subsequently fails and attempts to dispose the cursors by sending a killCursors command to S1, and S2 for their cursors. The getMore sent previously (C1 on S1) gets executed as Operation B Operation A now waits so that all outstanding requests fail their cursors. This will deadlock the server in a multi-document transaction since waiting for the kills to take place will not yield the session. As a result Operation A will have the session checked out, which is required by Operation B, which in turn is required by Operation A to finish and yield the session.

Top User Comments


Steps to Reproduce


Additional Resources / Links

Share:

BugZero® Risk Score

What's this?

Coming soon

Status

Open

Learn More

Search:

...