<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>39203</bug_id>
          
          <creation_ts>2010-05-17 00:48:44 -0700</creation_ts>
          <short_desc>[DRT/Chromium] Increase the time out value</short_desc>
          <delta_ts>2010-05-21 11:58:38 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Tools / Tests</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Other</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>38023</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Kent Tamura">tkent</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>abarth</cc>
    
    <cc>dglazkov</cc>
    
    <cc>dpranke</cc>
    
    <cc>eric</cc>
    
    <cc>levin</cc>
    
    <cc>ojan</cc>
    
    <cc>tony</cc>
    
    <cc>webkit.review.bot</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>226658</commentid>
    <comment_count>0</comment_count>
    <who name="Kent Tamura">tkent</who>
    <bug_when>2010-05-17 00:48:44 -0700</bug_when>
    <thetext>[DRT/Chromium] Increase the time out value</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>226665</commentid>
    <comment_count>1</comment_count>
      <attachid>56218</attachid>
    <who name="Kent Tamura">tkent</who>
    <bug_when>2010-05-17 00:53:08 -0700</bug_when>
    <thetext>Created attachment 56218
Proposed patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>226669</commentid>
    <comment_count>2</comment_count>
    <who name="Tony Chang">tony</who>
    <bug_when>2010-05-17 01:01:50 -0700</bug_when>
    <thetext>Ojan would be a good reviewer since he did a lot of work on getting the timeout as low as possible in TestShell.

I&apos;m a little confused.  I thought when we hit the timeout, we first call notifyDone, and if that fails, we exit(0) the process (which looks like a crash).  Is the call to notifyDone failing?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>226703</commentid>
    <comment_count>3</comment_count>
    <who name="Kent Tamura">tkent</who>
    <bug_when>2010-05-17 02:16:52 -0700</bug_when>
    <thetext>(In reply to comment #2)
&gt; Ojan would be a good reviewer since he did a lot of work on getting the timeout as low as possible in TestShell.
&gt; 
&gt; I&apos;m a little confused.  I thought when we hit the timeout, we first call notifyDone, and if that fails, we exit(0) the process (which looks like a crash).  Is the call to notifyDone failing?

I think DRT/Chromium works as the same as other platforms DRTs.

The problem is that, if a DRT process exits before new-run-webkit-tests detects timeout, new-run-webkit-tests assumes the DRT process crashed.
(webkitpy/layout_tests/port/server_process.py _read())

The current DRT/Chromium timeout value is 10 sec and new-run-webkit-tests timeout value is 6 sec. I&apos;m not sure why new-run-webkit-tests can&apos;t detect timeout correctly.  Anyway, making DRT timeout value longer solves the problem.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>226790</commentid>
    <comment_count>4</comment_count>
    <who name="David Levin">levin</who>
    <bug_when>2010-05-17 09:46:38 -0700</bug_when>
    <thetext>It seems like the DRT timeout should be longer than the script timeout (just like how you mentioned it was 10 seconds vs 6 seconds for test_shell and the script).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>228247</commentid>
    <comment_count>5</comment_count>
      <attachid>56218</attachid>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2010-05-20 01:03:26 -0700</bug_when>
    <thetext>Comment on attachment 56218
Proposed patch

OK.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>228394</commentid>
    <comment_count>6</comment_count>
      <attachid>56218</attachid>
    <who name="Kent Tamura">tkent</who>
    <bug_when>2010-05-20 08:46:17 -0700</bug_when>
    <thetext>Comment on attachment 56218
Proposed patch

Clearing flags on attachment: 56218

Committed r59839: &lt;http://trac.webkit.org/changeset/59839&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>228395</commentid>
    <comment_count>7</comment_count>
    <who name="Kent Tamura">tkent</who>
    <bug_when>2010-05-20 08:46:27 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>228427</commentid>
    <comment_count>8</comment_count>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2010-05-20 09:48:08 -0700</bug_when>
    <thetext>http://trac.webkit.org/changeset/59839 might have broken Tiger Intel Release
The following changes are on the blame list:
http://trac.webkit.org/changeset/59840
http://trac.webkit.org/changeset/59839</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>228569</commentid>
    <comment_count>9</comment_count>
    <who name="Ojan Vafai">ojan</who>
    <bug_when>2010-05-20 14:25:18 -0700</bug_when>
    <thetext>Dirk is way more familiar with the current state of this code than I am.

(In reply to comment #4)
&gt; It seems like the DRT timeout should be longer than the script timeout (just like how you mentioned it was 10 seconds vs 6 seconds for test_shell and the script).

I actually think it&apos;s the other way around. If DRT times out, then it can dump whatever results it has so far and then load the next test. If the script times out, all it can do is kill DRT.

new-run-webkit-tests passes the per-test timeout to test_shell when it&apos;s running the test, so that value isn&apos;t even used for new-run-webkit-tests.

(In reply to comment #3)
&gt; (In reply to comment #2)
&gt; &gt; I&apos;m a little confused.  I thought when we hit the timeout, we first call notifyDone, and if that fails, we exit(0) the process (which looks like a crash).  Is the call to notifyDone failing?
&gt; 
&gt; The problem is that, if a DRT process exits before new-run-webkit-tests detects timeout, new-run-webkit-tests assumes the DRT process crashed.

If this is true, it&apos;s a regression or it&apos;s a difference between DRT and test_shell. 

There are two timeout cases:
1. The test times out due to logic error (e.g., forgot to call notifyDone). In this case, DRT can just dump #TIMEOUT and load the next test.
2. The test times out because DRT is hung. In this case, DRT needs to be killed. test_shell has code to also dump #TIMEOUT here in the relevant signal handlers. Does DRT not?

#TIMEOUT lets new-run-webkit-tests know that the test timed out instead of crashing, even if DRT/test_shell disapears.


Anyways, this patch is fine. We should match Mac DRT. But, I think the underlying bug is still there.

Also, FWIW, the conclusion last time that we talked about timeouts on webkit-dev was that all tests would get a long (e.g. 30 seconds) timeout except for tests that are expected to timeout, which will get a much shorter timeout (e.g. a couple seconds). That way, we don&apos;t need to manually mark tests as SLOW and timeout tests don&apos;t make the test cycle time insanely large.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>228621</commentid>
    <comment_count>10</comment_count>
    <who name="Dirk Pranke">dpranke</who>
    <bug_when>2010-05-20 16:16:32 -0700</bug_when>
    <thetext>(In reply to comment #9)
&gt; Dirk is way more familiar with the current state of this code than I am.
&gt; 
&gt; (In reply to comment #4)
&gt; &gt; It seems like the DRT timeout should be longer than the script timeout (just like how you mentioned it was 10 seconds vs 6 seconds for test_shell and the script).
&gt; 
&gt; I actually think it&apos;s the other way around. If DRT times out, then it can dump whatever results it has so far and then load the next test. If the script times out, all it can do is kill DRT.
&gt; 
&gt; new-run-webkit-tests passes the per-test timeout to test_shell when it&apos;s running the test, so that value isn&apos;t even used for new-run-webkit-tests.
&gt; 

The script logic actually varies by port. 

The WebKit Mac port of new-run-webkit-tests (and I think the Chromium DRT port) use non-blocking I/O and a timeout to enforce timeouts in the script. This way the script can abort before DRT does, and DRT doesn&apos;t have to have a concept of a timeout. 

The Chromium ports (all platforms) pass the timeout to TestShell, and rely on Test Shell to enforce the timeout. At one point there was code in some configurations of new-run-webkit-tests to try and catch timeouts, but not in the regular code path.

We do things this way because there is no way to do a non-blocking read using select on Windows from Python. I think (but am not positive) that you can do this in (cygwin?) Perl on Windows, and so WebKit Win doesn&apos;t have this problem.

So, DRT and test_shell are definitely different.

Separately, I am in the middle of trying to change new-run-webkit-tests to detect wedged threads and recover, in order to work around the Python multi-threading issues we&apos;re seeing. So it *may* be feasible to change test_shell to match DRT here, but I can&apos;t say so conclusively yet.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>228760</commentid>
    <comment_count>11</comment_count>
    <who name="Kent Tamura">tkent</who>
    <bug_when>2010-05-20 23:08:30 -0700</bug_when>
    <thetext>(In reply to comment #10)
&gt; We do things this way because there is no way to do a non-blocking read using select on Windows from Python. I think (but am not positive) that you can do this in (cygwin?) Perl on Windows, and so WebKit Win doesn&apos;t have this problem.

Do you mean we have no ways to make new-run-webkit-tests work with Chromium DRT for Windows?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>228962</commentid>
    <comment_count>12</comment_count>
    <who name="Dirk Pranke">dpranke</who>
    <bug_when>2010-05-21 09:55:14 -0700</bug_when>
    <thetext>(In reply to comment #11)
&gt; (In reply to comment #10)
&gt; &gt; We do things this way because there is no way to do a non-blocking read using select on Windows from Python. I think (but am not positive) that you can do this in (cygwin?) Perl on Windows, and so WebKit Win doesn&apos;t have this problem.
&gt; 
&gt; Do you mean we have no ways to make new-run-webkit-tests work with Chromium DRT for Windows?

Well, that&apos;s the question. We may have to run it under cygwin. I am looking into other options.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>229026</commentid>
    <comment_count>13</comment_count>
    <who name="Ojan Vafai">ojan</who>
    <bug_when>2010-05-21 11:58:38 -0700</bug_when>
    <thetext>(In reply to comment #10)
&gt; The WebKit Mac port of new-run-webkit-tests (and I think the Chromium DRT port) use non-blocking I/O and a timeout to enforce timeouts in the script. This way the script can abort before DRT does, and DRT doesn&apos;t have to have a concept of a timeout. 
&gt; 
&gt; The Chromium ports (all platforms) pass the timeout to TestShell, and rely on Test Shell to enforce the timeout. At one point there was code in some configurations of new-run-webkit-tests to try and catch timeouts, but not in the regular code path.
&gt; 
&gt; We do things this way because there is no way to do a non-blocking read using select on Windows from Python. I think (but am not positive) that you can do this in (cygwin?) Perl on Windows, and so WebKit Win doesn&apos;t have this problem.
&gt; 
&gt; So, DRT and test_shell are definitely different.
&gt; 
&gt; Separately, I am in the middle of trying to change new-run-webkit-tests to detect wedged threads and recover, in order to work around the Python multi-threading issues we&apos;re seeing. So it *may* be feasible to change test_shell to match DRT here, but I can&apos;t say so conclusively yet.

I don&apos;t quite get all this, but, we should do our best to to maintain the following:
For tests that timeout, but don&apos;t hang DRT, we first dump the render dump.

That way, for timing out tests, we still spit put a -actual.txt file where we can see what the state of the render tree was when it timed out. This is very helpful in debugging timeouts, especially ones that are hard to reproduce.

If it&apos;s run-webkit-tests that handles the timeout, there&apos;s no way for DRT to dump the timeout information. All I&apos;m suggesting really is that both DRT and run-webkit-tests should enforce timeouts. run-webkit-tests&apos;s timeout should just be a couple seconds longer than DRTs.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>56218</attachid>
            <date>2010-05-17 00:53:08 -0700</date>
            <delta_ts>2010-05-20 08:46:16 -0700</delta_ts>
            <desc>Proposed patch</desc>
            <filename>bug-39203-20100517165307.patch</filename>
            <type>text/plain</type>
            <size>1690</size>
            <attacher name="Kent Tamura">tkent</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1dlYktpdFRvb2xzL0NoYW5nZUxvZyBiL1dlYktpdFRvb2xzL0NoYW5nZUxv
ZwppbmRleCBiMjE4YjBjMWE5OTI3MTNmNTJkYWFmZjk0ZGJhMjA3OTg5ZWI0YjljLi4zNmJiMmFl
YjQyOGU0ODVkNDhlMmFmMTE4YjNlZGI0MDk4ZDA2ZDlmIDEwMDY0NAotLS0gYS9XZWJLaXRUb29s
cy9DaGFuZ2VMb2cKKysrIGIvV2ViS2l0VG9vbHMvQ2hhbmdlTG9nCkBAIC0xLDMgKzEsMTkgQEAK
KzIwMTAtMDUtMTcgIEtlbnQgVGFtdXJhICA8dGtlbnRAY2hyb21pdW0ub3JnPgorCis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