Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-55013

Improvement lifetime management in PooledLDAPConnection::runFuncWithTimeout

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.9.0, 4.4.5
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • ALL
    • v4.4
    • Security 2021-03-22

      There is a lifetime management issue in PooledLDAPConnection::runFuncWithTimeout, seeĀ https://github.com/10gen/mongo-enterprise-modules/blob/master/src/ldap/connections/ldap_connection_factory.cpp#L221-L261. In this function, we access this but we do nothing to guarantee that this is alive when it is used. In the stack below, we see a call to a lambda in WrappedConnection::query::lambda but I could not find any stack in the process with a matching stack containing WrappedConnection::query. This implies that the query() call timed out and the connection was likely reaped why it was still being used.

            Assignee:
            mark.benvenuto@mongodb.com Mark Benvenuto
            Reporter:
            mark.benvenuto@mongodb.com Mark Benvenuto
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: