diff options
author | Jonathan Abrahams <jonathan@mongodb.com> | 2017-06-20 12:16:38 -0400 |
---|---|---|
committer | Jonathan Abrahams <jonathan@mongodb.com> | 2017-06-20 12:25:00 -0400 |
commit | d7d0e02561272917f6f2690078aa1522c4a5f4f6 (patch) | |
tree | 9cf9c0fea7627c63319eaf30d7b44a304ee9574c /buildscripts | |
parent | 3d6112c728688f4e985f0abad37f4f778bd9cb09 (diff) | |
download | mongo-d7d0e02561272917f6f2690078aa1522c4a5f4f6.tar.gz |
SERVER-29646 hang_analyzer.py signals python processes before attaching to any processes
(cherry picked from commit 20c5ecac947b69ea8a03660cef8ac1e1251b43e8)
Diffstat (limited to 'buildscripts')
-rwxr-xr-x | buildscripts/hang_analyzer.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/buildscripts/hang_analyzer.py b/buildscripts/hang_analyzer.py index 2729c04bef8..ca1baa00f39 100755 --- a/buildscripts/hang_analyzer.py +++ b/buildscripts/hang_analyzer.py @@ -495,11 +495,8 @@ def main(): for process in processes_orig: sys.stdout.write("Ignoring process %d of %s\n" % (process[0], process[1])) else: - # Dump all other processes first since signaling the python script interrupts it - for process in [a for a in processes if not a[1].startswith("python")]: - sys.stdout.write("Dumping process %d of %s\n" % (process[0], process[1])) - dbg.dump_info(process[0], process[1], sys.stdout) - + # Dump python processes by signalling them. The resmoke.py process will generate + # the report.json, when signalled, so we do this before attaching to other processes. for process in [a for a in processes if a[1].startswith("python")]: # On Windows, we set up an event object to wait on a signal. For Cygwin, we register # a signal handler to wait for the signal since it supports POSIX signals. @@ -512,6 +509,11 @@ def main(): (process[1], process[0])) signal_process(process[0], signal.SIGUSR1) + # Dump all other processes + for process in [a for a in processes if not a[1].startswith("python")]: + sys.stdout.write("Dumping process %d of %s\n" % (process[0], process[1])) + dbg.dump_info(process[0], process[1], sys.stdout) + # Suspend the timer so we can exit cleanly timer.cancel() |