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

Issue 461413002: WIP: ~HashTableAddResult crashes in oilpan builds

Created:
6 years, 4 months ago by haraken
Modified:
6 years, 4 months ago
CC:
blink-reviews, aandrey+blink_chromium.org, sof, eae+blinkwatch, abarth-chromium, blink-reviews-dom_chromium.org, dglazkov+blink, blink-reviews-wtf_chromium.org, Mikhail, rwlbuis
Project:
blink
Visibility:
Public.

Description

WIP: ~HashTableAddResult crashes in oilpan builds BUG=402426

Patch Set 1 #

Patch Set 2 : #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+18 lines, -9 lines) Patch
M Source/core/dom/NodeListsNodeData.h View 1 1 chunk +17 lines, -7 lines 1 comment Download
M Source/wtf/HashMap.h View 1 1 chunk +0 lines, -1 line 0 comments Download
M Source/wtf/HashTable.h View 2 chunks +1 line, -1 line 0 comments Download

Messages

Total messages: 10 (0 generated)
haraken
https://codereview.chromium.org/461413002/diff/20001/Source/core/dom/NodeListsNodeData.h File Source/core/dom/NodeListsNodeData.h (right): https://codereview.chromium.org/461413002/diff/20001/Source/core/dom/NodeListsNodeData.h#newcode121 Source/core/dom/NodeListsNodeData.h:121: fprintf(stderr, "f\n"); This code prints the following crash log. ...
6 years, 4 months ago (2014-08-13 07:54:32 UTC) #1
Mads Ager (chromium)
void Heap::collectAllGarbage() { for (int i = 0; i < 5; i++) collectGarbage(ThreadState::NoHeapPointersOnStack); } This ...
6 years, 4 months ago (2014-08-13 08:33:23 UTC) #2
Mads Ager (chromium)
On 2014/08/13 08:33:23, Mads Ager (chromium) wrote: > void Heap::collectAllGarbage() > { > for (int ...
6 years, 4 months ago (2014-08-13 08:37:13 UTC) #3
haraken
On 2014/08/13 08:33:23, Mads Ager (chromium) wrote: > void Heap::collectAllGarbage() > { > for (int ...
6 years, 4 months ago (2014-08-13 08:41:17 UTC) #4
haraken
On 2014/08/13 08:37:13, Mads Ager (chromium) wrote: > On 2014/08/13 08:33:23, Mads Ager (chromium) wrote: ...
6 years, 4 months ago (2014-08-13 08:42:08 UTC) #5
Mads Ager (chromium)
On 2014/08/13 08:42:08, haraken wrote: > On 2014/08/13 08:37:13, Mads Ager (chromium) wrote: > > ...
6 years, 4 months ago (2014-08-13 08:57:17 UTC) #6
haraken
On 2014/08/13 08:57:17, Mads Ager (chromium) wrote: > On 2014/08/13 08:42:08, haraken wrote: > > ...
6 years, 4 months ago (2014-08-13 09:05:49 UTC) #7
Mads Ager (chromium)
On 2014/08/13 08:57:17, Mads Ager (chromium) wrote: > On 2014/08/13 08:42:08, haraken wrote: > > ...
6 years, 4 months ago (2014-08-13 09:06:38 UTC) #8
haraken
On 2014/08/13 09:06:38, Mads Ager (chromium) wrote: > On 2014/08/13 08:57:17, Mads Ager (chromium) wrote: ...
6 years, 4 months ago (2014-08-13 09:07:10 UTC) #9
Mads Ager (chromium)
6 years, 4 months ago (2014-08-13 10:57:41 UTC) #10
On 2014/08/13 09:07:10, haraken wrote:
> On 2014/08/13 09:06:38, Mads Ager (chromium) wrote:
> > On 2014/08/13 08:57:17, Mads Ager (chromium) wrote:
> > > On 2014/08/13 08:42:08, haraken wrote:
> > > > On 2014/08/13 08:37:13, Mads Ager (chromium) wrote:
> > > > > On 2014/08/13 08:33:23, Mads Ager (chromium) wrote:
> > > > > > void Heap::collectAllGarbage()
> > > > > > {
> > > > > >     for (int i = 0; i < 5; i++)
> > > > > >         collectGarbage(ThreadState::NoHeapPointersOnStack);
> > > > > > }
> > > > > > 
> > > > > > This is doing garbage collections without taking pointers on the
stack
> > > into
> > > > > > account. You need to do
> > > > Heap::collectGarbage(ThreadState::HeapPointersOnStack)
> > > > > > here. Otherwise, nothing that is only reachable from the stack will
be
> > > kept
> > > > > > alive. :)
> > > > > 
> > > > > With that change, I can still consistently reproduce with the same
> layout
> > > > test.
> > > > > The printing becomes:
> > > > > 
> > > > > a 1 1 0x35c370590b88 0x35c370590b88
> > > > > b 1 2 0x35c370590b88 0x35c370590b88
> > > > > 
> > > > > So there has indeed been a modification during the GC.
> > > > 
> > > > Thanks, I'll investigate who did the modification.
> > > 
> > > We are doing the modification in weak processing. We have introduced a bug
> > here.
> > > We should not be modifying the weak map in this GC. We should have
realized
> > that
> > > there is a pointer from the stack. That should have strongified the
> > collection.
> > > That apparently doesn't happen.
> > 
> > This is due to changes done to marking. I'll revert the change causing this:

> > 
> > https://codereview.chromium.org/413133006
> > 
> > I'll attempt to create a regression unittest case so we will not regress
this
> > again. :)
> 
> I'll delegate the work to you :)

Update: This is *not* caused by the change above. It is only made much more
likely to happen with the change that I reverted. The underlying issue is that
the builtin weak processing can end up removing the newly added nullptr weak
member in weak processing. It should never do that. Erik is creating the real
fix for this and then I will reland the marking order change. :)

Powered by Google App Engine
This is Rietveld 408576698