[SERVER-23071] Windows crash dump during fatal assertion does not contain exception record Created: 10/Mar/16 Updated: 05/Jul/16 Resolved: 17/Jun/16 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Diagnostics |
| Affects Version/s: | 3.3.3 |
| Fix Version/s: | 3.3.9 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Kaloian Manassiev | Assignee: | Robert Guo (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 | |||||||||||
| Steps To Reproduce: | Prepare a debug Windows build of mongod.exe and start it with test commands enabled:
|
|||||||||||
| Sprint: | TIG 16 (06/24/16) | |||||||||||
| Participants: | ||||||||||||
| Description |
|
The Windows crash dump, which gets generated during a fatal server assertion does not contain exception record, which makes it useless in diagnosing failures. The stack trace, which gets printed is correct, but it looks like the place at which the stack dump is generated is after the stack containing the exception has unwound. If the crash happened due to access violation, the exception record is correct. |
| Comments |
| Comment by Githook User [ 17/Jun/16 ] |
|
Author: {u'username': u'guoyr', u'name': u'Robert Guo', u'email': u'robertguo@me.com'}Message: |
| Comment by Robert Guo (Inactive) [ 15/Jun/16 ] |
|
It seems like the problem is caused by the MiniDumpWriteDump method requiring a manual population of its PMINIDUMP_EXCEPTION_INFORMATION parameter. This blog post suggests that this is a known issue and is documented on MSDN, but I didn't find the original article after some brief Googling. http://blog.aaronballman.com/2011/05/generating-a-minidump/ On our side, the segfault correctly produces the minidump because it goes through our Windows specific exception handler, specified in SetUnhandledExceptionFilter, which does correctly populate the exception information. fasserts and invariant failures are handled by our endProcessWithSignal, which does not pass in the exception. The solution would be to route all exceptions to use our Windows exception handler, call the minidump from another thread, or to generate the exception information ourselves. |