Title: [133076] trunk/Tools
Revision
133076
Author
[email protected]
Date
2012-10-31 14:28:14 -0700 (Wed, 31 Oct 2012)

Log Message

nrwt is not killing stuck DRTs on chromium win
https://bugs.webkit.org/show_bug.cgi?id=100886

Unreviewed, build fix.

In the original implementation of NRWT for Chromium, we used
to assume that DRT would always manage to exit on its own and
so NRWT wouldn't attempt to kill DRT if it was stuck (this was the
"hung worker" problem, and meant that if DRT hung, NRWT would hang).

Eventually, we merged the chromium code with the other ports and
now will always try to shut down DRTs if a test times out, but as
part of that merge we left in a code path where we wouldn't
shut the driver down on windows. This was resulting in stray
DRTs being left around, and NRWT sometimes not exiting cleanly as
a result.

No unit tests added because this was a windows-only code path (hence
hard to test) and that is now gone.

* Scripts/webkitpy/layout_tests/port/server_process.py:
(ServerProcess.stop):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (133075 => 133076)


--- trunk/Tools/ChangeLog	2012-10-31 21:19:23 UTC (rev 133075)
+++ trunk/Tools/ChangeLog	2012-10-31 21:28:14 UTC (rev 133076)
@@ -1,3 +1,28 @@
+2012-10-31  Dirk Pranke  <[email protected]>
+
+        nrwt is not killing stuck DRTs on chromium win
+        https://bugs.webkit.org/show_bug.cgi?id=100886
+
+        Unreviewed, build fix.
+
+        In the original implementation of NRWT for Chromium, we used
+        to assume that DRT would always manage to exit on its own and
+        so NRWT wouldn't attempt to kill DRT if it was stuck (this was the
+        "hung worker" problem, and meant that if DRT hung, NRWT would hang).
+
+        Eventually, we merged the chromium code with the other ports and
+        now will always try to shut down DRTs if a test times out, but as
+        part of that merge we left in a code path where we wouldn't
+        shut the driver down on windows. This was resulting in stray
+        DRTs being left around, and NRWT sometimes not exiting cleanly as
+        a result.
+
+        No unit tests added because this was a windows-only code path (hence
+        hard to test) and that is now gone.
+
+        * Scripts/webkitpy/layout_tests/port/server_process.py:
+        (ServerProcess.stop):
+
 2012-10-31  Ami Fischman  <[email protected]>
 
         [chromium] DRT and WTR should clear the cache between tests

Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/server_process.py (133075 => 133076)


--- trunk/Tools/Scripts/webkitpy/layout_tests/port/server_process.py	2012-10-31 21:19:23 UTC (rev 133075)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/server_process.py	2012-10-31 21:28:14 UTC (rev 133076)
@@ -335,20 +335,18 @@
             self._proc.stdin.close()
             self._proc.stdin = None
         killed = False
-        if not timeout_secs:
-            self._kill()
-            killed = True
-        elif not self._host.platform.is_win():
-            # FIXME: Why aren't we calling this on win?
+        if timeout_secs:
             deadline = now + timeout_secs
             while self._proc.poll() is None and time.time() < deadline:
                 time.sleep(0.01)
             if self._proc.poll() is None:
-                _log.warning('stopping %s timed out, killing it' % self._name)
-                self._kill()
-                killed = True
-                _log.warning('killed')
+                _log.warning('stopping %s(pid %d) timed out, killing it' % (self._name, self._proc.pid))
 
+        if self._proc.poll() is None:
+            self._kill()
+            killed = True
+            _log.debug('killed pid %d' % self._proc.pid)
+
         # read any remaining data on the pipes and return it.
         if not killed:
             if self._use_win32_apis:
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to