Closed Bug 1664372 Opened 4 years ago Closed 4 years ago

Intermittent /css/css-values/ch-pseudo-recalc-on-font-load.html | ch in pseudo-element ::before should be recalculated after loading a web font - assert_approx_equals: expected 25 +/- 0.1 but got 15

Categories

(Core :: CSS Parsing and Computation, defect, P5)

defect

Tracking

()

RESOLVED FIXED
84 Branch
Tracking Status
firefox84 --- fixed

People

(Reporter: intermittent-bug-filer, Assigned: emilio)

References

Details

(Keywords: intermittent-failure, Whiteboard: [stockwell unknown])

Attachments

(2 files)

Filed by: btara [at] mozilla.com
Parsed log: https://treeherder.mozilla.org/logviewer.html#?job_id=315405002&repo=autoland
Full log: https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/ZCpMEdBPTXqUTZBEWwtTvw/runs/0/artifacts/public/logs/live_backing.log


[task 2020-09-11T04:42:53.384Z] 04:42:53 INFO - TEST-START | /css/css-values/ch-pseudo-recalc-on-font-load.html
[task 2020-09-11T04:42:53.384Z] 04:42:53 INFO - Closing window 72
[task 2020-09-11T04:42:53.489Z] 04:42:53 INFO - PID 1168 | ###!!! [Parent][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost
[task 2020-09-11T04:42:53.631Z] 04:42:53 INFO - PID 1168 | [2170, Unnamed thread 7f579fb5d5e0] WARNING: XPCOM objects created/destroyed from static ctor/dtor: file /builds/worker/checkouts/gecko/xpcom/base/nsTraceRefcnt.cpp, line 202
[task 2020-09-11T04:42:53.633Z] 04:42:53 INFO - PID 1168 | ### XPCOM_MEM_BLOAT_LOG defined -- logging bloat/leaks to /tmp/tmppzIc_x/runtests_leaks_1099.log
[task 2020-09-11T04:42:53.634Z] 04:42:53 INFO - PID 1168 | [2170, Unnamed thread 7f579fb5d5e0] WARNING: XPCOM objects created/destroyed from static ctor/dtor: file /builds/worker/checkouts/gecko/xpcom/base/nsTraceRefcnt.cpp, line 202
[task 2020-09-11T04:42:53.636Z] 04:42:53 INFO - PID 1168 | [2170, Main Thread] WARNING: XPCOM_MEM_BLOAT_LOG is set, disabling native allocations.: file /builds/worker/checkouts/gecko/tools/profiler/core/platform.cpp, line 246
[task 2020-09-11T04:42:53.760Z] 04:42:53 INFO - PID 1168 | [Child 2170, Main Thread] WARNING: could not set real-time limit in CubebUtils::InitLibrary: file /builds/worker/checkouts/gecko/dom/media/CubebUtils.cpp, line 626
[task 2020-09-11T04:42:54.027Z] 04:42:54 INFO - PID 1837 | [Parent 1837, Main Thread] WARNING: Suboptimal indexes for the SQL statement 0x7fa4fa7ee2e0 (http://mzl.la/1FuID0j).: file /builds/worker/checkouts/gecko/storage/mozStoragePrivateHelpers.cpp, line 113
[task 2020-09-11T04:42:54.468Z] 04:42:54 INFO - PID 1168 | [Child 1801, Main Thread] WARNING: Extra shutdown CC: 'i < NORMAL_SHUTDOWN_COLLECTIONS', file /builds/worker/checkouts/gecko/xpcom/base/nsCycleCollector.cpp, line 3359
[task 2020-09-11T04:42:54.496Z] 04:42:54 INFO - PID 1168 | [Child 1801, Main Thread] WARNING: NS_ENSURE_TRUE(Preferences::InitStaticMembers()) failed: file /builds/worker/checkouts/gecko/modules/libpref/Preferences.cpp, line 4286
[task 2020-09-11T04:42:54.595Z] 04:42:54 INFO -
[task 2020-09-11T04:42:54.597Z] 04:42:54 INFO - TEST-UNEXPECTED-FAIL | /css/css-values/ch-pseudo-recalc-on-font-load.html | ch in pseudo-element ::before should be recalculated after loading a web font - assert_approx_equals: expected 25 +/- 0.1 but got 15
[task 2020-09-11T04:42:54.598Z] 04:42:54 INFO - @http://web-platform.test:8000/css/css-values/ch-pseudo-recalc-on-font-load.html:75:31
[task 2020-09-11T04:42:54.599Z] 04:42:54 INFO - Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:1977:25
[task 2020-09-11T04:42:54.599Z] 04:42:54 INFO - @http://web-platform.test:8000/css/css-values/ch-pseudo-recalc-on-font-load.html:73:23
[task 2020-09-11T04:42:54.599Z] 04:42:54 INFO -
[task 2020-09-11T04:42:54.599Z] 04:42:54 INFO - TEST-UNEXPECTED-FAIL | /css/css-values/ch-pseudo-recalc-on-font-load.html | ch in pseudo-element ::after should be recalculated after loading a web font - assert_approx_equals: expected 25 +/- 0.1 but got 15
[task 2020-09-11T04:42:54.599Z] 04:42:54 INFO - @http://web-platform.test:8000/css/css-values/ch-pseudo-recalc-on-font-load.html:75:31
[task 2020-09-11T04:42:54.599Z] 04:42:54 INFO - Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:1977:25
[task 2020-09-11T04:42:54.599Z] 04:42:54 INFO - @http://web-platform.test:8000/css/css-values/ch-pseudo-recalc-on-font-load.html:73:23
[task 2020-09-11T04:42:54.599Z] 04:42:54 INFO -
[task 2020-09-11T04:42:54.599Z] 04:42:54 INFO - TEST-PASS | /css/css-values/ch-pseudo-recalc-on-font-load.html | ch in pseudo-element ::first-letter should be recalculated after loading a web font
[task 2020-09-11T04:42:54.599Z] 04:42:54 INFO - TEST-UNEXPECTED-FAIL | /css/css-values/ch-pseudo-recalc-on-font-load.html | ch in pseudo-element ::first-line should be recalculated after loading a web font - assert_approx_equals: expected 25 +/- 0.1 but got 15
[task 2020-09-11T04:42:54.600Z] 04:42:54 INFO - @http://web-platform.test:8000/css/css-values/ch-pseudo-recalc-on-font-load.html:75:31
[task 2020-09-11T04:42:54.600Z] 04:42:54 INFO - Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:1977:25
[task 2020-09-11T04:42:54.600Z] 04:42:54 INFO - @http://web-platform.test:8000/css/css-values/ch-pseudo-recalc-on-font-load.html:73:23
[task 2020-09-11T04:42:54.600Z] 04:42:54 INFO -
[task 2020-09-11T04:42:54.600Z] 04:42:54 INFO - TEST-UNEXPECTED-FAIL | /css/css-values/ch-pseudo-recalc-on-font-load.html | ch in pseudo-element ::marker should be recalculated after loading a web font - assert_approx_equals: expected 25 +/- 0.1 but got 15
[task 2020-09-11T04:42:54.600Z] 04:42:54 INFO - @http://web-platform.test:8000/css/css-values/ch-pseudo-recalc-on-font-load.html:75:31
[task 2020-09-11T04:42:54.600Z] 04:42:54 INFO - Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:1977:25
[task 2020-09-11T04:42:54.600Z] 04:42:54 INFO - @http://web-platform.test:8000/css/css-values/ch-pseudo-recalc-on-font-load.html:73:23
[task 2020-09-11T04:42:54.600Z] 04:42:54 INFO - TEST-OK | /css/css-values/ch-pseudo-recalc-on-font-load.html | took 1215ms

Do you know what revived this issue?

Flags: needinfo?(emilio)

I think Jonathan made some recent changes to font loading that may have caused this?

Flags: needinfo?(emilio) → needinfo?(jfkthame)

This test is permaorange on Android when run under a simulated e10s-multi-by-default configuration. I cannot land e10s-multi without disabling this test on Android, or fixing the root cause. If I cannot land e10s-multi on Android, then we will not be ready for important Fission work. Can we please get somebody to take a look into this?

Flags: needinfo?(svoisen)

Pinged jfkthame on Matrix; will take a look.

Flags: needinfo?(svoisen)

(In reply to Emilio Cobos Álvarez (:emilio) from comment #4)

I think Jonathan made some recent changes to font loading that may have caused this?

This doesn't seem to be a recent regression; the testcase is unreliable for me in local testing even if I go back to a much earlier release. I'll attach a simplified example that shows the flakiness in manual testing.

Attached file Simplified example

This is based on the wpt testcase, with the actual test code removed so it just loads the document and applies the custom font (Ahem).

When the font finishes loading, the test text should be resized based on the new ch unit, but I'm not seeing this happen on initial load (or Shift-Reload); but if I then reload the page, or force a reflow by zooming, the rendering corrects itself.

If I explicitly preload the font using

customFont.load().then(() => document.fonts.add(customFont));

then it renders correctly on initial load, but AFAICS this shouldn't be necessary.

So it appears that we're failing to recompute styles properly when the font-load completes.

Flags: needinfo?(jfkthame)

(In reply to Aaron Klotz [:aklotz] from comment #10)

This test is permaorange on Android when run under a simulated e10s-multi-by-default configuration. I cannot land e10s-multi without disabling this test on Android, or fixing the root cause. If I cannot land e10s-multi on Android, then we will not be ready for important Fission work. Can we please get somebody to take a look into this?

Given that we seem to have a pre-existing, non-Android-specific issue here, I think you should feel free to disable the test on Android if that'll unblock your other work.

Rather than disabling, marking it as [PASS, FAIL] on android would be preferable, so that we at least run the tests. I can poke at the invalidation issue a bit though.

Assignee: nobody → emilio

We were only looking at the given frame's style, which is not
sufficient for this case.

Assignee: nobody → emilio
Status: NEW → ASSIGNED

Hah, I had a pending self-ni? to investigate this in bug 1614853...

Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/b5d69a2e7396
Fix font loading invalidation to account for metrics coming from the parent style. r=jfkthame
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 84 Branch
See Also: → 1675950
Regressions: 1675950
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: