Intermittent layout/style/test/test_dont_use_document_colors.html | color is blocked - got "rgb(255, 255, 0)", expected "rgb(0, 0, 0)"

RESOLVED FIXED in Firefox 55

Status

()

Core
CSS Parsing and Computation
P4
normal
RESOLVED FIXED
9 months ago
9 months ago

People

(Reporter: Treeherder Bug Filer, Assigned: bkelly)

Tracking

(Blocks: 1 bug, {intermittent-failure})

unspecified
mozilla55
intermittent-failure
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox55 fixed)

Details

(Whiteboard: [stockwell fixed:timing])

Attachments

(1 attachment, 1 obsolete attachment)

Comment 1

9 months ago
17 failures in 155 pushes (0.11 failures/push) were associated with this bug yesterday.   

Repository breakdown:
* autoland: 11
* mozilla-inbound: 6

Platform breakdown:
* linux64-stylo-sequential: 10
* linux64-stylo: 5
* windows7-32-vm: 2

For more details, see:
https://brasstacks.mozilla.com/orangefactor/?display=Bug&bugid=1369350&startday=2017-06-01&endday=2017-06-01&tree=all

Comment 2

9 months ago
34 failures in 149 pushes (0.228 failures/push) were associated with this bug yesterday.   

Repository breakdown:
* autoland: 17
* mozilla-inbound: 13
* mozilla-central: 4

Platform breakdown:
* linux64-stylo: 12
* linux64-stylo-sequential: 11
* osx-10-10: 7
* windows7-32-vm: 2
* linux64-ccov: 1
* linux64: 1

For more details, see:
https://brasstacks.mozilla.com/orangefactor/?display=Bug&bugid=1369350&startday=2017-06-02&endday=2017-06-02&tree=all
This doesn't seem stylo-only.  Could something have caused pushPrefEnv to not be reliable?

Comment 4

9 months ago
63 failures in 820 pushes (0.077 failures/push) were associated with this bug in the last 7 days. 

This is the #18 most frequent failure this week.  

** This failure happened more than 30 times this week! Resolving this bug is a high priority. **

** Try to resolve this bug as soon as possible. If unresolved for 2 weeks, the affected test(s) may be disabled. ** 

Repository breakdown:
* autoland: 31
* mozilla-inbound: 25
* mozilla-central: 6
* try: 1

Platform breakdown:
* linux64-stylo-sequential: 25
* linux64-stylo: 22
* osx-10-10: 9
* windows7-32-vm: 4
* linux64-ccov: 1
* linux64: 1
* linux32: 1

For more details, see:
https://brasstacks.mozilla.com/orangefactor/?display=Bug&bugid=1369350&startday=2017-05-29&endday=2017-06-04&tree=all
Priority: -- → P4

Comment 5

9 months ago
22 failures in 148 pushes (0.149 failures/push) were associated with this bug yesterday.   

Repository breakdown:
* autoland: 12
* mozilla-inbound: 8
* try: 1
* mozilla-central: 1

Platform breakdown:
* linux64-stylo: 8
* osx-10-10: 7
* linux64-stylo-sequential: 6
* windows7-32-vm: 1

For more details, see:
https://brasstacks.mozilla.com/orangefactor/?display=Bug&bugid=1369350&startday=2017-06-05&endday=2017-06-05&tree=all
I've been doing some retriggers to isolate this; so far the earliest occurrence I got is on:
https://treeherder.mozilla.org/#/jobs?repo=mozilla-inbound&revision=4e8564ce92d8056d6282a499cac1933f4a90a769&filter-searchStr=stylo-seq+mochitest
but I suspect I'll get one earlier.
thanks for looking into this :dbaron.
Whiteboard: [stockwell needswork]
OK, I think this is a regression from bug 1363829, though it took an unusually large number of retriggers on the exact landing changeset to get a failure, relative to later changesets.

bkelly, any thoughts?
Blocks: 1363829
Flags: needinfo?(bkelly)
(Assignee)

Comment 11

9 months ago
I'll take a look tomorrow, but my guess is that the issue is PushPrefEnv().  It uses a setTimeout(f, 0) to allow preferences to apply before calling its callback.  Speeding up setTimeout(f, 0) slightly may have caused this test to start losing a race there.

Comment 12

9 months ago
22 failures in 132 pushes (0.167 failures/push) were associated with this bug yesterday.   

Repository breakdown:
* mozilla-inbound: 11
* autoland: 7
* mozilla-central: 4

Platform breakdown:
* linux64-stylo-sequential: 11
* linux64-stylo: 6
* osx-10-10: 5

For more details, see:
https://brasstacks.mozilla.com/orangefactor/?display=Bug&bugid=1369350&startday=2017-06-06&endday=2017-06-06&tree=all
(Assignee)

Comment 13

9 months ago
We're probably racing with this nsPresContext timer:

https://dxr.mozilla.org/mozilla-central/source/layout/base/nsPresContext.cpp#1549
Assignee: nobody → bkelly
Status: NEW → ASSIGNED
Flags: needinfo?(bkelly)
(Assignee)

Comment 15

9 months ago
Might as well test a potential test fix as well:

https://treeherder.mozilla.org/#/jobs?repo=try&revision=6c5dd13e704590ee0a36a228c1b90306560f5c61

Note, I'm leaning towards special casing this in the test vs trying to change SpecialPowers.pushPrefEnv().  It seems that this is due to nsPresShell's specific additional delay after preferences are changed and not a general preference thing.  (Assuming my theories all hold up.)
(Assignee)

Comment 16

9 months ago
Created attachment 8875367 [details] [diff] [review]
Add additional delay to test_dont_use_document_colors.html since nsPresShell delays applying prefs. r=dbaron

https://treeherder.mozilla.org/#/jobs?repo=try&revision=53ca4d5205928ec9afb78346e72128873e30c64d
(Assignee)

Comment 17

9 months ago
Comment on attachment 8875367 [details] [diff] [review]
Add additional delay to test_dont_use_document_colors.html since nsPresShell delays applying prefs. r=dbaron

This test is racing the setTimeout(f, 0) after built in to the pushPrefEnv() call against an nsPresContext specific nsITimer:

https://dxr.mozilla.org/mozilla-central/source/layout/base/nsPresContext.cpp#771

The nsPresContext is using a 0ms nsITimer which will round trip through the TimerThread.

The setTimeout(f, 0) can now result in a simple NS_DispatchToCurrentThread(r).

This patch makes the test wait for a setTimeout(f, 1) to account for the nsITimer in nsPresContext.  I think this is appropriate since the extra delay is only needed for nsPresContext preferences and not all preferences in general.
Attachment #8875367 - Flags: review?(dbaron)
Attachment #8875367 - Flags: review?(dbaron) → review+

Comment 18

9 months ago
36 failures in 182 pushes (0.198 failures/push) were associated with this bug yesterday.   

Repository breakdown:
* mozilla-inbound: 20
* autoland: 15
* mozilla-central: 1

Platform breakdown:
* linux64-stylo-sequential: 16
* linux64-stylo: 13
* osx-10-10: 3
* windows7-32-vm: 2
* windows8-64: 1
* linux64: 1

For more details, see:
https://brasstacks.mozilla.com/orangefactor/?display=Bug&bugid=1369350&startday=2017-06-07&endday=2017-06-07&tree=all
(Assignee)

Comment 19

9 months ago
Created attachment 8875699 [details] [diff] [review]
Add additional delay to test_dont_use_document_colors.html since nsPresContext delays applying prefs. r=dbaron

Updated the comments and commit message to reference nsPresContext correctly.  I had previously written nsPresShell.
Attachment #8875367 - Attachment is obsolete: true
Attachment #8875699 - Flags: review+

Comment 20

9 months ago
Pushed by bkelly@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/b8c1a978f8fe
Add additional delay to test_dont_use_document_colors.html since nsPresContext delays applying prefs. r=dbaron

Comment 21

9 months ago
27 failures in 172 pushes (0.157 failures/push) were associated with this bug yesterday.   

Repository breakdown:
* autoland: 20
* mozilla-inbound: 4
* mozilla-central: 2
* try: 1

Platform breakdown:
* linux64-stylo-sequential: 11
* linux64-stylo: 10
* osx-10-10: 3
* windows7-32-vm: 2
* linux32: 1

For more details, see:
https://brasstacks.mozilla.com/orangefactor/?display=Bug&bugid=1369350&startday=2017-06-08&endday=2017-06-08&tree=all

Comment 22

9 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/b8c1a978f8fe
Status: ASSIGNED → RESOLVED
Last Resolved: 9 months ago
status-firefox55: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Whiteboard: [stockwell needswork] → [stockwell fixed:timing]

Comment 23

9 months ago
109 failures in 864 pushes (0.126 failures/push) were associated with this bug in the last 7 days. 

This is the #10 most frequent failure this week. 

** This failure happened more than 75 times this week! Resolving this bug is a very high priority. **

** Try to resolve this bug as soon as possible. If unresolved for 1 week, the affected test(s) may be disabled. **  

Repository breakdown:
* autoland: 54
* mozilla-inbound: 43
* mozilla-central: 8
* try: 4

Platform breakdown:
* linux64-stylo-sequential: 45
* linux64-stylo: 37
* osx-10-10: 18
* windows7-32-vm: 5
* linux64: 2
* windows8-64: 1
* linux32: 1

For more details, see:
https://brasstacks.mozilla.com/orangefactor/?display=Bug&bugid=1369350&startday=2017-06-05&endday=2017-06-11&tree=all
You need to log in before you can comment on or make changes to this bug.