[SERVER-41364] Allow generation of compressed stack of addresses Created: 29/May/19  Updated: 29/Oct/23  Resolved: 26/Jul/19

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

Type: Improvement Priority: Major - P3
Reporter: Benjamin Caimano (Inactive) Assignee: Shaileja Jain (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-42406 Provide abstract backtrace support API Closed
is depended on by SERVER-42447 Attach backtrace to waitingForLatch Closed
Related
is related to SERVER-41360 Create diagnostic info capture type Closed
Backwards Compatibility: Fully Compatible
Sprint: Service Arch 2019-07-01, Service Arch 2019-07-15, Service Arch 2019-08-12
Participants:

 Description   

Since we want to quickly gain access to a partial callstack, we'll need a function similar to printStackTrace that captures a capped list of stack information. This will likely be a vector of instruction pointers, as these pointers can be translated to symbols and offsets.



 Comments   
Comment by Githook User [ 31/Oct/19 ]

Author:

{'username': 'bcaimano', 'email': 'ben.caimano@mongodb.com', 'name': 'Ben Caimano'}

Message: SERVER-41357 SERVER-41360 SERVER-43324 Add Mutex, BasicLockableAdaptor, and DiagnosticInfo

This commit backports Mutex, BasicLockableAdaptor, and DiagnosticInfo to
v4.2. These pieces came in completely in various interleaved commits.
The constituent commits partially included in this backport are listed
below. The majority of these commits are part of the "Improved
Diagnostics for Latches" epic.

Mutex:

BasicLockableAdaptor:

DiagnosticInfo:

Note that while this commit adds these pieces and integrates them into
the mongo-server codebase, it does not convert existing stdx::mutex
construction. It also does not include the updates to Interruptible that
were done as part of "Improved Diagnostics for Latches".
Branch: v4.2
https://github.com/mongodb/mongo/commit/3a05e4ce75cd03b09b52ec5943e1801c6d91279b

Comment by Githook User [ 26/Jul/19 ]

Author:

{'name': 'Shaileja Jain', 'username': 'shailejajain', 'email': 'shaileja.jain@gmail.com'}

Message: SERVER-41364 added stack trace to DiagnosticInfo
Branch: master
https://github.com/mongodb/mongo/commit/eaa3578e9f2602e82ac23599bacf6bba6800a26e

Comment by Benjamin Caimano (Inactive) [ 13/Jun/19 ]

I've confirmed that dl_iterate_phdr can at least allow us to find a map of offsets that includes the static objects of the program. We can reduce addresses to object and offset pairs from that map. It might be valuable to compare the results to what we can get out of backtrace_symbols_fd. I am a little sad to note that dl_iterate_phdr doesn't lay out the sections, just the segments. We'll probably have to wait for the symbolization script to get objects or symbolized names out of this style of trace.

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