[SERVER-36242] Use libunwind for backtraces Created: 23/Jul/18  Updated: 29/Oct/23  Resolved: 17/Jul/19

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

Type: Improvement Priority: Major - P3
Reporter: Gregory McKeon (Inactive) Assignee: Andrew Morrow (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-33445 Add signal handler to generate stack ... Closed
Backwards Compatibility: Fully Compatible
Sprint: Dev Tools 2019-07-01, Dev Tools 2019-07-15
Participants:

 Comments   
Comment by Githook User [ 17/Jul/19 ]

Author:

{'name': 'A. Jesse Jiryu Davis', 'email': 'jesse@mongodb.com', 'username': 'ajdavis'}

Message: SERVER-36242 Optionally use libunwind for backtraces
Branch: master
https://github.com/mongodb/mongo/commit/cbead440945c78b577c29dab8c11e81a58ee7731

Comment by A. Jesse Jiryu Davis [ 17/Jul/19 ]

Thanks! IIRC we could replace asm with __asm__ to make lint happy, I may have omitted that in my branch.

Comment by A. Jesse Jiryu Davis [ 02/Jul/19 ]

Temporary branch with an implementation, which depends on SERVER-33259: https://github.com/ajdavis/mongo/commits/SERVER-33259/jesse

Comment by A. Jesse Jiryu Davis [ 29/Jun/19 ]

This work may introduce a file stacktrace_unsupported.cpp the stubs out getFrames() for platforms where we can't get backtraces. If it turns out we can support all platforms, delete that file. (We're especially curious if we can support backtraces on Android now.)

Comment by Max Hirschhorn [ 24/Jul/18 ]

Good to know. If we do end up changing the format, then we'll need to update the regular expressions the Build Baron tool uses so that it can still extract the C++ stacktraces.

Comment by Andrew Morrow (Inactive) [ 24/Jul/18 ]

max.hirschhorn - Unknown, but perhaps not. I think what we get from backtrace is just the addresses, and then we do our own formatting. As long as libunwind allows us to do the same, we can format as we see fit. We will try our best to not make any changes.

Comment by Max Hirschhorn [ 23/Jul/18 ]

acm, greg.mckeon, is this going to change the format of the C++ stacktraces that mongod logs in any way?

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