[SERVER-25967] Improve stack traces provided by mongosymb.py Created: 06/Sep/16  Updated: 04/Jan/17  Resolved: 08/Sep/16

Status: Closed
Project: Core Server
Component/s: Diagnostics
Affects Version/s: None
Fix Version/s: 3.3.14

Type: Improvement Priority: Major - P3
Reporter: Mathias Stearn Assignee: Mathias Stearn
Resolution: Done Votes: 0
Labels: bkp
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Backwards Compatibility: Minor Change
Backport Requested:
v3.2
Sprint: Repl 2016-09-19
Participants:

 Description   

This ticket covers two changes to mongosymb.py:

  • Include the column number and a trailing colon in the default output format. This matches compiler error formats so makes it easier for off-the-shelf tools such as vim to consume the output.
  • Subtract 1 from each address in the stack trace. This puts the addresses inside the 'call' instruction rather than on the return address (which is the instruction right after the call). This leads to more accurate stack traces in the common case where function calls are involved. The downside is that instructions which raise a signal (such as segfaults or divide by zero) were correct but will now also be adjusted to point to the instruction before. This is considered a worthwhile trade-off because the stack leading up to the signal and the full stack for other stack traces such as invariant failures will now be correct.


 Comments   
Comment by Githook User [ 08/Sep/16 ]

Author:

{u'username': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'}

Message: SERVER-25967 fix mongosymb.py output

Corrects for the return address not being off by one, and adds the
column and final colon to the output. This makes it match compiler error
output format which makes it easier to integrate into editors.
Branch: master
https://github.com/mongodb/mongo/commit/9b029f19fe3644d59533ccd7cb995103fbbaa41d

Generated at Thu Feb 08 04:10:45 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.