Changeset 119018 in webkit


Ignore:
Timestamp:
May 30, 2012 6:51:50 PM (12 years ago)
Author:
Stephanie Lewis
Message:

https://bugs.webkit.org/show_bug.cgi?id=87717
Unresponsive WebProcesses can be mistaken for WebProcess crashes.

Reviewed by Dirk Pranke.

Change the error message from #CRASHED to #UNRESPONSIVE PROCESS
If there isn't a crash log found for the process add a message saying
the process was unresponsive.

  • Scripts/webkitpy/layout_tests/port/webkit.py:

(WebKitDriver.init):
(WebKitDriver._check_for_driver_crash):
(WebKitDriver.run_test):

  • Scripts/webkitpy/layout_tests/port/webkit_unittest.py:

(WebKitDriverTest.test_check_for_driver_crash.assert_crash):
(WebKitDriverTest):
(WebKitDriverTest.test_check_for_driver_crash):

  • WebKitTestRunner/TestController.cpp:

(WTR):
(WTR::TestController::runTest):

Location:
trunk/Tools
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r119017 r119018  
     12012-05-30  Stephanie Lewis  <slewis@apple.com>
     2
     3        https://bugs.webkit.org/show_bug.cgi?id=87717
     4        Unresponsive WebProcesses can be mistaken for WebProcess crashes.
     5
     6        Reviewed by Dirk Pranke.
     7
     8        Change the error message from #CRASHED to #UNRESPONSIVE PROCESS
     9        If there isn't a crash log found for the process add a message saying
     10        the process was unresponsive.
     11
     12        * Scripts/webkitpy/layout_tests/port/webkit.py:
     13        (WebKitDriver.__init__):
     14        (WebKitDriver._check_for_driver_crash):
     15        (WebKitDriver.run_test):
     16        * Scripts/webkitpy/layout_tests/port/webkit_unittest.py:
     17        (WebKitDriverTest.test_check_for_driver_crash.assert_crash):
     18        (WebKitDriverTest):
     19        (WebKitDriverTest.test_check_for_driver_crash):
     20        * WebKitTestRunner/TestController.cpp:
     21        (WTR):
     22        (WTR::TestController::runTest):
     23
    1242012-05-30  Stephanie Lewis  <slewis@apple.com>
    225
  • trunk/Tools/Scripts/webkitpy/layout_tests/port/webkit.py

    r119017 r119018  
    450450        self._crashed_pid = None
    451451
     452        # WebKitTestRunner can report back subprocesses that became unresponsive
     453        # This could mean they crashed.
     454        self._subprocess_was_unresponsive = False
     455
    452456        # stderr reading is scoped on a per-test (not per-block) basis, so we store the accumulated
    453457        # stderr output, as well as if we've seen #EOF on this driver instance.
     
    514518            self._crashed_process_name = self._server_process.name()
    515519            self._crashed_pid = self._server_process.pid()
    516         elif error_line.startswith("#CRASHED - WebProcess"):
     520        elif (error_line.startswith("#CRASHED - WebProcess")
     521            or error_line.startswith("#PROCESS UNRESPONSIVE - WebProcess")):
    517522            # WebKitTestRunner uses this to report that the WebProcess subprocess crashed.
    518523            pid = None
     
    524529            # FIXME: delete this after we're sure this code is working :)
    525530            _log.debug('WebProcess crash, pid = %s, error_line = %s' % (str(pid), error_line))
     531            if error_line.startswith("#PROCESS UNRESPONSIVE - WebProcess"):
     532                self._subprocess_was_unresponsive = True
    526533            return True
    527534        return self.has_crashed()
     
    582589            if not crash_log:
    583590                crash_log = 'no crash log found for %s:%d.' % (self._crashed_process_name, self._crashed_pid)
     591                # If we were unresponsive append a message informing there may not have been a crash.
     592                if self._subprocess_was_unresponsive:
     593                    crash_log += '  Process failed to become responsive before timing out.'
    584594
    585595        timeout = self._server_process.timed_out
  • trunk/Tools/Scripts/webkitpy/layout_tests/port/webkit_unittest.py

    r118979 r119018  
    323323                pass
    324324
    325         def assert_crash(driver, error_line, crashed, name, pid):
     325        def assert_crash(driver, error_line, crashed, name, pid, unresponsive=False):
    326326            self.assertEquals(driver._check_for_driver_crash(error_line), crashed)
    327327            self.assertEquals(driver._crashed_process_name, name)
    328328            self.assertEquals(driver._crashed_pid, pid)
     329            self.assertEquals(driver._subprocess_was_unresponsive, unresponsive)
    329330            driver.stop()
    330331
     
    335336        driver._crashed_pid = None
    336337        driver._server_process = FakeServerProcess(False)
     338        driver._subprocess_was_unresponsive = False
    337339        assert_crash(driver, '#CRASHED\n', True, 'FakeServerProcess', 1234)
    338340
     
    340342        driver._crashed_pid = None
    341343        driver._server_process = FakeServerProcess(False)
     344        driver._subprocess_was_unresponsive = False
    342345        assert_crash(driver, '#CRASHED - WebProcess\n', True, 'WebProcess', None)
    343346
     
    345348        driver._crashed_pid = None
    346349        driver._server_process = FakeServerProcess(False)
     350        driver._subprocess_was_unresponsive = False
    347351        assert_crash(driver, '#CRASHED - WebProcess (pid 8675)\n', True, 'WebProcess', 8675)
     352       
     353        driver._crashed_process_name = None
     354        driver._crashed_pid = None
     355        driver._server_process = FakeServerProcess(False)
     356        driver._subprocess_was_unresponsive = False
     357        assert_crash(driver, '#PROCESS UNRESPONSIVE - WebProcess (pid 8675)\n', True, 'WebProcess', 8675, True)
    348358
    349359        driver._crashed_process_name = None
    350360        driver._crashed_pid = None
    351361        driver._server_process = FakeServerProcess(True)
     362        driver._subprocess_was_unresponsive = False
    352363        assert_crash(driver, '', True, 'FakeServerProcess', 1234)
    353364
  • trunk/Tools/WebKitTestRunner/TestController.cpp

    r118860 r119018  
    499499#if PLATFORM(MAC)
    500500        pid_t pid = WKPageGetProcessIdentifier(m_mainWebView->page());
    501         fprintf(stderr, "#CRASHED - WebProcess (pid %ld)\n", static_cast<long>(pid));
     501        fprintf(stderr, "#PROCESS UNRESPONSIVE - WebProcess (pid %ld)\n", static_cast<long>(pid));
    502502#else
    503         fputs("#CRASHED - WebProcess\n", stderr);
     503        fputs("#PROCESS UNRESPONSIVE - WebProcess\n", stderr);
    504504#endif
    505505        fflush(stderr);
Note: See TracChangeset for help on using the changeset viewer.