summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Abrahams <jonathan@mongodb.com>2017-03-30 08:59:31 -0400
committerJonathan Abrahams <jonathan@mongodb.com>2017-03-30 09:00:45 -0400
commita95d617a379cbccce55d6335903e700d157af4c1 (patch)
tree39d319e5d1ae4e9e58b6951786aa5ed1a9bbd7a3
parentd6552eddacb8afd90bebf55d3cd98cb77f543655 (diff)
downloadmongo-a95d617a379cbccce55d6335903e700d157af4c1.tar.gz
SERVER-28463 Add set scheduler-locking to Hang Analyzer to prevent threads from running in GDB
-rwxr-xr-xbuildscripts/hang_analyzer.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/buildscripts/hang_analyzer.py b/buildscripts/hang_analyzer.py
index fbe5eb32520..0218caaf247 100755
--- a/buildscripts/hang_analyzer.py
+++ b/buildscripts/hang_analyzer.py
@@ -353,10 +353,10 @@ class GDBDumper(object):
"set print thread-events off", # Python calls to gdb.parse_and_eval may cause threads
# to start and finish. This suppresses those messages
# from appearing in the return output.
- "file %s" % process_name, # Solaris must load the process to read the symbols.
+ "file %s" % process_name, # Solaris must load the process to read the symbols.
"attach %d" % pid,
"info sharedlibrary",
- "info threads", # Dump a simple list of commands to get the thread name
+ "info threads", # Dump a simple list of commands to get the thread name
"set python print-stack full",
] + raw_stacks_commands + [
stack_bt,
@@ -364,13 +364,14 @@ class GDBDumper(object):
source_mongo_printers,
source_mongo_lock,
mongodb_uniqstack,
+ "set scheduler-locking on", # Lock the scheduler, before running any of the
+ # following commands, which executes code in the
+ # attached process.
dump_command,
mongodb_dump_locks,
mongodb_show_locks,
mongodb_waitsfor_graph,
- mongodb_javascript_stack, # The mongodb-javascript-stack command executes code in
- # order to dump JavaScript backtraces and should therefore
- # be one of the last analysis commands.
+ mongodb_javascript_stack,
"set confirm off",
"quit",
]