From e4508eebb43bfc563192bb60a510d8d91cc6129d Mon Sep 17 00:00:00 2001 From: Richard Oudkerk Date: Thu, 17 Oct 2013 12:10:45 +0100 Subject: Try strace instead of gdb to see what wedged child is doing. --- Lib/test/_test_multiprocessing.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Lib/test/_test_multiprocessing.py b/Lib/test/_test_multiprocessing.py index ac1b2a7..d2b9403 100644 --- a/Lib/test/_test_multiprocessing.py +++ b/Lib/test/_test_multiprocessing.py @@ -273,7 +273,10 @@ class _TestProcess(BaseTestCase): @classmethod def _test_terminate(cls): + print('signal.getsignal(SIGTERM) =', signal.getsignal(signal.SIGTERM)) + print('starting sleep') time.sleep(100) + print('finished sleep') def test_terminate(self): if self.TYPE == 'threads': @@ -313,12 +316,11 @@ class _TestProcess(BaseTestCase): except RuntimeError: print('os.waitpid() =', os.waitpid(p.pid, os.WNOHANG)) import subprocess - p = subprocess.Popen(['gdb', sys.executable, str(p.pid)], - stdin=subprocess.PIPE) try: - p.communicate(b'bt 50', timeout=10) + subprocess.check_call(['strace', '-p', str(p.pid)], + timeout=10) except subprocess.TimeoutExpired: - p.kill() + pass raise finally: signal.signal(signal.SIGALRM, old_handler) -- cgit v0.12