summaryrefslogtreecommitdiff
path: root/buildscripts
diff options
context:
space:
mode:
authorAlexander Neben <alexander.neben@mongodb.com>2023-01-25 00:45:30 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2023-01-25 02:22:28 +0000
commitd798eacdd11503eca257a1ab0d6d4e0d5b38f467 (patch)
tree2d28677dae7fd0e1dc4a250d66c58a7d36da7eaa /buildscripts
parent98b876caee58e12c6d1099e6fa9e3863ede08e69 (diff)
downloadmongo-d798eacdd11503eca257a1ab0d6d4e0d5b38f467.tar.gz
SERVER-72816 Removed gdb calls to getGlobalLockManager
Diffstat (limited to 'buildscripts')
-rw-r--r--buildscripts/gdb/mongo.py4
-rw-r--r--buildscripts/gdb/mongo_lock.py5
2 files changed, 7 insertions, 2 deletions
diff --git a/buildscripts/gdb/mongo.py b/buildscripts/gdb/mongo.py
index c68e022200c..967be6d3157 100644
--- a/buildscripts/gdb/mongo.py
+++ b/buildscripts/gdb/mongo.py
@@ -571,7 +571,9 @@ 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
- gdb.execute("call mongo::getGlobalLockManager()->dump()", from_tty=False,
+ # 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)
except gdb.error as gdberr:
print("Ignoring error '%s' in dump_mongod_locks" % str(gdberr))
diff --git a/buildscripts/gdb/mongo_lock.py b/buildscripts/gdb/mongo_lock.py
index 6fb2d9cb210..91fbd93317d 100644
--- a/buildscripts/gdb/mongo_lock.py
+++ b/buildscripts/gdb/mongo_lock.py
@@ -320,8 +320,11 @@ 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::getGlobalLockManager()->_getBucket(resId)->findOrInsert(resId)")
+ "mongo::LockManager::get((mongo::ServiceContext*) mongo::getGlobalServiceContext())->_getBucket(resId)->findOrInsert(resId)"
+ )
granted_list = lock_head.dereference()["grantedList"]
lock_request_ptr = granted_list["_front"]