Operational Defect Database

BugZero found this defect 27 days ago.

MongoDB | 2650054

Add synchronization to AsioSessionManager::_rejectedSessions

Last update date:

4/22/2024

Affected products:

MongoDB Server

Affected releases:

No affected releases provided.

Fixed releases:

8.0.0-rc3

Description:

Info

AsioSessionManager::_rejectedSessions is currently used 1) Inside SessionManagerCommon::startSession. A sync token is acquired (which holds SessionManagerCommon::Sessions lock for its lifetime) to access sync.size(). 2) Inside AsioSessionManager::appendStats. SessionManagerCommon::appendStats previously handled concurrent access to some of the members by acquiring a sync token at the beginning of the function. This means that previously we inadvertently synchronized access using a SessionManagerCommon::Sessions lock even though _rejectedSessions is outside of that class. During the separation of SessionManager into subclasses AsioSessionManager and GRPCSessionManager, it seems the appendStats section no longer acquires the sync token for the duration of the function, so we lost the synchronization. We can probably just make this into an atomic or make rejectedSessions a member of SessionManagerCommon::Sessions.

Top User Comments


Steps to Reproduce


Additional Resources / Links

Share:

BugZero® Risk Score

What's this?

Coming soon

Status

In Progress

Learn More

Search:

...