Summary: | REGRESSION: ASSERTION FAILED: !m_lastActiveBlock on js/function-apply.html | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Alexey Proskuryakov <ap> | ||||||
Component: | JavaScriptCore | Assignee: | Joseph Pecoraro <joepeck> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | commit-queue, fpizlo, ggaren, joepeck, keith_miller, mark.lam, msaboff, oliver, ryanhaddad, saam, webkit-bug-importer | ||||||
Priority: | P2 | Keywords: | InRadar, Regression | ||||||
Version: | WebKit Nightly Build | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Description
Alexey Proskuryakov
2016-03-13 14:14:29 PDT
Joe, is this you? Are you sure it's OK for removeDeadHeapSnapshotNodes to iterate the heap during GC? Maybe you can move this to after GC instead? Marked this test as flaky to unblock EWS <http://trac.webkit.org/projects/webkit/changeset/198165> (In reply to comment #2) > Joe, is this you? Seems likely! > Are you sure it's OK for removeDeadHeapSnapshotNodes to iterate the heap > during GC? Maybe you can move this to after GC instead? Yes, I think the problem is that both Heap::gatherExtraHeapSnapshotData and Heap::removeDeadHeapSnapshotNodes take a HeapIterationScope (which does a stopAllocating/resumeAllocating) but Heap::collectImpl has already done a stopAllocating and will do a resetAllocators. Duplicate stopAllocating calls looks like it would cause this ASSERT. I will see if it makes sense to just drop the HeapIterationScopes here given the Heap is already stopped. It looks like it would be perfectly fine to move these snapshot operations after resetAllocators where they won't mess with the state of the allocator between the normal stop/reset of collection. Given this test is encountering the removeDeadHeapSnapshotNodes path at all, it means imply that this VM had previously run a test that created a HeapProfiler. So that would mean the bot ran an LayoutTests/inspector/heap test and then ran this LayoutTests/js/function-apply.html, so I'll try to reproduce locally with this in mind. While the HeapProfiler will still exist for the VM, the HeapSnapshots should have been cleared when the page changed so there should essentially be no work. (In reply to comment #4) > I will see if it makes sense to just drop the HeapIterationScopes here given > the Heap is already stopped. It looks like it would be perfectly fine to > move these snapshot operations after resetAllocators where they won't mess > with the state of the allocator between the normal stop/reset of collection. Bah, MarkedSpace::forEachLiveCell/DeadCell expects a HeapIterationScope& in its API to ensure callers have stopped allocation. So just moving the HeapProfiler work to the end of GC (after allocators are resumed) seems easiest/safest. Created attachment 274053 [details]
[PATCH] Proposed Fix
(In reply to comment #4) > So that would mean the bot ran an LayoutTests/inspector/heap > test and then ran this LayoutTests/js/function-apply.html, so I'll try to > reproduce locally with this in mind. I was unable to reproduce this locally running lots of iterations of these kind of combinations. Comment on attachment 274053 [details]
[PATCH] Proposed Fix
Please also unmark the test in TestExpectations when landing this.
FWIW, js/function-call-aliased.html is another affected test.
Can we update the patch and land this soon? js/function-call-aliased.html is wreaking havoc on Mac EWS results. Comment on attachment 274053 [details] [PATCH] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=274053&action=review > Source/JavaScriptCore/heap/Heap.cpp:1201 > + if (HeapProfiler* heapProfiler = m_vm->heapProfiler()) { > + gatherExtraHeapSnapshotData(*heapProfiler); > + removeDeadHeapSnapshotNodes(*heapProfiler); > + } > + Let's put this in didFinishCollection() (at the bottom) instead. We do many heap iterations in there and collect statistics. That would be the proper place for this. Created attachment 274121 [details]
[PATCH] Proposed Fix
Comment on attachment 274121 [details]
[PATCH] Proposed Fix
r=me
Comment on attachment 274121 [details] [PATCH] Proposed Fix Clearing flags on attachment: 274121 Committed r198229: <http://trac.webkit.org/changeset/198229> All reviewed patches have been landed. Closing bug. |