[SERVER-27411] session cache concurrency issues at shutdown Created: 13/Dec/16 Updated: 06/Dec/17 Resolved: 23/Aug/17 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Storage |
| Affects Version/s: | None |
| Fix Version/s: | 3.5.12 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Eric Milkie | Assignee: | Daniel Gottlieb (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||
| Operating System: | ALL | ||||||||||||||||
| Backport Requested: |
v3.4
|
||||||||||||||||
| Sprint: | Storage 2017-09-11 | ||||||||||||||||
| Participants: | |||||||||||||||||
| Linked BF Score: | 15 | ||||||||||||||||
| Description |
|
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. |
| Comments |
| Comment by Ramon Fernandez Marina [ 24/Aug/17 ] | ||||||||||
|
Author: {'username': u'dgottlieb', 'name': u'Daniel Gottlieb', 'email': u'daniel.gottlieb@mongodb.com'}Message: The storage engine may only be accessed by clients holding the Global lock in | ||||||||||
| Comment by Daniel Gottlieb (Inactive) [ 23/Aug/17 ] | ||||||||||
|