[SERVER-42406] Provide abstract backtrace support API Created: 24/Jul/19  Updated: 29/Oct/23  Resolved: 19/Nov/19

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

Type: New Feature Priority: Major - P3
Reporter: Andrew Morrow (Inactive) Assignee: Billy Donahue
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-41364 Allow generation of compressed stack ... Closed
Duplicate
is duplicated by SERVER-44109 Provide access to raw backtraces and ... Closed
Related
related to SERVER-43963 windows stack traces should conform t... Closed
related to SERVER-44109 Provide access to raw backtraces and ... Closed
is related to SERVER-44378 Add utilities for backtrace support API Closed
Backwards Compatibility: Fully Compatible
Sprint: Dev Tools 2019-08-12, Dev Tools 2019-09-09, Dev Tools 2019-09-23, Dev Tools 2019-10-07, Dev Tools 2019-10-21, Dev Tools 2019-11-04, Dev Tools 2019-11-18, Dev Tools 2019-12-02
Participants:

 Description   

We have two 'NIX versions of the crash backtracer, one based on libunwind and one based on the 'backtrace' function from execinfo, and then a separate Windows implementation.

However, we have other places in the code that explicitly call 'backtrace' or interact with or construct the object load info per dl_iterate_phdr. One notable example is the heap profiler in src/mongo/util/heap_profiler.cpp, and another is the DiagnosticInfo support soon arriving per SERVER-41364.

In both cases, what is required is an interface into the backtracing system that only collects the backtrace, but does not symbolize it, along with mechanism to cache the necessary information to do symbolization and an entry point to do it at some later time.

Rather than re-inventing this logic several times, we should enhance the API exposed by our abstract backtrace machinery and migrate these instances making direct use of other APIs to use our new abstract API.



 Comments   
Comment by Githook User [ 19/Nov/19 ]

Author:

{'name': 'Billy Donahue', 'username': 'BillyDonahue', 'email': 'billy.donahue@mongodb.com'}

Message: SERVER-42406 stacktrace API (revised)
Branch: master
https://github.com/mongodb/mongo/commit/4722a18440d6645a24f83def678f7cf7a6a290fe

Comment by Billy Donahue [ 29/Oct/19 ]

https://docs.google.com/document/d/1PDYP7-bwiEoXU87X58H2Bi9WO9uK_bs6qadWQhmUKnU/edit?usp=sharing

Comment by Githook User [ 07/Aug/19 ]

Author:

{'name': 'Billy Donahue', 'username': 'BillyDonahue', 'email': 'billy.donahue@mongodb.com'}

Message: SERVER-42406 move crtDebugCallback out of stacktrace_windows.cpp

Improve its diagnostics. Do not die on warnings.
Branch: master
https://github.com/mongodb/mongo/commit/e1437d933ce2b955cc2e0c9b31cf66d37cef83d1

Generated at Thu Feb 08 05:00:25 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.