[SERVER-6554] Windows unhandled exception filter should print stack trace Created: 22/Jul/12 Updated: 11/Jul/16 Resolved: 31/Jul/12 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Logging |
| Affects Version/s: | 2.2.0-rc0 |
| Fix Version/s: | 2.2.0-rc1 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Tad Marshall | Assignee: | Tad Marshall |
| Resolution: | Done | Votes: | 0 |
| Labels: | Windows | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Windows |
||
| Backwards Compatibility: | Fully Compatible |
| Operating System: | Windows |
| Participants: |
| Description |
|
The unhandled exception filter in the Windows version of mongod is not calling printStackTrace(); it really should, so the log file has the information we need to debug access violations. |
| Comments |
| Comment by auto [ 31/Jul/12 ] | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Author: {u'date': u'2012-07-30T15:33:08-07:00', u'email': u'tad@10gen.com', u'name': u'Tad Marshall'}Message: Modify the Windows stack trace printing code to accept a "context", | ||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Eric Milkie [ 22/Jul/12 ] | ||||||||||||||||||||||||||||||||||||||||||||||||
|
That's good news. Using the context from the exception will give us nice stack traces. | ||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Tad Marshall [ 22/Jul/12 ] | ||||||||||||||||||||||||||||||||||||||||||||||||
|
The exception handling code sits at the top of the stack and appears in the stack trace, but this can be short-circuited by using the CONTEXT that is pointed to by the struct _EXCEPTION_POINTERS * parameter. For this test, I added code to crash if the database name was "crash". Using the "current" context:
Using the context from the exception (and using log() instead of cout):
| ||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Eric Milkie [ 22/Jul/12 ] | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Is the stack still intact when the unhandled exception filter gains control, or has it already been unwound? |