Changeset 139743 in webkit


Ignore:
Timestamp:
Jan 15, 2013 8:03:37 AM (11 years ago)
Author:
zandobersek@gmail.com
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):

Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r139736 r139743  
     12013-01-15  Zan Dobersek  <zdobersek@igalia.com>
     2
     3        [GTK] Waiting on the gdb process will lead to deadlock
     4        https://bugs.webkit.org/show_bug.cgi?id=106906
     5
     6        Reviewed by Philippe Normand.
     7
     8        Use communicate() rather than wait() on the Popen object that's running the gdb
     9        command. This avoids the deadlock that occurs on the GTK builders.
     10
     11        * Scripts/webkitpy/layout_tests/port/gtk.py:
     12        (GtkPort._get_gdb_output):
     13
    1142013-01-15  Zan Dobersek  <zdobersek@igalia.com>
    215
  • trunk/Tools/Scripts/webkitpy/layout_tests/port/gtk.py

    r139736 r139743  
    128128        cmd = ['gdb', '-ex', 'thread apply all bt 1024', '--batch', str(self._path_to_driver()), coredump_path]
    129129        proc = subprocess.Popen(cmd, stdin=None, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
    130         proc.wait()
    131         errors = [l.strip().decode('utf8', 'ignore') for l in proc.stderr.readlines()]
    132         trace = proc.stdout.read().decode('utf8', 'ignore')
    133         return (trace, errors)
     130        stdout, stderr = proc.communicate()
     131        errors = [l.strip().decode('utf8', 'ignore') for l in stderr.splitlines()]
     132        return (stdout.decode('utf8', 'ignore'), errors)
    134133
    135134    def _get_crash_log(self, name, pid, stdout, stderr, newer_than):
Note: See TracChangeset for help on using the changeset viewer.