summaryrefslogtreecommitdiff
path: root/buildscripts/hang_analyzer.py
diff options
context:
space:
mode:
authorJonathan Abrahams <jonathan@mongodb.com>2017-03-21 15:45:39 -0400
committerJonathan Abrahams <jonathan@mongodb.com>2017-03-21 15:45:39 -0400
commit19abe0c2dacef784aad78b89d6c6111109fbca88 (patch)
tree3d7ffd17d78d0fd1b0e4f98e2b1a5d88d4e363c5 /buildscripts/hang_analyzer.py
parent0d7ae60a0fafe11d61def67493c26809443e1987 (diff)
downloadmongo-19abe0c2dacef784aad78b89d6c6111109fbca88.tar.gz
SERVER-27874 - Hang analysis thread backtrace and mongo locks
- Run unique thread on Solaris - Add a legend to graph file - Do not generate digraph file, if graph is empty
Diffstat (limited to 'buildscripts/hang_analyzer.py')
-rwxr-xr-xbuildscripts/hang_analyzer.py44
1 files changed, 20 insertions, 24 deletions
diff --git a/buildscripts/hang_analyzer.py b/buildscripts/hang_analyzer.py
index ec2316082e4..9e577a1ea37 100755
--- a/buildscripts/hang_analyzer.py
+++ b/buildscripts/hang_analyzer.py
@@ -303,27 +303,23 @@ class GDBDumper(object):
printers_script = os.path.join(gdb_dir, "mongo.py")
mongo_lock_script = os.path.join(gdb_dir, "mongo_lock.py")
- bt_command = "mongodb-uniqstack bt"
+ source_mongo_lock = "source %s" % mongo_lock_script
+ mongodb_dump_locks = "mongodb-dump-locks"
mongodb_show_locks = "mongodb-show-locks"
- mongodb_deadlock = "mongodb-waitsfor-graph debugger_deadlock_%s_%d.gv" % \
+ mongodb_waitsfor_graph = "mongodb-waitsfor-graph debugger_waitsfor_%s_%d.gv" % \
(process_name, pid)
+ mongodb_javascript_stack = "mongodb-javascript-stack"
+ # The following MongoDB python extensions do not run on Solaris.
if sys.platform.startswith("sunos"):
- '''
- On Solaris, currently calling mongo-uniqstack leads to an error:
-
- Thread 198 received signal SIGSEGV, Segmentation fault.
- 0x0000000000000000 in ?? ()
- Python Exception <class 'gdb.error'> The program being debugged was signaled while in a
- function called from GDB.
- GDB remains in the frame where the signal was received.
- To change this behavior use "set unwindonsignal on".
- Evaluation of the expression containing the function
- (at 0x0x0) will be abandoned.
- When the function is done executing, GDB will silently stop.
- '''
- bt_command = "thread apply all bt"
+ source_mongo_lock = ""
+ # SERVER-28234 - GDB frame information not available on Solaris for a templatized
+ # function
+ mongodb_dump_locks = ""
+
+ # SERVER-28373 - GDB thread-local variables not available on Solaris
mongodb_show_locks = ""
- mongodb_deadlock = ""
+ mongodb_waitsfor_graph = ""
+ mongodb_javascript_stack = ""
cmds = [
"set interactive-mode off",
@@ -336,15 +332,15 @@ class GDBDumper(object):
"info threads", # Dump a simple list of commands to get the thread name
"set python print-stack full",
"source %s" % printers_script,
- "source %s" % mongo_lock_script,
- bt_command,
+ source_mongo_lock,
+ "mongodb-uniqstack bt",
dump_command,
- "mongodb-dump-locks",
+ mongodb_dump_locks,
mongodb_show_locks,
- mongodb_deadlock,
- "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_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.
"set confirm off",
"quit",
]