The default bug view has changed. See this FAQ.

mochitest-plain: test_domWindowUtils.html fails intermittently

RESOLVED FIXED in mozilla1.9.3a2

Status

()

Core
DOM
--
minor
RESOLVED FIXED
8 years ago
4 years ago

People

(Reporter: sgautherie, Assigned: bz)

Tracking

({intermittent-failure})

Trunk
mozilla1.9.3a2
intermittent-failure
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(status1.9.2 .2-fixed, status1.9.1 .9-fixed)

Details

(URL)

Attachments

(1 attachment)

(Reporter)

Description

8 years ago
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]
}
(Reporter)

Updated

8 years ago
Blocks: 438871
Whiteboard: [orange]

Comment 1

8 years ago
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox3.5-Unittest/1252094822.1252096869.8026.gz&fulltext=1
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
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
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

7 years ago
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

7 years ago
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

7 years ago
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

7 years ago
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

7 years ago
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

7 years ago
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

7 years ago
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

7 years ago
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
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
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1266632216.1266633906.16976.gz

http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1266632330.1266632846.13939.gz

http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1266633154.1266633623.16243.gz

http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1266614437.1266617673.30749.gz

http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1266621502.1266621912.13635.gz

This is permaorange on Windows.
OS: Linux → All
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.
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
Attachment #427903 - Flags: review?(gavin.sharp)
(Reporter)

Comment 16

7 years ago
(In reply to comment #15)
> Created an attachment (id=427903) [details]
> The fix I just pushed

http://hg.mozilla.org/mozilla-central/rev/1d2b78587a8a
status1.9.1: --- → ?
status1.9.2: --- → ?
Version: 1.9.1 Branch → Trunk
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.
Attachment #427903 - Flags: review?(gavin.sharp) → review+
Pushed a comment as http://hg.mozilla.org/mozilla-central/rev/975a17a14ec7
Status: ASSIGNED → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
(Reporter)

Updated

7 years ago
Flags: in-testsuite+
Keywords: checkin-needed
Whiteboard: [orange] → [c-n: to m-1.9.2 and m-1.9.1] [orange]
Target Milestone: --- → mozilla1.9.3a2
(Reporter)

Comment 19

7 years ago
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
Attachment #427903 - Attachment description: The fix I just pushed → The fix I just pushed [Checkin: Comment 16+18 & 19]
(Reporter)

Updated

7 years ago
status1.9.2: ? → .2-fixed
Whiteboard: [c-n: to m-1.9.2 and m-1.9.1] [orange] → [c-n: to m-1.9.1] [orange]
(Reporter)

Comment 20

7 years ago
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
Attachment #427903 - Attachment description: The fix I just pushed [Checkin: Comment 16+18 & 19] → The fix I just pushed [Checkin: Comment 16+18 & 19 & 20]
(Reporter)

Updated

7 years ago
status1.9.1: ? → .9-fixed
Keywords: checkin-needed
Hardware: x86 → All
Whiteboard: [c-n: to m-1.9.1] [orange] → [orange]
Keywords: intermittent-failure
Whiteboard: [orange]
You need to log in before you can comment on or make changes to this bug.