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

getmore on secondary in recovery mode can crash mongos

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 3.1.1
    • Fix Version/s: 3.0.4, 3.1.3
    • Component/s: Sharding
    • Labels:
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Completed:

      Description

      Issue Status as of Jun 19, 2015

      ISSUE SUMMARY
      mongos instances maintain connection pools to all shards, and do not manage the lifetime of these connections correctly. This may cause mongos instances to encounter an unrecoverable error and terminate when connecting to a replica set member in the RECOVERING state.

      USER IMPACT
      mongos instances may terminate in some situations while a replica set member is in the RECOVERING state.

      AFFECTED VERSIONS
      MongoDB release of 3.0 before 3.0.4.

      FIX VERSION
      The fix is included in the 3.0.4 production release.

      Original description

      Issue:

      Whenever DBClientReplicaSet objects create connections to the nodes, it attaches the pointer to itself on the new connection. This used to be fine since the lifetime of the DBClientReplicaSet connections are guaranteed to be longer than the connection objects it creates. However, this changed with SERVER-9788. The internal connections to the secondaries are now drawn from the pool and put back to the pool. So the life of the internal connection is now independent of the lifetime of the DBClientReplicaSet connection.

      Attaching test script to demonstrate crash.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: