Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-42406

Provide abstract backtrace support API

    • Type: Icon: New Feature New Feature
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.3.2
    • Affects Version/s: None
    • Component/s: Diagnostics
    • None
    • Fully Compatible
    • 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

      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.

            Assignee:
            billy.donahue@mongodb.com Billy Donahue
            Reporter:
            andrew.morrow@mongodb.com Andrew Morrow (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: