diff options
author | Spencer T Brody <spencer@10gen.com> | 2020-04-08 14:50:18 -0700 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-04-08 22:03:53 +0000 |
commit | b0cbfa49aa813dfa2c130d1ae02ea081b470a1c2 (patch) | |
tree | 53d8c6d06c2e94e7984c938126a5b6e13686f70a /buildscripts | |
parent | 7d99356126fb3e921370c24c0a61499513bc78b6 (diff) | |
download | mongo-b0cbfa49aa813dfa2c130d1ae02ea081b470a1c2.tar.gz |
Revert "SERVER-45133 Dump mutex info in hang analyzer"
This reverts commit 3fc737f00d47fd2c59683579119c2083541ea5a2.
Diffstat (limited to 'buildscripts')
-rw-r--r-- | buildscripts/gdb/mongo.py | 47 | ||||
-rwxr-xr-x | buildscripts/hang_analyzer.py | 2 |
2 files changed, 0 insertions, 49 deletions
diff --git a/buildscripts/gdb/mongo.py b/buildscripts/gdb/mongo.py index baf0c9c1bbd..b1190231d53 100644 --- a/buildscripts/gdb/mongo.py +++ b/buildscripts/gdb/mongo.py @@ -1,7 +1,5 @@ """GDB commands for MongoDB.""" -import datetime -import json import os import re import sys @@ -17,7 +15,6 @@ try: path = os.path.dirname(os.path.dirname(os.path.dirname(printers))) sys.path.insert(0, path) from libstdcxx.v6 import register_libstdcxx_printers - from libstdcxx.v6 import printers as stdlib_printers register_libstdcxx_printers(gdb.current_objfile()) print("Loaded libstdc++ pretty printers from '%s'" % printers) except Exception as e: @@ -352,50 +349,6 @@ class DumpMongoDSessionCatalog(gdb.Command): DumpMongoDSessionCatalog() -class DumpMongoDBMutexes(gdb.Command): - """Print out the state of mutexes in a mongodb (mongod or mongos) process.""" - - def __init__(self): - """Initialize DumpMongoDBMutexs.""" - RegisterMongoCommand.register(self, "mongodb-dump-mutexes", gdb.COMMAND_DATA) - - def invoke(self, args, _from_tty): # pylint: disable=unused-argument,no-self-use,too-many-locals,too-many-branches,too-many-statements - """Invoke DumpMongoDBMutexes.""" - - print("Dumping mutex info for all Clients") - - service_context = get_global_service_context() - client_set = absl_get_nodes(service_context["_clients"]) # pylint: disable=undefined-variable - for client_handle in client_set: - client = client_handle.dereference().dereference() - diagnostic_info_handle = get_decoration(client, "DiagnosticInfo")[1] - diagnostic_info_list = diagnostic_info_handle["list"] - - # Use the STL pretty-printer to iterate over the list - printer = stdlib_printers.StdForwardListPrinter( - str(diagnostic_info_list.type), diagnostic_info_list) - - # Prepare structured output doc - client_name = str(client["_desc"]) - # Chop off the "\"" from the beginning and end of the string - client_name = client_name[1:-1] - output_doc = {"client": client_name, "waiting": False} - - # This list will only ever have 0 or 1 element in it - for _, diag_info in printer.children(): - output_doc["waiting"] = True - output_doc["mutex"] = str(diag_info["_captureName"])[1:-1] - - millis = int(diag_info["_timestamp"]["millis"]) - dt = datetime.datetime.fromtimestamp(millis / 1000, tz=datetime.timezone.utc) - output_doc["since"] = dt.isoformat() - print(json.dumps(output_doc)) - - -# Register command -DumpMongoDBMutexes() - - class MongoDBDumpLocks(gdb.Command): """Dump locks in mongod process.""" diff --git a/buildscripts/hang_analyzer.py b/buildscripts/hang_analyzer.py index c7034dce267..8e812e5f23f 100755 --- a/buildscripts/hang_analyzer.py +++ b/buildscripts/hang_analyzer.py @@ -331,7 +331,6 @@ class GDBDumper(object): (process_name, pid) mongodb_javascript_stack = "mongodb-javascript-stack" mongod_dump_sessions = "mongod-dump-sessions" - mongodb_dump_mutexes = "mongodb-dump-mutexes" # The following MongoDB python extensions do not run on Solaris. if sys.platform.startswith("sunos"): @@ -382,7 +381,6 @@ class GDBDumper(object): mongodb_waitsfor_graph, mongodb_javascript_stack, mongod_dump_sessions, - mongodb_dump_mutexes, "set confirm off", "quit", ] |