[SERVER-68610] Add GDB method for finding a WT_CONNECTION in mongod Created: 05/Aug/22  Updated: 26/Oct/23

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

Type: Improvement Priority: Major - P3
Reporter: Daniel Gottlieb (Inactive) Assignee: Backlog - Storage Execution Team
Resolution: Unresolved Votes: 0
Labels: former-storex-namer, gdb
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-68455 Clean up and publish GDB helpers for ... Closed
Assigned Teams:
Storage Execution
Participants:

 Description   

Getting a handle in GDB on the main WT instance inside of a mongod coredump/process is a bit of a pain. It requires identifying and navigating to a thread + frame with an appropriate local, non-optimized out variable. We should be able to add a better experience to search for this data, in a similar vein to getting the ServiceContext.

However I think we should offer two APIs:

  • One just prints out the address in a gdb pasteable bit. E.g:

    (WT_CONNECTION_IMPL*)0xdeadbeef
    

  • Another can be used by other gdb scripts that want to walk datastructures starting from the connection. This would return a gdb.Value type (I think that's the right one?)

I suspect this might require the gdb helper to switch threads/frames. It'd be nice to put gdb back to the thread/frame it was at.


Generated at Thu Feb 08 06:11:16 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.