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

session cache concurrency issues at shutdown

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.5.12
    • Affects Version/s: None
    • Component/s: Storage
    • Labels:
      None
    • Fully Compatible
    • ALL
    • v3.4
    • Storage 2017-09-11
    • 15

      At shutdown time, after acquiring a Global X lock, shutdownTask() calls shutdownGlobalStorageEngineCleanly(). On WiredTiger, this calls __conn_close(), which proceeds to close all open sessions.

      Problematically, the destructor for ScopedTransaction calls abandonSnapshot(), which calls _txnClose(). _txnClose accesses a session, managed by the WiredTigerSessionCache. Because no DB locks are held by ScopedTransaction, accessing sessions in ScopedTransaction by threads other than the one in shutdownTask() can race with the closing of these sessions by the WT shutdown code. This can possibly result in a null pointer exception at shutdown time.

            Assignee:
            daniel.gottlieb@mongodb.com Daniel Gottlieb (Inactive)
            Reporter:
            milkie@mongodb.com Eric Milkie
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: