Title: [139743] trunk/Tools
Revision
139743
Author
[email protected]
Date
2013-01-15 08:03:37 -0800 (Tue, 15 Jan 2013)

Log Message

[GTK] Waiting on the gdb process will lead to deadlock
https://bugs.webkit.org/show_bug.cgi?id=106906

Reviewed by Philippe Normand.

Use communicate() rather than wait() on the Popen object that's running the gdb
command. This avoids the deadlock that occurs on the GTK builders.

* Scripts/webkitpy/layout_tests/port/gtk.py:
(GtkPort._get_gdb_output):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (139742 => 139743)


--- trunk/Tools/ChangeLog	2013-01-15 16:01:56 UTC (rev 139742)
+++ trunk/Tools/ChangeLog	2013-01-15 16:03:37 UTC (rev 139743)
@@ -1,5 +1,18 @@
 2013-01-15  Zan Dobersek  <[email protected]>
 
+        [GTK] Waiting on the gdb process will lead to deadlock
+        https://bugs.webkit.org/show_bug.cgi?id=106906
+
+        Reviewed by Philippe Normand.
+
+        Use communicate() rather than wait() on the Popen object that's running the gdb
+        command. This avoids the deadlock that occurs on the GTK builders.
+
+        * Scripts/webkitpy/layout_tests/port/gtk.py:
+        (GtkPort._get_gdb_output):
+
+2013-01-15  Zan Dobersek  <[email protected]>
+
         [GTK] Limit the number of frames printed out when backtracing with gdb
         https://bugs.webkit.org/show_bug.cgi?id=106901
 

Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/gtk.py (139742 => 139743)


--- trunk/Tools/Scripts/webkitpy/layout_tests/port/gtk.py	2013-01-15 16:01:56 UTC (rev 139742)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/gtk.py	2013-01-15 16:03:37 UTC (rev 139743)
@@ -127,10 +127,9 @@
     def _get_gdb_output(self, coredump_path):
         cmd = ['gdb', '-ex', 'thread apply all bt 1024', '--batch', str(self._path_to_driver()), coredump_path]
         proc = subprocess.Popen(cmd, stdin=None, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
-        proc.wait()
-        errors = [l.strip().decode('utf8', 'ignore') for l in proc.stderr.readlines()]
-        trace = proc.stdout.read().decode('utf8', 'ignore')
-        return (trace, errors)
+        stdout, stderr = proc.communicate()
+        errors = [l.strip().decode('utf8', 'ignore') for l in stderr.splitlines()]
+        return (stdout.decode('utf8', 'ignore'), errors)
 
     def _get_crash_log(self, name, pid, stdout, stderr, newer_than):
         pid_representation = str(pid or '<unknown>')
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to