[SERVER-17570] MongoDB 3.0 NT Service shutdown race condition with db.serverShutdown() Created: 12/Mar/15 Updated: 19/Sep/15 Resolved: 18/Mar/15 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Admin |
| Affects Version/s: | 3.0.0 |
| Fix Version/s: | 3.0.2, 3.1.1 |
| Type: | Bug | Priority: | Critical - P2 |
| Reporter: | David Golub | Assignee: | Mark Benvenuto |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||
| Issue Links: |
|
||||
| Backwards Compatibility: | Minor Change | ||||
| Operating System: | ALL | ||||
| Backport Completed: | |||||
| Sprint: | Platform 1 04/03/15 | ||||
| Participants: | |||||
| Description |
|
There is a crash in mongod while it is being terminated during some of the Automation Agent tests on Windows. The crash only happens with MongoDB 3.0. Running the same tests with MongoDB 2.6 or 2.4 does not produce the crash. Crash dump file is attached. |
| Comments |
| Comment by Githook User [ 19/Mar/15 ] |
|
Author: {u'username': u'markbenvenuto', u'name': u'Mark Benvenuto', u'email': u'mark.benvenuto@mongodb.com'}Message: (cherry picked from commit 0f6f2e9a199bff05c69ca5aace94a5ac8fe2cff3) |
| Comment by Mark Benvenuto [ 19/Mar/15 ] |
|
Here are the bug details: There are two different execution models for mongod on Windows
2. NT Service
(Note: thread numbers are example thread numbers from a debugger) The bug: There is a race condition between exitCleanly, and StartServiceCtrlDispatcher This does not happen if the process receives a SERVICE_CONTROL_STOP (ie, sc.exe The fix: 1. Create a method called signalShutdown to set inShutdown true so the listener |
| Comment by Githook User [ 18/Mar/15 ] |
|
Author: {u'username': u'markbenvenuto', u'name': u'Mark Benvenuto', u'email': u'mark.benvenuto@mongodb.com'}Message: |