Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(665)

Issue 2875793002: Why this CL triggers an OilPan crash.

Created:
3 years, 7 months ago by Łukasz Anforowicz
Modified:
3 years, 7 months ago
Reviewers:
keishi, haraken, sigbjorn, dcheng
CC:
chromium-reviews, extensions-reviews_chromium.org, creis+watch_chromium.org, qsr+mojo_chromium.org, mlamouri+watch-content_chromium.org, viettrungluu+watch_chromium.org, nasko+codewatch_chromium.org, jam, yzshen+watch_chromium.org, abarth-chromium, Aaron Boodman, dglazkov+blink, blink-reviews-api_chromium.org, darin-cc_chromium.org, ajwong+watch_chromium.org, blink-reviews, chromium-apps-reviews_chromium.org, darin (slow to review), kinuko+watch
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Why this CL triggers an OilPan crash. I've added a static/global HashMap<int, PersistentHeapHashMap<WeakMember<Page>>> and I've started seeing some OilPan-related crashes. I've shown my CL to dcheng@ who does't see anything *obviously* wrong, so we've thought that maybe somebody more familiar with OilPan can take a look. Repro steps: 1. Patch in this CL 2. Build browser_tests 3. DISPLAY=:20 out/gn/browser_tests --gtest_filter=*ExtensionApiTabTest.TabUpdate* And observe a DCHECK The DCHECK happens when WebViewImpl's constructor assigns a (seemingly?) unrelated instance dev_tools_emulator_ = DevToolsEmulator::Create(this); The crash: [1:1:0510/135608.648852:FATAL:PersistentNode.h(69)] Check failed: !node || node->IsUnused(). base::debug::StackTrace::StackTrace() logging::LogMessage::~LogMessage() blink::PersistentNode::FreeListNext() blink::PersistentRegion::AllocatePersistentNode() blink::PersistentBase<>::Initialize() blink::WebViewImpl::WebViewImpl() blink::WebViewImpl::Create() content::RenderViewImpl::Initialize() content::RenderViewImpl::Create() content::RenderThreadImpl::CreateView() content::mojom::RendererStubDispatch::Accept()

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+192 lines, -19 lines) Patch
M chrome/browser/extensions/process_management_browsertest.cc View 1 chunk +46 lines, -0 lines 0 comments Download
M content/browser/browsing_instance.h View 3 chunks +7 lines, -1 line 0 comments Download
M content/browser/browsing_instance.cc View 1 chunk +4 lines, -2 lines 0 comments Download
M content/browser/renderer_host/render_view_host_impl.cc View 2 chunks +21 lines, -1 line 0 comments Download
M content/browser/site_instance_impl.h View 1 chunk +3 lines, -0 lines 0 comments Download
M content/browser/site_instance_impl.cc View 1 chunk +4 lines, -0 lines 0 comments Download
M content/common/renderer.mojom View 1 chunk +4 lines, -0 lines 0 comments Download
M content/public/test/render_view_test.cc View 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/render_view_impl.h View 1 chunk +3 lines, -0 lines 0 comments Download
M content/renderer/render_view_impl.cc View 2 chunks +8 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/page/FrameTree.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/page/Page.h View 3 chunks +13 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/page/Page.cpp View 4 chunks +46 lines, -1 line 0 comments Download
M third_party/WebKit/Source/web/WebViewImpl.h View 2 chunks +6 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/web/WebViewImpl.cpp View 3 chunks +15 lines, -6 lines 0 comments Download
M third_party/WebKit/public/web/WebView.h View 1 chunk +10 lines, -1 line 0 comments Download

Messages

Total messages: 11 (2 generated)
Łukasz Anforowicz
dcheng@, this is a WIP / not-landable CL that exhibits a mysterious OilPan-related crash. The ...
3 years, 7 months ago (2017-05-10 21:25:11 UTC) #2
dcheng
I don't see anything obviously wrong. We discussed earlier whether we need to do PersistentHeapHashMap<int, ...
3 years, 7 months ago (2017-05-10 22:19:03 UTC) #4
haraken
On 2017/05/10 22:19:03, dcheng wrote: > I don't see anything obviously wrong. We discussed earlier ...
3 years, 7 months ago (2017-05-11 02:21:19 UTC) #5
Łukasz Anforowicz
On 2017/05/11 02:21:19, haraken wrote: > On 2017/05/10 22:19:03, dcheng wrote: > > I don't ...
3 years, 7 months ago (2017-05-11 02:49:38 UTC) #6
Łukasz Anforowicz
On 2017/05/11 02:21:19, haraken wrote: > On 2017/05/10 22:19:03, dcheng wrote: > > I don't ...
3 years, 7 months ago (2017-05-11 02:49:38 UTC) #7
Łukasz Anforowicz
On 2017/05/11 02:49:38, Łukasz A. wrote: > On 2017/05/11 02:21:19, haraken wrote: > > On ...
3 years, 7 months ago (2017-05-11 03:01:58 UTC) #8
haraken
On 2017/05/11 03:01:58, Łukasz A. wrote: > On 2017/05/11 02:49:38, Łukasz A. wrote: > > ...
3 years, 7 months ago (2017-05-11 03:36:24 UTC) #9
dcheng
On 2017/05/11 03:36:24, haraken wrote: > On 2017/05/11 03:01:58, Łukasz A. wrote: > > On ...
3 years, 7 months ago (2017-05-11 20:43:37 UTC) #10
Łukasz Anforowicz
3 years, 7 months ago (2017-05-11 20:56:30 UTC) #11
On 2017/05/11 20:43:37, dcheng wrote:
> On 2017/05/11 03:36:24, haraken wrote:
> > On 2017/05/11 03:01:58, Łukasz A. wrote:
> > > On 2017/05/11 02:49:38, Łukasz A. wrote:
> > > > On 2017/05/11 02:21:19, haraken wrote:
> > > > > On 2017/05/10 22:19:03, dcheng wrote:
> > > > > > I don't see anything obviously wrong. We discussed earlier whether
we
> > need
> > > > to
> > > > > do
> > > > > > PersistentHeapHashMap<int, PersistentHeapHashSet<WeakMember<T>>
> instead
> > of
> > > > > just
> > > > > > HashMap<int, PersistentHeapHashSet<WeakMember<T>>, but it doesn't
make
> a
> > > > > > difference (and in any case, Persistent* should be a GC root).
> > > > > 
> > > > > Is the crash gone if you use PersistentHeapHashMap<int,
> > > > > HeapHashSet<WeakMember<T>>?
> > > > > 
> > > > > That sounds strange anyway.
> > > > 
> > > > Yes, indeed - the crash is gone when I use:
> > > > using BrowsingInstanceHashMap = PersistentHeapHashMap<int,
> > > > HeapHashSet<WeakMember<Page>>>;
> > > 
> > > At any rate, even with the crash gone for me, this seems like a bug in
> > > Persistent, right?  Whatever copying/moving/etc HashMap is doing, it
> shouldn't
> > > break internal state of PersistentNodes, right?  OTOH, I see that HashMap
> > > sometimes tries to take shortcuts via memset and similar things (but
> hopefully
> > > this is forbidden for Persistent).
> > 
> > Agreed, I think there is an underlying bug in Persistent, which needs to be
> > cared for.
> 
> Shall we file a bug to track this?

https://crbug.com/721531

Powered by Google App Engine
This is Rietveld 408576698