New issue
Advanced search Search tips

Issue 866771 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Yesterday
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android , Windows , Mac
Pri: 1
Type: Bug

Blocking:
issue 714962



Sign in to add a comment

[LayoutNG] Crash in Paintcontroller::FinishCycle

Project Member Reported by kojii@chromium.org, Jul 24

Issue description

What steps will reproduce this crash? (If it's not reproducible, what were you doing just before the crash?)
1. Enable LayoutNG runtime flag
2. Open https://chromerenderingcore.slack.com/threads/

****DO NOT CHANGE BELOW THIS LINE****
Crash ID: crash/1a351b578855638b

 
Components: -Blink>Paint Blink>Layout
Labels: -Restrict-View-EditIssue
Status: Available (was: Unconfirmed)
Blocking: 714962
Cc: kojii@chromium.org
Description: Show this description
Cc: cbiesin...@chromium.org
I see this crash both when using Slack and when using Chrome Remote Desktop

crash/dfc550869f942503 
crash/aff24b01c29f5a96 
Crash seems to be here:
540	wangxianzhu	2 months	    for (const auto& item : current_paint_artifact_->GetDisplayItemList()) {
541	wangxianzhu	2 months	      const auto& client = item.Client();
542	wangxianzhu	2 months	      client.ClearPartialInvalidationVisualRect();

(that last line)

Maybe client has been deleted...?
Cc: e...@chromium.org
Thanks, yeah, I saw this stack trace too. Haven't figured this out yet...
In a debug build, this DCHECKs here:
    DCHECK(cached_item->Client().IsAlive());
in PaintController::CopyCachedSubsequence
And now I got this one...
[17296:20168:0827/152622.867:FATAL:paint_controller.cc(242)] Check failed: false. DisplayItem {
  "id": "0000015883F88EF0:DrawingPaintPhaseForeground:0",
  "visualRect": "385,945 140x36",
  "opaque": false
}
 has duplicated id with previous {
  "id": "0000015883F88EF0:DrawingPaintPhaseForeground:0",
  "visualRect": "140,993 161x46",
  "opaque": false
}
 (index=23)
Thank you for tracking this down. Duplicated id should be easier than deleted objects. Is it floating object?
Cc: ligim...@chromium.org
Labels: -Type-Bug -Pri-3 ReleaseBlock-Stable Target-71 RegressedIn-69 M-71 FoundIn-71 FoundIn-70 FoundIn-69 OS-Android OS-Mac Pri-1 Type-Bug-Regression
Owner: wangxianzhu@chromium.org
Status: Assigned (was: Available)
This crash was introduced during M69 time frame, double digit instances as of now.

Manual regression finder
========================
https://crash.corp.google.com/browse?q=expanded_custom_data.ChromeCrashProto.ptype%3D%27renderer%27+AND+expanded_custom_data.ChromeCrashProto.magic_signature_1.name%3D%27blink%3A%3APaintController%3A%3AFinishCycle%27#-propertyselector,productname:1000,productversion:1000,-magicsignature:50,-magicsignature2:50,-stablesignature:50,-magicsignaturesorted:50

Possible suspect
=================
https://chromium.googlesource.com/chromium/src.git/+/d7209bb8a53bcc9636b2c12f18e7f7b74b0c02c8

Assigning to Xianzhu for further updates.Can we target for a fix in M71?
Components: Blink>Paint
Labels: -Pri-1 -Stability-Crash -ReleaseBlock-Stable -Type-Bug-Regression -User-Submitted -RegressedIn-69 -M-71 -Target-71 Pri-2 Type-Bug
This is a bug of LayoutNG (which is under-development and not enabled yet), not a regression. The error occurs when LayoutNG paints two display items with the same ID.
Status: WontFix (was: Assigned)
I can't reproduce the issue, neither crash in FinishCycle nor duplicated id, with the reported URL with LayoutNG enabled.

Filed bug 906756 for crash in FinishCycle without LayoutNG. 
Cc: wangxianzhu@chromium.org
Owner: ----
Status: Available (was: Assigned)
This looks like an under-invalidation of PaintLayer (missing SetNeedsRepaint) when some LayoutNG-specific DisplayItemClient is deleted. Hope someone familiar with LayoutNG can work on this.
Cc: yosin@chromium.org
According to discussion in slack/#layoutng, recreating NGPaintFragments without invalidating the painting layer may be the reason of the crash.

NGPaintFragment destructor might not be the best place for the invalidation because finding the painting layer is not super fast. The best place might be somewhere that we destroy a lot of NGPaintFragments at once.

Note that without reusing NGPaintFragments, the invalidation may make the performance regression worse.
Owner: kojii@chromium.org
Status: Started (was: Available)
From slack:
> crbug.com/906756 is the PaintController::FinishCycle() bug. It's still open. The cause is under-invalidation of cached subsequences (for stacking-context PaintLayer), that is, when some painting changed in some stacking-context, we missed setNeedsRepaint of the PaintLayer.

> For the bug, the change is specifically deletion of a DisplayItemClient. We need setNeedsRepaint of the painting layer when a DisplayItemClient is deleted. If NG has higher crash rate, there might be some NG-specific DisplayItemClient missing setNeedsRepaint of the painting layer
Project Member

Comment 18 by bugdroid1@chromium.org, Jan 16

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

commit 22b59cde0c76db5687f51c3014661cdec7d14cc6
Author: Koji Ishii <kojii@chromium.org>
Date: Wed Jan 16 03:15:25 2019

[LayoutNG] Fix crash in PaintController::FinishCycle

According to wangxianzhu@, the crash is specifically about
a missing setNeedsRepaint of the painting layer when a
DispalyItemClient is missing.

This patch adds that, when the root NGPaintFragment of
inline formatting context (LayoutBlockFlow) is destroyed.

This is a speculative fix.

Bug:  866771 , 906756
Change-Id: I9a833671ef67079d06a96f42aa47a9d277d3b77c
Reviewed-on: https://chromium-review.googlesource.com/c/1410953
Commit-Queue: Koji Ishii <kojii@chromium.org>
Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#623078}
[modify] https://crrev.com/22b59cde0c76db5687f51c3014661cdec7d14cc6/third_party/blink/renderer/core/layout/ng/layout_ng_mixin.cc

Comment 19 by e...@chromium.org, Yesterday (35 hours ago)

Status: Fixed (was: Started)
No new crashers reported since 3674. Closing!

Sign in to add a comment