Sample Process on notifyDone timed out
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 29 Aug 2016 16:23:46 +0000 (16:23 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 29 Aug 2016 16:23:46 +0000 (16:23 +0000)
https://bugs.webkit.org/show_bug.cgi?id=161063

Patch by Jonathan Bedard <jbedard@apple.com> on 2016-08-29
Reviewed by Darin Adler.

* Scripts/webkitpy/port/driver.py:
(Driver._check_for_driver_timeout):
* WebKitTestRunner/InjectedBundle/TestRunner.cpp: Call sample_process during notifyDone timeouts.
(WTR::TestRunner::waitToDumpWatchdogTimerFired):
* WebKitTestRunner/InjectedBundle/mac/TestRunnerMac.mm: Log pid and name for testing harness.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@205123 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/ChangeLog
Tools/Scripts/webkitpy/port/driver.py
Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp

index 6898542..bff9319 100644 (file)
@@ -1,5 +1,18 @@
 2016-08-29  Jonathan Bedard  <jbedard@apple.com>
 
+        Sample Process on notifyDone timed out
+        https://bugs.webkit.org/show_bug.cgi?id=161063
+
+        Reviewed by Darin Adler.
+
+        * Scripts/webkitpy/port/driver.py:
+        (Driver._check_for_driver_timeout): 
+        * WebKitTestRunner/InjectedBundle/TestRunner.cpp: Call sample_process during notifyDone timeouts.
+        (WTR::TestRunner::waitToDumpWatchdogTimerFired):
+        * WebKitTestRunner/InjectedBundle/mac/TestRunnerMac.mm: Log pid and name for testing harness.
+
+2016-08-29  Jonathan Bedard  <jbedard@apple.com>
+
         Check-webkit-style does not work with Objective-C blocks
         https://bugs.webkit.org/show_bug.cgi?id=161247
 
index 3b75a72..40df91e 100644 (file)
@@ -422,6 +422,15 @@ class Driver(object):
         return cmd
 
     def _check_for_driver_timeout(self, out_line):
+        if out_line.startswith("#PID UNRESPONSIVE - "):
+            match = re.match('#PID UNRESPONSIVE - (\S+)', out_line)
+            child_process_name = match.group(1) if match else 'WebProcess'
+            match = re.search('pid (\d+)', out_line)
+            child_process_pid = int(match.group(1)) if match else None
+            err_line = 'Wait on notifyDone timed out, process ' + child_process_name + ' pid = ' + str(child_process_pid)
+            self.error_from_test += err_line
+            _log.debug(err_line)
+            self._port.sample_process(child_process_name, child_process_pid)
         if out_line == "FAIL: Timed out waiting for notifyDone to be called\n":
             self._driver_timed_out = True
 
index 5f5225c..34f9701 100644 (file)
@@ -44,6 +44,7 @@
 #include <WebKit/WKBundlePrivate.h>
 #include <WebKit/WKBundleScriptWorld.h>
 #include <WebKit/WKData.h>
+#include <WebKit/WKPagePrivate.h>
 #include <WebKit/WKRetainPtr.h>
 #include <WebKit/WKSerializedScriptValue.h>
 #include <WebKit/WebKit2_C.h>
@@ -158,6 +159,11 @@ void TestRunner::waitToDumpWatchdogTimerFired()
 {
     invalidateWaitToDumpWatchdogTimer();
     auto& injectedBundle = InjectedBundle::singleton();
+#if PLATFORM(COCOA)
+    char buffer[1024];
+    snprintf(buffer, sizeof(buffer), "#PID UNRESPONSIVE - %s (pid %d)\n", getprogname(), getpid());
+    injectedBundle.outputText(buffer);
+#endif
     injectedBundle.outputText("FAIL: Timed out waiting for notifyDone to be called\n\n");
     injectedBundle.done();
 }