9,900 instances of "have unconstrained inline-size; this should only result from very large sizes, not attempts at intrinsic inline-size calculation: 'aContainingBlockISize != NS_UNCONSTRAINEDSIZE'" emitted from layout/base/nsLayoutUtils.cpp during linux6

RESOLVED FIXED in Firefox 46

Status

()

defect
RESOLVED FIXED
4 years ago
3 years ago

People

(Reporter: erahm, Assigned: erahm)

Tracking

(Blocks 1 bug)

Trunk
mozilla46
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox44 affected, firefox46 fixed)

Details

Attachments

(2 attachments)

+++ This bug was initially created as a clone of Bug #1204585 +++

It looks like the tests from bug 1204585 introduced ~1600 new warnings. I imagine the fix is similar to bug 1184295 where we set a size for the body element.

> 1740 [NNNNN] WARNING: have unconstrained inline-size; this should only result from very large sizes, not attempts at intrinsic inline-size calculation: 'aContainingBlockISize != NS_UNCONSTRAINEDSIZE', file layout/base/nsLayoutUtils.cpp, line 4796

This warning [1] shows up in the following test suites:

> mozilla-central_ubuntu64_vm-debug_test-reftest-2-bm123-tests1-linux64-build26.txt:856
> mozilla-central_ubuntu64_vm-debug_test-reftest-e10s-1-bm117-tests1-linux64-build5.txt:760
> mozilla-central_ubuntu64_vm-debug_test-reftest-e10s-2-bm67-tests1-linux64-build6.txt:48
> mozilla-central_ubuntu64_vm-debug_test-reftest-4-bm54-tests1-linux64-build18.txt:48
> mozilla-central_ubuntu64_vm-debug_test-crashtest-e10s-bm52-tests1-linux64-build6.txt:14
> mozilla-central_ubuntu64_vm-debug_test-crashtest-bm120-tests1-linux64-build7.txt:14

It shows up in 19 tests. A few of the most prevalent:

> 384 - file:///builds/slave/test/build/tests/reftest/tests/layout/reftests/css-grid/grid-abspos-items-005.html
> 288 - file:///builds/slave/test/build/tests/reftest/tests/layout/reftests/css-grid/grid-abspos-items-010.html
> 144 - file:///builds/slave/test/build/tests/reftest/tests/layout/reftests/css-grid/grid-abspos-items-009.html
> 144 - file:///builds/slave/test/build/tests/reftest/tests/layout/reftests/css-grid/grid-abspos-items-008.html
> 144 - file:///builds/slave/test/build/tests/reftest/tests/layout/reftests/css-grid/grid-abspos-items-007.html
> 144 - file:///builds/slave/test/build/tests/reftest/tests/layout/reftests/css-grid/grid-abspos-items-006.html
> 144 - file:///builds/slave/test/build/tests/reftest/tests/layout/reftests/css-grid/grid-abspos-items-004.html
> 144 - file:///builds/slave/test/build/tests/reftest/tests/layout/reftests/css-grid/grid-abspos-items-003.html
> 40 - file:///builds/slave/test/build/tests/reftest/tests/layout/reftests/floats/orthogonal-floats-1b.html
> 40 - file:///builds/slave/test/build/tests/reftest/tests/layout/reftests/floats/orthogonal-floats-1a.html

[1] https://hg.mozilla.org/mozilla-central/annotate/5abe3c4deab9/layout/base/nsLayoutUtils.cpp#l4796
Mats, can you take a look at this?
Flags: needinfo?(mats)
This is currently the #3 most verbose warning during testing.
Posted patch fixSplinter Review
Let's suppress this warning if the parent has an an orthogonal writing-mode.
IIUC, reflowing with an unconstrained inline-size in that case is *legitimate*.
Assignee: nobody → mats
Flags: needinfo?(mats)
Attachment #8687567 - Flags: review?(jfkthame)
Before we resort to just silencing this, can we look at the callsites that are triggering it and consider whether we should be detecting the orthogonal-block case and passing a different value as aContainingBlockISize?

I'm concerned that we may end up using NS_UNCONSTRAINEDSIZE in the computations (e.g in case NS_STYLE_WIDTH_AVAILABLE), which isn't likely to end well... the warning here is supposed to be alerting us to things like this. In general, we try to come up with a valid (non-unconstrained) inline size when reflowing an orthogonal block; e.g. at [1].

Or as an alternative to this patch, how about moving this warning down into the specific codepaths that actually do computations with aContainingBlockISize? That should reduce the incidence, while keeping it enabled for the cases that we ought to look at more deeply.

[1] https://hg.mozilla.org/mozilla-central/annotate/5abe3c4deab9/layout/generic/nsHTMLReflowState.cpp#l198
This has gotten more frequent and is now the #2 most verbose warning during testing. Latest stats:

> 8724 [NNNNN] WARNING: have unconstrained inline-size; this should only result from very large sizes, not attempts at intrinsic inline-size calculation: 'aContainingBlockISize != NS_UNCONSTRAINEDSIZE', file layout/base/nsLayoutUtils.cpp, line 4993

This warning [1] shows up in the following test suites:

> mozilla-central_ubuntu64_vm-debug_test-reftest-2-bm54-tests1-linux64-build1.txt:4530
> mozilla-central_ubuntu64_vm-debug_test-reftest-e10s-1-bm116-tests1-linux64-build25.txt:4070
> mozilla-central_ubuntu64_vm-debug_test-reftest-e10s-2-bm68-tests1-linux64-build7.txt:48
> mozilla-central_ubuntu64_vm-debug_test-reftest-4-bm68-tests1-linux64-build6.txt:48
> mozilla-central_ubuntu64_vm-debug_test-crashtest-e10s-bm115-tests1-linux64-build3.txt:14
> mozilla-central_ubuntu64_vm-debug_test-crashtest-bm118-tests1-linux64-build33.txt:14

It shows up in       26 tests. A few of the most prevalent:

> 1650 - file:///builds/slave/test/build/tests/reftest/tests/layout/reftests/css-grid/grid-item-justify-002.html
> 1650 - file:///builds/slave/test/build/tests/reftest/tests/layout/reftests/css-grid/grid-item-align-002.html
> 840 - file:///builds/slave/test/build/tests/reftest/tests/layout/reftests/css-grid/grid-item-stretch-001.html
> 800 - file:///builds/slave/test/build/tests/reftest/tests/layout/reftests/css-grid/grid-justify-content-001.html
> 720 - file:///builds/slave/test/build/tests/reftest/tests/layout/reftests/css-grid/grid-item-justify-001.html
> 688 - file:///builds/slave/test/build/tests/reftest/tests/layout/reftests/css-grid/grid-align-content-001.html
> 540 - file:///builds/slave/test/build/tests/reftest/tests/layout/reftests/css-grid/grid-item-align-001.html
> 384 - file:///builds/slave/test/build/tests/reftest/tests/layout/reftests/css-grid/grid-abspos-items-010.html
> 336 - file:///builds/slave/test/build/tests/reftest/tests/layout/reftests/css-grid/grid-abspos-items-005.html
> 192 - file:///builds/slave/test/build/tests/reftest/tests/layout/reftests/css-grid/grid-abspos-items-006.html

[1] https://hg.mozilla.org/mozilla-central/annotate/a523d4c7efe2/layout/base/nsLayoutUtils.cpp#l4993
Summary: 1,700 instances of "have unconstrained inline-size; this should only result from very large sizes → 8,700 instances of "have unconstrained inline-size; this should only result from very large sizes
NI for comment 4.
Flags: needinfo?(mats)
This is now the #1 most verbose warning during testing.
Summary: 8,700 instances of "have unconstrained inline-size; this should only result from very large sizes → 9,500 instances of "have unconstrained inline-size; this should only result from very large sizes
This continues to be #1 and has become somewhat more verbose.
Summary: 9,500 instances of "have unconstrained inline-size; this should only result from very large sizes → 9,900 instances of "have unconstrained inline-size; this should only result from very large sizes
This continues to be #1.
This just switches over to the layout specific LAYOUT_WARN_IF_FALSE.
Attachment #8704323 - Flags: review?(jfkthame)
Comment on attachment 8704323 [details] [diff] [review]
Silence unconstrained size warning by default

Review of attachment 8704323 [details] [diff] [review]:
-----------------------------------------------------------------

OK -- I guess this is fine for now, given that we may not get around to looking into this more deeply for a while.

::: layout/base/nsLayoutUtils.cpp
@@ +4889,5 @@
>    NS_PRECONDITION(aFrame, "non-null frame expected");
>    NS_PRECONDITION(aRenderingContext, "non-null rendering context expected");
> +  LAYOUT_WARN_IF_FALSE(aContainingBlockISize != NS_UNCONSTRAINEDSIZE,
> +                       "have unconstrained inline-size; this should only result from "
> +                        "very large sizes, not attempts at intrinsic inline-size "

Looks like the indent is off-by-one here.
Attachment #8704323 - Flags: review?(jfkthame) → review+
https://hg.mozilla.org/mozilla-central/rev/ffc8d6de8f2a
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla46
Looks like Eric fixed this.  Thanks!
Assignee: mats → erahm
Flags: needinfo?(mats)
Attachment #8687567 - Flags: review?(jfkthame)
You need to log in before you can comment on or make changes to this bug.