<?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>37738</bug_id>
          
          <creation_ts>2010-04-16 17:30:37 -0700</creation_ts>
          <short_desc>new-run-webkit-tests low timeout is too sensitive to runaway processes or test crashes</short_desc>
          <delta_ts>2011-04-06 18:47:40 -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>PC</rep_platform>
          <op_sys>OS X 10.5</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>34984</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Maciej Stachowiak">mjs</reporter>
          <assigned_to name="Dirk Pranke">dpranke</assigned_to>
          <cc>abarth</cc>
    
    <cc>dpranke</cc>
    
    <cc>eric</cc>
    
    <cc>lforschler</cc>
    
    <cc>ojan</cc>
    
    <cc>tony</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>213525</commentid>
    <comment_count>0</comment_count>
    <who name="Maciej Stachowiak">mjs</who>
    <bug_when>2010-04-16 17:30:37 -0700</bug_when>
    <thetext>new-run-webkit-tests has a much lower default timeout than run-webkit-tests. This makes it extremely sensitive to runaway processes, since anything going on in the background will make a bunch of tests time out. One extra bad factor is that crash logging for a crashed test (ReportCrash) can cause a system to get slow enough to time out a bunch of tests in a row, or even time out a DumpRenderTree process (whereupon it is restarted from scratch).

Thus, the low timeout can actually make overall test time longer instead of shorter.

I suggest matching the old timeout initially, and changing it over time once we solve these problems.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>213532</commentid>
    <comment_count>1</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2010-04-16 17:45:21 -0700</bug_when>
    <thetext>We need bot data to confirm or deny how much of a problem this is in practice.  Low timeouts are a good thing as they allow us to run tests which expect to TIMEOUT every time w/ minimal delay on total test time.  It&apos;s certainly possible to detect load and increase timeouts for tests which are not expected to timeout when run under load.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>213590</commentid>
    <comment_count>2</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2010-04-17 01:18:03 -0700</bug_when>
    <thetext>Why not run tests with a TIMEOUT expectation with a lower timeout?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>213606</commentid>
    <comment_count>3</comment_count>
    <who name="Ojan Vafai">ojan</who>
    <bug_when>2010-04-17 08:45:35 -0700</bug_when>
    <thetext>(In reply to comment #2)
&gt; Why not run tests with a TIMEOUT expectation with a lower timeout?

I prefer that to the current model actually. I don&apos;t much like that we need to mark things as SLOW. It&apos;s confusing and complicated (mea culpa). The downside, which is relatively minor, is that the test may start passing with the regular timeout and we wouldn&apos;t know. The downside seems preferable to the confusion of the current model, namely, people have a lot of trouble understanding when they should mark something TIMEOUT vs SLOW.

Also, is there a way we can kill ReportCrash from NRWT? When I run the tests locally, I frequently will &quot;sudo killall ReportCrash&quot; in a loop. I&apos;d much rather have NRWT do that for me. The sudo is the problem of course.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>213931</commentid>
    <comment_count>4</comment_count>
    <who name="Maciej Stachowiak">mjs</who>
    <bug_when>2010-04-19 00:20:50 -0700</bug_when>
    <thetext>(In reply to comment #1)
&gt; We need bot data to confirm or deny how much of a problem this is in practice. 
&gt; Low timeouts are a good thing as they allow us to run tests which expect to
&gt; TIMEOUT every time w/ minimal delay on total test time.  It&apos;s certainly
&gt; possible to detect load and increase timeouts for tests which are not expected
&gt; to timeout when run under load.

It&apos;s definitely a problem on my computer. I&apos;ve gotten the failure cascade multiple times. I&apos;ve also heard of other people experiencing it. It seems to me that this needs to be fixed whether or not we observe it on a buildbot.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>213962</commentid>
    <comment_count>5</comment_count>
    <who name="Maciej Stachowiak">mjs</who>
    <bug_when>2010-04-19 01:55:42 -0700</bug_when>
    <thetext>(In reply to comment #3)
&gt; (In reply to comment #2)
&gt; &gt; Why not run tests with a TIMEOUT expectation with a lower timeout?
&gt; 
&gt; I prefer that to the current model actually. I don&apos;t much like that we need to
&gt; mark things as SLOW. It&apos;s confusing and complicated (mea culpa). The downside,
&gt; which is relatively minor, is that the test may start passing with the regular
&gt; timeout and we wouldn&apos;t know. The downside seems preferable to the confusion of
&gt; the current model, namely, people have a lot of trouble understanding when they
&gt; should mark something TIMEOUT vs SLOW.

Sounds like a neat idea. It would somewhat reduce the incentive to make your tests fast though. Maybe there could be a &quot;soft&quot; timeout that would result in a non-failure warning, to make slow tests more visible?

&gt; Also, is there a way we can kill ReportCrash from NRWT? When I run the tests
&gt; locally, I frequently will &quot;sudo killall ReportCrash&quot; in a loop. I&apos;d much
&gt; rather have NRWT do that for me. The sudo is the problem of course.

I don&apos;t think that would be a good thing to do. The crash logs are very useful for diagnosing what went wrong, especially on the buildbots.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>213975</commentid>
    <comment_count>6</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2010-04-19 02:50:33 -0700</bug_when>
    <thetext>(In reply to comment #5)
&gt; Sounds like a neat idea. It would somewhat reduce the incentive to make your
&gt; tests fast though. Maybe there could be a &quot;soft&quot; timeout that would result in a
&gt; non-failure warning, to make slow tests more visible?

All timeouts are currently &quot;soft&quot; in that all failures are re-run at the end.  Tests which timed out once due to machine load are unlikely to time out twice.

&gt; &gt; Also, is there a way we can kill ReportCrash from NRWT? When I run the tests
&gt; &gt; locally, I frequently will &quot;sudo killall ReportCrash&quot; in a loop. I&apos;d much
&gt; &gt; rather have NRWT do that for me. The sudo is the problem of course.
&gt; 
&gt; I don&apos;t think that would be a good thing to do. The crash logs are very useful
&gt; for diagnosing what went wrong, especially on the buildbots.

I&apos;ve long wanted such an option to run-webkit-tests.  It&apos;s easy enough to do. Just requires adding a flag to DumpRenderTree to have it catch the necessary signals and exit(1) instead of letting the OS catch them for us and calling ReportCrash.  I don&apos;t think we&apos;d want this mode on by default, but it would be useful.

Even if there was just an easy way to renice ReportCrash a few times that would make its behavior way easier to deal with.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>214020</commentid>
    <comment_count>7</comment_count>
    <who name="Ojan Vafai">ojan</who>
    <bug_when>2010-04-19 07:35:56 -0700</bug_when>
    <thetext>(In reply to comment #6)
&gt; (In reply to comment #5)
&gt; &gt; Sounds like a neat idea. It would somewhat reduce the incentive to make your
&gt; &gt; tests fast though. Maybe there could be a &quot;soft&quot; timeout that would result in a
&gt; &gt; non-failure warning, to make slow tests more visible?

This seems like a great idea. If we could take it one step further and show the number of slow tests on the waterfall, that might provide incentive to fix them. What I like about this is that we can be more flexible about the timeout. The current 6 second timeout (12 seconds on debug) is just what happened to seem reasonable given the data from the Chromium bots. 

We can start with something conservative (6 seconds?) and make it more aggressive as we fix the slower tests.

&gt; All timeouts are currently &quot;soft&quot; in that all failures are re-run at the end. 
&gt; Tests which timed out once due to machine load are unlikely to time out twice.

This is half true. If ReportCrash is the problem and your patch causes crashes, then crashes will happen when you retry and tests might timeout if you don&apos;t have sufficient extra cores on your machine.

&gt; &gt; &gt; Also, is there a way we can kill ReportCrash from NRWT? When I run the tests
&gt; &gt; &gt; locally, I frequently will &quot;sudo killall ReportCrash&quot; in a loop. I&apos;d much
&gt; &gt; &gt; rather have NRWT do that for me. The sudo is the problem of course.
&gt; &gt; 
&gt; &gt; I don&apos;t think that would be a good thing to do. The crash logs are very useful
&gt; &gt; for diagnosing what went wrong, especially on the buildbots.
&gt; 
&gt; I&apos;ve long wanted such an option to run-webkit-tests.  It&apos;s easy enough to do.
&gt; Just requires adding a flag to DumpRenderTree to have it catch the necessary
&gt; signals and exit(1) instead of letting the OS catch them for us and calling
&gt; ReportCrash.  I don&apos;t think we&apos;d want this mode on by default, but it would be
&gt; useful.

Filed bug 37797.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>378177</commentid>
    <comment_count>8</comment_count>
    <who name="Dirk Pranke">dpranke</who>
    <bug_when>2011-04-01 16:18:34 -0700</bug_when>
    <thetext>Okay, running against current time of tree (one year later), we have a grand total of *two* tests that take longer than 6 seconds on Mac Snow Leopard. I&apos;ve marked them as SLOW in the test_expectations file.

I suggest that the defaults of 6 seconds for regular tests and 30 seconds for slow tests is good enough. We can always adjust this if it turns out to be a problem in practice.

For reference old-run-webkit-tests appears to default to 35 seconds and of course doesn&apos;t have a SLOW concept.

Maciej, what do you think?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>379149</commentid>
    <comment_count>9</comment_count>
    <who name="Dirk Pranke">dpranke</who>
    <bug_when>2011-04-04 15:47:24 -0700</bug_when>
    <thetext>Okay, it looks like the mac port of NRWT seems much less happy with the default of six seconds. I&apos;m going to reopen this and change the default to be 35 seconds to match ORWT. 

We can gradually pull the time down as necessary in the future.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>379196</commentid>
    <comment_count>10</comment_count>
      <attachid>88154</attachid>
    <who name="Dirk Pranke">dpranke</who>
    <bug_when>2011-04-04 16:35:00 -0700</bug_when>
    <thetext>Created attachment 88154
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>379269</commentid>
    <comment_count>11</comment_count>
      <attachid>88154</attachid>
    <who name="Tony Chang">tony</who>
    <bug_when>2011-04-04 18:14:56 -0700</bug_when>
    <thetext>Comment on attachment 88154
Patch

This doesn&apos;t impact chromium-mac, right?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>379278</commentid>
    <comment_count>12</comment_count>
    <who name="Dirk Pranke">dpranke</who>
    <bug_when>2011-04-04 18:36:02 -0700</bug_when>
    <thetext>(In reply to comment #11)
&gt; (From update of attachment 88154 [details])
&gt; This doesn&apos;t impact chromium-mac, right?

Correct.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>381041</commentid>
    <comment_count>13</comment_count>
    <who name="Dirk Pranke">dpranke</who>
    <bug_when>2011-04-06 18:47:40 -0700</bug_when>
    <thetext>Committed r83130: &lt;http://trac.webkit.org/changeset/83130&gt;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>88154</attachid>
            <date>2011-04-04 16:35:00 -0700</date>
            <delta_ts>2011-04-04 18:14:56 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-37738-20110404163459.patch</filename>
            <type>text/plain</type>
            <size>1404</size>
            <attacher name="Dirk Pranke">dpranke</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogODI4OTIKZGlmZiAtLWdpdCBhL1Rvb2xzL0NoYW5nZUxvZyBi
L1Rvb2xzL0NoYW5nZUxvZwppbmRleCA3ZmQ5MTI3MjEyMjg1MDI5Y2I1OGRmZGEyYjM4ZjRmMjE4
MzI1YjFiLi45MmY2MmY4MmY1Y2Y3YWZkODRhMjBjY2ZlYWY5M2Y5ODgyYjUyY2YwIDEwMDY0NAot
LS0gYS9Ub29scy9DaGFuZ2VMb2cKKysrIGIvVG9vbHMvQ2hhbmdlTG9nCkBAIC0xLDMgKzEsMTQg
QEAKKzIwMTEtMDQtMDQgIERpcmsgUHJhbmtlICA8ZHByYW5rZUBjaHJvbWl1bS5vcmc+CisKKyAg
ICAgICAgUmV2aWV3ZWQgYnkgTk9CT0RZIChPT1BTISkuCisKKyAgICAgICAgQWRqdXN0IHRoZSBh
cHBsZSB3ZWJraXQgcG9ydCdzIGRlZmF1bHQgdGltZW91dCB0byBtYXRjaAorICAgICAgICB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bGYuX29wdGlvbnMudGltZV9vdXRfbXMgaXMgTm9uZToKKyAgICAgICAgICAgIHNl
bGYuX29wdGlvbnMudGltZV9vdXRfbXMgPSAzNTAwMAogCiAgICAgZGVmIGRlZmF1bHRfY2hpbGRf
cHJvY2Vzc2VzKHNlbGYpOgogICAgICAgICAjIEZJWE1FOiBuZXctcnVuLXdlYmtpdC10ZXN0cyBp
cyB1bnN0YWJsZSBvbiBNYWMgcnVubmluZyBtb3JlIHRoYW4K
</data>
<flag name="review"
          id="80630"
          type_id="1"
          status="+"
          setter="tony"
    />
          </attachment>
      

    </bug>

</bugzilla>