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.
- is related to
-
SERVER-16031 Race condition at shutdown for KVEngines
- Closed