summaryrefslogtreecommitdiff
path: root/buildscripts/gdb
diff options
context:
space:
mode:
Diffstat (limited to 'buildscripts/gdb')
-rw-r--r--buildscripts/gdb/mongo.py2
-rw-r--r--buildscripts/gdb/mongo_lock.py2
2 files changed, 4 insertions, 0 deletions
diff --git a/buildscripts/gdb/mongo.py b/buildscripts/gdb/mongo.py
index 8f20f1caa85..c7ea555513e 100644
--- a/buildscripts/gdb/mongo.py
+++ b/buildscripts/gdb/mongo.py
@@ -584,6 +584,8 @@ class MongoDBDumpLocks(gdb.Command):
try:
# Call into mongod, and dump the state of lock manager
# Note that output will go to mongod's standard output, not the debugger output window
+ # Do not call mongo::getGlobalLockManager() due to the compiler optimizing this function in a very weird way
+ # See SERVER-72816 for more context
gdb.execute(
"call mongo::LockManager::get((mongo::ServiceContext*) mongo::getGlobalServiceContext())->dump()",
from_tty=False, to_string=False)
diff --git a/buildscripts/gdb/mongo_lock.py b/buildscripts/gdb/mongo_lock.py
index a7f7e271926..d05acaf6779 100644
--- a/buildscripts/gdb/mongo_lock.py
+++ b/buildscripts/gdb/mongo_lock.py
@@ -325,6 +325,8 @@ def find_lock_manager_holders(graph, thread_dict, show):
locker_ptr_type = gdb.lookup_type("mongo::LockerImpl").pointer()
+ # Do not call mongo::getGlobalLockManager() due to the compiler optimizing this function in a very weird way
+ # See SERVER-72816 for more context
lock_head = gdb.parse_and_eval(
"mongo::LockManager::get((mongo::ServiceContext*) mongo::getGlobalServiceContext())->_getBucket(resId)->findOrInsert(resId)"
)