Last Comment Bug 513146 - mochitest-plain: test_domWindowUtils.html fails intermittently
: mochitest-plain: test_domWindowUtils.html fails intermittently
Status: RESOLVED FIXED
: intermittent-failure
Product: Core
Classification: Components
Component: DOM (show other bugs)
: Trunk
: All All
: -- minor (vote)
: mozilla1.9.3a2
Assigned To: Boris Zbarsky [:bz]
:
Mentors:
http://mxr.mozilla.org/mozilla1.9.1/s...
Depends on:
Blocks: 438871 461803
  Show dependency treegraph
 
Reported: 2009-08-27 17:26 PDT by Serge Gautherie (:sgautherie)
Modified: 2012-11-25 19:31 PST (History)
5 users (show)
bugzillamozillaorg_serge_20140323: in‑testsuite+
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
.2-fixed
.9-fixed


Attachments
The fix I just pushed [Checkin: Comment 16+18 & 19 & 20] (1.21 KB, patch)
2010-02-19 20:10 PST, Boris Zbarsky [:bz]
gavin.sharp: review+
Details | Diff | Review

Description Serge Gautherie (:sgautherie) 2009-08-27 17:26:38 PDT
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox3.5/1251411556.1251418059.10690.gz
Linux mozilla-1.9.1 unit test on 2009/08/27 15:19:16
{
... | at index 0 for data [0, 100] - got null, expected [object HTMLDivElement]
... | at index 1 for data [9, 109] - got null, expected [object HTMLDivElement]
... | at index 4 for data [0, 100, true, false] - got null, expected [object HTMLDivElement]
... | at index 5 for data [9, 109, true, false] - got null, expected [object HTMLDivElement]
... | at index 6 for data [0, 100000, true, false] - got null, expected [object HTMLDivElement]
... | at index 7 for data [9, 100009, true, false] - got null, expected [object HTMLDivElement]
}
Comment 2 Daniel Holbert [:dholbert] 2009-11-06 15:52:18 PST
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox3.5-Unittest/1257186501.1257188837.6044.gz
Linux mozilla-1.9.1 test mochitests on 2009/11/02 10:28:21
Comment 3 Boris Zbarsky [:bz] 2010-02-19 10:06:53 PST
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1266601481.1266602103.10239.gz
OS X 10.5.2 mozilla-central opt test mochitests-3/5 on 2010/02/19 09:44:41  
s: bm-xserve17
Comment 4 Boris Zbarsky [:bz] 2010-02-19 10:43:55 PST
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1266602287.1266604723.18310.gz
WINNT 5.2 mozilla-central debug test mochitests-3/5 on 2010/02/19 09:58:07  
s: win32-slave18
Comment 5 David Dahl :ddahl 2010-02-19 11:43:05 PST
OS X 10.5.2 mozilla-central opt test mochitests-3/5 [testfailed] Started 11:23, finished 11:36
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1266607388.1266608141.31755.gz
Comment 6 David Dahl :ddahl 2010-02-19 11:49:38 PST
Linux mozilla-central opt test mochitests-3/5 [testfailed] Started 11:29, finished 11:47
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1266607768.1266608765.1650.gz
Comment 7 David Dahl :ddahl 2010-02-19 12:35:20 PST
OS X 10.5.2 mozilla-central opt test mochitests-3/5 [testfailed] Started 11:56, finished 12:12

http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1266609416.1266610318.6170.gz
Comment 8 David Dahl :ddahl 2010-02-19 12:45:53 PST
WINNT 5.2 mozilla-central opt test mochitests-3/5 [testfailed] Started 12:09, finished 12:21
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1266601481.1266602103.10239.gz
Comment 9 David Dahl :ddahl 2010-02-19 14:52:08 PST
WINNT 5.2 mozilla-central debug test mochitests-3/5 [testfailed] Started 13:56, finished 14:34
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1266616575.1266618835.2312.gz
Comment 10 David Dahl :ddahl 2010-02-19 15:26:49 PST
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1266617159.1266619251.3656.gz

WINNT 5.2 mozilla-central debug test mochitests-3/5 [testfailed] Started 14:05, finished 14:41
Comment 11 David Dahl :ddahl 2010-02-19 15:35:49 PST
OS X 10.5.2 mozilla-central opt test mochitests-3/5 [testfailed] Started 14:44, finished 14:53

http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1266619455.1266619967.6279.gz
Comment 12 David Dahl :ddahl 2010-02-19 18:13:26 PST
OS X 10.5.2 mozilla-central opt test mochitests-3/5 [testfailed] Started 17:48, finished 17:58

http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1266630528.1266631064.8888.gz
Comment 13 Daniel Holbert [:dholbert] 2010-02-19 18:18:31 PST
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1266631570.1266632012.11393.gz
Linux mozilla-central opt test mochitests-3/5 on 2010/02/19 18:06:10
s: moz2-linux-slave21
Comment 15 Boris Zbarsky [:bz] 2010-02-19 20:10:34 PST
Created attachment 427903 [details] [diff] [review]
The fix I just pushed
[Checkin: Comment 16+18 & 19 & 20]

This test went perma-orange today when I checked in reflows off refresh driver.

The reason for this (and for the previous failures) is that the test structure is basically like this:

  <link rel="stylesheet" href="something">
  <!-- some other stuff -->
  <div style="position it somewhere">
  <script>
    function f() {
      // rely on the div being positioned at the right somewhere without
      // flushing layout first
    }
    f();
  </script>

If the script runs before the <div> has been initially laid out, the test fails.  The only reason it sometimes passed before is that we sometimes parsed the <div> before the stylesheet had finished loading.  When we then parsed the <script>, it blocked on the stylesheet load, went back out to the event loop, and we processed the div layout before the script executed.  If the race went the other way, so the sheet loaded before we parsed the <div>, then the test failed.

With reflow off refresh driver, we started failing unless we ended up hanging out in the event loop waiting for the sheet load for more than 20ms or so.  Which was most of the time.

The fix is simple: just don't run the test function until onload, at which point the layout should be up-to-date.  The other option (which doesn't rely on that onload behavior, in case we ever want to switch to the cheating Webkit way) is an explicit flush at the start of the test function.  Gavin, let me know if you'd prefer that.
Comment 16 Serge Gautherie (:sgautherie) 2010-02-19 20:27:23 PST
(In reply to comment #15)
> Created an attachment (id=427903) [details]
> The fix I just pushed

http://hg.mozilla.org/mozilla-central/rev/1d2b78587a8a
Comment 17 :Gavin Sharp [email: gavin@gavinsharp.com] 2010-02-19 20:52:43 PST
Comment on attachment 427903 [details] [diff] [review]
The fix I just pushed
[Checkin: Comment 16+18 & 19 & 20]

A comment explaining why we're waiting for onload might not hurt, but I think this is fine.
Comment 18 Boris Zbarsky [:bz] 2010-02-22 20:02:22 PST
Pushed a comment as http://hg.mozilla.org/mozilla-central/rev/975a17a14ec7
Comment 19 Serge Gautherie (:sgautherie) 2010-02-27 04:43:26 PST
Comment on attachment 427903 [details] [diff] [review]
The fix I just pushed
[Checkin: Comment 16+18 & 19 & 20]


http://hg.mozilla.org/releases/mozilla-1.9.2/rev/6315d8b83a54
Comment 20 Serge Gautherie (:sgautherie) 2010-02-28 06:46:35 PST
Comment on attachment 427903 [details] [diff] [review]
The fix I just pushed
[Checkin: Comment 16+18 & 19 & 20]


(In reply to comment #19)
> http://hg.mozilla.org/releases/mozilla-1.9.2/rev/6315d8b83a54

Sorry, I pushed with my name...

***

http://hg.mozilla.org/releases/mozilla-1.9.1/rev/dec3225c7aaf

Note You need to log in before you can comment on or make changes to this bug.