New issue
Advanced search Search tips

Issue 813221 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Feb 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug-Regression

Blocking:
issue 771643



Sign in to add a comment

[SPv175] PrintPreviewSettingsSectionsTest.SetCopies (browser_tests) crashes on linux-chromeos-rel

Project Member Reported by wangxianzhu@chromium.org, Feb 16 2018

Issue description

https://ci.chromium.org/buildbot/tryserver.chromium.chromiumos/linux-chromeos-rel/62332

[12858:12858:0216/140437.603313:WARNING:CONSOLE(0)] "Styling master document from stylesheets defined in HTML Imports is deprecated, and is planned to be removed in M67, around May 2018. Please refer to https://goo.gl/EGXzpw for possible migration paths.", source:  (0)
[12858:12858:0216/140437.806931:INFO:CONSOLE(1225)] "Running TestCase PrintPreviewSettingsSectionsTest.SetCopies", source: test_api.js (1225)
[1:1:0216/140438.181112:FATAL:PaintChunksToCcLayer.cpp(164)] Check failed: state_stack_.size() && state_stack_.back().type == StateEntry::PairedType::kClip. Error: Chunk has a clip that escaped its effect's clip.
#0 0x0000041a24ec base::debug::StackTrace::StackTrace()
#1 0x0000041bd17b logging::LogMessage::~LogMessage()
#2 0x0000077af583 blink::(anonymous namespace)::ConversionContext::SwitchToClip()
#3 0x0000077ae568 blink::PaintChunksToCcLayer::ConvertInto()
#4 0x000007797e08 blink::GraphicsLayer::PaintContents()
#5 0x0000096620f5 cc_blink::WebContentLayerImpl::PaintContentsToDisplayList()
#6 0x000009662132 cc_blink::WebContentLayerImpl::PaintContentsToDisplayList()
#7 0x00000937adee cc::PictureLayer::Update()
#8 0x000005cdc1aa cc::LayerTreeHost::PaintContent()
#9 0x000005cdb527 cc::LayerTreeHost::DoUpdateLayers()
#10 0x000005cdac20 cc::LayerTreeHost::UpdateLayers()
#11 0x000005ce3020 cc::ProxyMain::BeginMainFrame()
#12 0x000005d07912 _ZN4base8internal12InvokeHelperILb1EvE8MakeItSoIMN2cc9ProxyMainEFvNSt3__110unique_ptrINS4_28BeginMainFrameAndCommitStateENS6_14default_deleteIS8_EEEEENS_7WeakPtrIS5_EEJSB_EEEvOT_OT0_DpOT1_
#13 0x000005d07801 _ZN4base8internal7InvokerINS0_9BindStateIMN2cc9ProxyMainEFvNSt3__110unique_ptrINS3_28BeginMainFrameAndCommitStateENS5_14default_deleteIS7_EEEEEJNS_7WeakPtrIS4_EENS0_13PassedWrapperISA_EEEEEFvvEE7RunOnceEPNS0_13BindStateBaseE
#14 0x0000041a2ca5 base::debug::TaskAnnotator::RunTask()
#15 0x00000404bf14 blink::scheduler::internal::ThreadControllerImpl::DoWork()
#16 0x000000715a3b _ZN4base8internal7InvokerINS0_9BindStateIMN12_GLOBAL__N_116SimpleHttpServerEFviEJNS_7WeakPtrIS4_EEiEEEFvvEE7RunOnceEPNS0_13BindStateBaseE
#17 0x0000006e7e8f (anonymous namespace)::ChromeServiceWorkerManifestFetchTest::ManifestCallbackAndRun()
#18 0x000000715517 _ZN4base8internal7InvokerINS0_9BindStateIMN12_GLOBAL__N_116SimpleHttpServer10ConnectionEFvvEJNS_7WeakPtrIS5_EEEEEFvvEE7RunOnceEPNS0_13BindStateBaseE
#19 0x0000041a2ca5 base::debug::TaskAnnotator::RunTask()
#20 0x00000425bb09 base::internal::IncomingTaskQueue::RunTask()
#21 0x0000041c4b0b base::MessageLoop::RunTask()
#22 0x0000041c4e9a base::MessageLoop::DeferOrRunPendingTask()
#23 0x0000041c53e5 base::MessageLoop::DoDelayedWork()
#24 0x0000041c62bd base::MessagePumpDefault::Run()
#25 0x0000041c4409 base::MessageLoop::Run()
#26 0x0000041ef659 base::RunLoop::Run()
#27 0x000008bbd797 content::RendererMain()
#28 0x00000416abfe content::RunZygote()
#29 0x00000416c2f1 content::ContentMainRunnerImpl::Run()
#30 0x000006206f87 service_manager::Main()
#31 0x00000416a8e4 content::ContentMain()
#32 0x00000481380a content::LaunchTests()
#33 0x000004196894 LaunchChromeTests()
#34 0x000004195fdd main
#35 0x7f8ce08cbf45 __libc_start_main
#36 0x0000005cbcca _start

 
Project Member

Comment 1 by bugdroid1@chromium.org, Feb 17 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d3956b3d8a1932023f9d2c4ef5f85646b84a629f

commit d3956b3d8a1932023f9d2c4ef5f85646b84a629f
Author: Xianzhu Wang <wangxianzhu@chromium.org>
Date: Sat Feb 17 04:50:42 2018

[SPv175] Temporarily disable PrintPreviewSettingsSectionsTest.SetCopies

A wrong test was disabled in https://chromium-review.googlesource.com/c/chromium/src/+/923572.
(It skipped CQ for the last Patch Set because linux-chromeos-rel was very
flaky).

Bug:  813221 
TBR: alemate@chromium.org
Change-Id: I014d846a01f36366b14d7701b1ebd72cbfd51efb
Reviewed-on: https://chromium-review.googlesource.com/924395
Reviewed-by: Alexander Alekseev <alemate@chromium.org>
Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org>
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#537530}
[modify] https://crrev.com/d3956b3d8a1932023f9d2c4ef5f85646b84a629f/chrome/test/data/webui/print_preview/new_print_preview_ui_browsertest.js

Project Member

Comment 2 by bugdroid1@chromium.org, Feb 17 2018

Labels: merge-merged-3350
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5bd8bdac818dc609618bfd57d31ac34ec0c20854

commit 5bd8bdac818dc609618bfd57d31ac34ec0c20854
Author: Alexander Alekseev <alemate@chromium.org>
Date: Sat Feb 17 07:53:08 2018

[SPv175] Temporarily disable PrintPreviewSettingsSectionsTest.SetCopies

A wrong test was disabled in https://chromium-review.googlesource.com/c/chromium/src/+/923572.
(It skipped CQ for the last Patch Set because linux-chromeos-rel was very
flaky).

TBR=wangxianzhu@chromium.org

(cherry picked from commit d3956b3d8a1932023f9d2c4ef5f85646b84a629f)

Bug:  813221 
TBR: alemate@chromium.org
Change-Id: I014d846a01f36366b14d7701b1ebd72cbfd51efb
Reviewed-on: https://chromium-review.googlesource.com/924395
Reviewed-by: Alexander Alekseev <alemate@chromium.org>
Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org>
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#537530}
Reviewed-on: https://chromium-review.googlesource.com/924841
Cr-Commit-Position: refs/branch-heads/3350@{#4}
Cr-Branched-From: 2b1109ab0cd74dabb255f79029326f1ddbae6349-refs/heads/master@{#537342}
[modify] https://crrev.com/5bd8bdac818dc609618bfd57d31ac34ec0c20854/chrome/test/data/webui/print_preview/new_print_preview_ui_browsertest.js

Cc: chrishtr@chromium.org vmp...@chromium.org
The failure is because a squashed layer's chunk escapes the clip state of the squashing layer.

This is a snippet of layout tree:

                  LayoutFlexibleBox 0x22bb8fa40d90  SPAN class="input-wrapper"
                    LayoutTextControl 0x22bb8fa5c140  INPUT class="user-value"
                      LayoutFlexibleBox 0x22bb8fa40f10  DIV id="text-field-container"
                        LayoutBlockFlow 0x22bb8fa1a638  DIV id="editing-view-port"
                          LayoutBlockFlow 0x22bb8fa1a760  DIV (editable)
                            LayoutText 0x22bb8fa30c40 #text "2"
1                       LayoutBlockFlow 0x22bb8fa1a888  DIV id="spin"
                    LayoutBlockFlow 0x22bb8fa1cb38  DIV class="checkbox"
                      LayoutFlexibleBox 0x22bb8fa41990  LABEL
2                       LayoutBlockFlow (relative positioned) 0x22bb8fa1cd88  INPUT id="collate"
                        LayoutBlockFlow 0x22bb8fa1e130  SPAN id="copies-collate-label"
                          LayoutText 0x22bb8fa328b0 #text "Collate"

Object 1 (spin) establishes a squashing layer. Object 2 (collate)'s layer is the first squashed layer. For now we use object 1's PreEffectProperties as the layer state of the squashing layer which has clip state:
clip:
root 0x22f739f98250
  OverflowClip (LayoutView #document) 0x22f739f98370
    OverflowClip (LayoutBlockFlow DIV id='settings-sections') 0x22f739f9d470
      OverflowClip (LayoutBlockFlow DIV) 0x22f739f9f750
        InnerBorderRadiusClip (LayoutTextControl INPUT class='user-value') 0x22f739f9f630
          OverflowClip (LayoutTextControl INPUT class='user-value') 0x22f739f9f510

When we paint object 2, we create a paint chunk with the clip state:
clip:
root 0x22f739f98250
  OverflowClip (LayoutView #document) 0x22f739f98370
    OverflowClip (LayoutBlockFlow DIV id='settings-sections') 0x22f739f9d470
      OverflowClip (LayoutBlockFlow DIV) 0x22f739f9f750

Thus the paint chunk's clip state escapes the GraphicsLayer's state.

It seems incorrect to use the establishing object's state as the state of a squashing layer. Should we find the least common ancestor of all squashed layers as the squashing layer's state? 
Updates:

1. I tried to use the lowest common ancestor of all squashed layers, and it worked for the test case and layout tests under compositing/.

2. I tried to reproduce the bug with a reduced test case, but I couldn't get a layer squashed because "this layer has a different clipping container than the squashing layer". So is it a squashing bug in the test case that we are squashing a layer into a squashing layer having different clipping container?

Investigating.
I think the cause that we are squashing a layer into a squashing layer with deeper clip state is about the control clip. We should not include the control clip into the clip state of the squashing layer.

Comment 6 by kenrb@chromium.org, Feb 20 2018

I see this crash on a trunk build with DCHECKs whenever I navigate to https://www.youtube.com/unboxed.
Blocking:
Project Member

Comment 9 by bugdroid1@chromium.org, Feb 24 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/19cff519566f6e64c81c4e67b4f26f2f76cf0d55

commit 19cff519566f6e64c81c4e67b4f26f2f76cf0d55
Author: Xianzhu Wang <wangxianzhu@chromium.org>
Date: Sat Feb 24 02:17:45 2018

[SPv175] Use clipping container's clip state for squashing layer

In the current layer squashing algorithm, all squashed layers under
a squashing layer have a common clip ancestor which is the squashing
layer's ClippingContainer() which doesn't include control clips.

For SPv175, when we set layer state of a squashing layer, we should
use the clip state of the ClippingContainer to skip any control
clips on the squashing layer's object that should not apply on
squashed layers.

[1] https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/paint/compositing/CompositingLayerAssigner.cpp?rcl=5909b5622777f87eb25763ccd8ff349413422742&l=165

TBR= # for enabling a temporarily disabled test

Bug:  813221 
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: Ie395f025935028f29b2f5de25674698227550b93
Reviewed-on: https://chromium-review.googlesource.com/927001
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#538968}
[modify] https://crrev.com/19cff519566f6e64c81c4e67b4f26f2f76cf0d55/chrome/test/data/webui/print_preview/new_print_preview_ui_browsertest.js
[add] https://crrev.com/19cff519566f6e64c81c4e67b4f26f2f76cf0d55/third_party/WebKit/LayoutTests/compositing/squashing/squashing-layer-control-clip-expected.html
[add] https://crrev.com/19cff519566f6e64c81c4e67b4f26f2f76cf0d55/third_party/WebKit/LayoutTests/compositing/squashing/squashing-layer-control-clip.html
[modify] https://crrev.com/19cff519566f6e64c81c4e67b4f26f2f76cf0d55/third_party/WebKit/Source/core/paint/compositing/CompositingLayerAssigner.cpp
[modify] https://crrev.com/19cff519566f6e64c81c4e67b4f26f2f76cf0d55/third_party/WebKit/Source/core/paint/compositing/CompositingLayerPropertyUpdater.cpp

Status: Fixed (was: Assigned)

Sign in to add a comment