<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:fpizlo&#64;apple.com" title="Filip Pizlo &lt;fpizlo&#64;apple.com&gt;"> <span class="fn">Filip Pizlo</span></a>
</span> changed
              <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED INVALID - [JavaScriptCore] JavaScriptCore is crashed when PARRELLEL GC is enabled."
   href="https://bugs.webkit.org/show_bug.cgi?id=153819">bug 153819</a>
        <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Status</td>
           <td>NEW
           </td>
           <td>RESOLVED
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Resolution</td>
           <td>---
           </td>
           <td>INVALID
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED INVALID - [JavaScriptCore] JavaScriptCore is crashed when PARRELLEL GC is enabled."
   href="https://bugs.webkit.org/show_bug.cgi?id=153819#c2">Comment # 2</a>
              on <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED INVALID - [JavaScriptCore] JavaScriptCore is crashed when PARRELLEL GC is enabled."
   href="https://bugs.webkit.org/show_bug.cgi?id=153819">bug 153819</a>
              from <span class="vcard"><a class="email" href="mailto:fpizlo&#64;apple.com" title="Filip Pizlo &lt;fpizlo&#64;apple.com&gt;"> <span class="fn">Filip Pizlo</span></a>
</span></b>
        <pre>(In reply to <a href="show_bug.cgi?id=153819#c0">comment #0</a>)
<span class="quote">&gt; Hello, GC experts.
&gt; 
&gt; Recently I met a GC crash when PARRALLEL GC is enabled. Crash is like:
&gt; 
&gt; #0  0x00007ffff72a1671 in isJSString (this=0x7fffeaec0cd8) at
&gt; /home/oszi/WebKit/Source/JavaScriptCore/runtime/JSString.h:501
&gt; #1  visitChildren (this=0x7fffeaec0cd8) at
&gt; /home/oszi/WebKit/Source/JavaScriptCore/heap/MarkStack.cpp:351
&gt; #2  JSC::SlotVisitor::drain (this=0x7fffeaec0cd8) at
&gt; /home/oszi/WebKit/Source/JavaScriptCore/heap/MarkStack.cpp:405
&gt; #3  0x00007ffff72a19e4 in JSC::SlotVisitor::drainFromShared
&gt; (this=0x7fffeaec0cd8, sharedDrainMode=JSC::SlotVisitor::MasterDrain) at
&gt; /home/oszi/WebKit/Source/JavaScriptCore/heap/MarkStack.cpp:498
&gt; #4  0x00007ffff729dd38 in JSC::Heap::markRoots (this=0x7fffeaec0050,
&gt; fullGC=&lt;value optimized out&gt;) at
&gt; /home/oszi/WebKit/Source/JavaScriptCore/heap/Heap.cpp:555
&gt; #5  0x00007ffff729df8b in JSC::Heap::collect (this=0x7fffeaec0050,
&gt; sweepToggle=JSC::Heap::DoNotSweep) at
&gt; /home/oszi/WebKit/Source/JavaScriptCore/heap/Heap.cpp:717
&gt; #6  0x00007ffff72a410c in JSC::MarkedAllocator::allocateSlowCase
&gt; (this=0x7fffeaec0158) at
&gt; /home/oszi/WebKit/Source/JavaScriptCore/heap/MarkedAllocator.cpp:75
&gt; #7  0x00007ffff72e84ba in JSC::MarkedAllocator::allocate (exec=&lt;value
&gt; optimized out&gt;) at
&gt; /home/oszi/WebKit/Source/JavaScriptCore/heap/MarkedAllocator.h:77
&gt; #8  JSC::MarkedSpace::allocateWithDestructor (exec=&lt;value optimized out&gt;) at
&gt; /home/oszi/WebKit/Source/JavaScriptCore/heap/MarkedSpace.h:191
&gt; #9  JSC::Heap::allocateWithDestructor (exec=&lt;value optimized out&gt;) at
&gt; /home/oszi/WebKit/Source/JavaScriptCore/heap/Heap.h:362
&gt; #10 allocateCell&lt;JSC::JSFinalObject&gt; (exec=&lt;value optimized out&gt;) at
&gt; /home/oszi/WebKit/Source/JavaScriptCore/runtime/JSCell.h:340
&gt; #11 JSC::JSFinalObject::create (exec=&lt;value optimized out&gt;) at
&gt; /home/oszi/WebKit/Source/JavaScriptCore/runtime/JSObject.h:439
&gt; #12 constructEmptyObject (exec=&lt;value optimized out&gt;) at
&gt; /home/oszi/WebKit/Source/JavaScriptCore/runtime/JSObject.h:515
&gt; #13 constructEmptyObject (exec=&lt;value optimized out&gt;) at
&gt; /home/oszi/WebKit/Source/JavaScriptCore/runtime/JSGlobalObject.h:431
&gt; #14 constructEmptyObject (exec=&lt;value optimized out&gt;) at
&gt; /home/oszi/WebKit/Source/JavaScriptCore/runtime/JSGlobalObject.h:436
&gt; #15 operationNewObject (exec=&lt;value optimized out&gt;) at
&gt; /home/oszi/WebKit/Source/JavaScriptCore/dfg/DFGOperations.cpp:305
&gt; #16 0x00007fffaaf8880d in ?? ()
&gt; #17 0x0000000000000000 in ?? ()
&gt; 
&gt; 
&gt; I checked the code of JSCore GC.
&gt; 
&gt; void SlotVisitor::drain()
&gt; {
&gt;     StackStats::probe();
&gt;     ASSERT(m_isInParallelMode);
&gt; 
&gt; #if ENABLE(PARALLEL_GC)
&gt;     if (Options::numberOfGCMarkers() &gt; 1) {
&gt;         while (!m_stack.isEmpty()) {
&gt;             m_stack.refill();
&gt;             for (unsigned countdown =
&gt; Options::minimumNumberOfScansBetweenRebalance(); m_stack.canRemoveLast() &amp;&amp;
&gt; countdown--;)
&gt;                 visitChildren(*this, m_stack.removeLast());
&gt;             donateKnownParallel();
&gt;         }
&gt; 
&gt;         mergeOpaqueRootsIfNecessary();
&gt;         return;
&gt;     }
&gt; #endif
&gt; 
&gt;     while (!m_stack.isEmpty()) {
&gt;         m_stack.refill();
&gt;         while (m_stack.canRemoveLast())
&gt;             visitChildren(*this, m_stack.removeLast());
&gt;     }
&gt; }
&gt; 
&gt; Why is m_shared.m_markingLock not added before m_stack.refill() and
&gt; m_stack.removeLast(), just like inside the function void
&gt; SlotVisitor::donateKnownParallel() ?
&gt; 
&gt; It seems that m_stack is operated unsafely when PARRELLEL GC is enabled.
&gt; 
&gt; What do you think?</span >

Not a bug.  m_stack is the thread-local stack.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>