<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>172167</bug_id>
          
          <creation_ts>2017-05-16 06:39:16 -0700</creation_ts>
          <short_desc>[Threaded Compositor] SHOULD NEVER BE REACHED in WebKit::CompositingRunLoop::updateCompleted</short_desc>
          <delta_ts>2017-06-13 17:10:38 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKit2</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>REOPENED</bug_status>
          <resolution></resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=171336</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=172892</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>Gtk, LayoutTestFailure</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Carlos Garcia Campos">cgarcia</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bugs-noreply</cc>
    
    <cc>cturner</cc>
    
    <cc>mcatanzaro</cc>
    
    <cc>zan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1309117</commentid>
    <comment_count>0</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2017-05-16 06:39:16 -0700</bug_when>
    <thetext>This is still happening, even after r216182, less often but still happens. There are two conditions in which this can happen:

 - Again in force repaint. r216182 fixed the case of force repaint called when update state is completed, but it can also crash if update state is inProgress or PendingAfterCompletion when m_coordinateUpdateCompletionWithClient is true.

 - When the threaded compositor is invalidated right after renderLayerTree() starts, but before it finishes.

I&apos;ll submit a patch to fix this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1309119</commentid>
    <comment_count>1</comment_count>
      <attachid>310260</attachid>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2017-05-16 06:49:41 -0700</bug_when>
    <thetext>Created attachment 310260
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1309120</commentid>
    <comment_count>2</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2017-05-16 06:54:23 -0700</bug_when>
    <thetext>I think this patch also fixes test imported/blink/compositing/layer-creation/incremental-destruction.html that is currently timing out in the release bot.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1309164</commentid>
    <comment_count>3</comment_count>
      <attachid>310260</attachid>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2017-05-16 10:16:40 -0700</bug_when>
    <thetext>Comment on attachment 310260
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=310260&amp;action=review

&gt; Source/WebKit2/ChangeLog:23
&gt; +        (WebKit::ThreadedDisplayRefreshMonitor::dispatchDisplayRefreshCallback): Return early if the montior has been invalidated.

monitor</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1309492</commentid>
    <comment_count>4</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2017-05-17 00:16:13 -0700</bug_when>
    <thetext>(In reply to Carlos Garcia Campos from comment #2)
&gt; I think this patch also fixes test
&gt; imported/blink/compositing/layer-creation/incremental-destruction.html that
&gt; is currently timing out in the release bot.

And maybe this also fixes bug #172027, it could be similar to the timeout of imported/blink/compositing/layer-creation/incremental-destruction.html, because of a force repaint the compositing run loop gets stalled in PendingAfterCompletion state because the completion never happens.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1309493</commentid>
    <comment_count>5</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2017-05-17 00:19:07 -0700</bug_when>
    <thetext>Committed r216970: &lt;http://trac.webkit.org/changeset/216970&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1309524</commentid>
    <comment_count>6</comment_count>
      <attachid>310260</attachid>
    <who name="Zan Dobersek">zan</who>
    <bug_when>2017-05-17 02:59:15 -0700</bug_when>
    <thetext>Comment on attachment 310260
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=310260&amp;action=review

&gt; Source/WebKit2/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:266
&gt; -    sceneUpdateFinished();
&gt; +    if (m_scene-&gt;isActive())
&gt; +        sceneUpdateFinished();

How can this occur? renderLayerTree() returns early at the beginning if the scene is not active. If it is active, the function then executes serially, which should make it impossible for any task to be scheduled on this thread that would make the scene inactive.

&gt; Source/WebKit2/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:292
&gt; +        // Do not change m_coordinateUpdateCompletionWithClient while in force repaint.
&gt; +        if (m_inForceRepaint)
&gt; +            return;

m_coordinateUpdateCompletion should be set here, but to false if m_inForceRepaint is false as well.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1309527</commentid>
    <comment_count>7</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2017-05-17 03:03:01 -0700</bug_when>
    <thetext>(In reply to Zan Dobersek from comment #6)
&gt; Comment on attachment 310260 [details]
&gt; Patch
&gt; 
&gt; View in context:
&gt; https://bugs.webkit.org/attachment.cgi?id=310260&amp;action=review
&gt; 
&gt; &gt; Source/WebKit2/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:266
&gt; &gt; -    sceneUpdateFinished();
&gt; &gt; +    if (m_scene-&gt;isActive())
&gt; &gt; +        sceneUpdateFinished();
&gt; 
&gt; How can this occur? renderLayerTree() returns early at the beginning if the
&gt; scene is not active. If it is active, the function then executes serially,
&gt; which should make it impossible for any task to be scheduled on this thread
&gt; that would make the scene inactive.

Because invalidate happens in the main thread.

&gt; &gt; Source/WebKit2/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:292
&gt; &gt; +        // Do not change m_coordinateUpdateCompletionWithClient while in force repaint.
&gt; &gt; +        if (m_inForceRepaint)
&gt; &gt; +            return;
&gt; 
&gt; m_coordinateUpdateCompletion should be set here, but to false if
&gt; m_inForceRepaint is false as well.

That happens, because it doesn&apos;t return early.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1309528</commentid>
    <comment_count>8</comment_count>
      <attachid>310260</attachid>
    <who name="Zan Dobersek">zan</who>
    <bug_when>2017-05-17 03:08:58 -0700</bug_when>
    <thetext>Comment on attachment 310260
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=310260&amp;action=review

&gt;&gt;&gt; Source/WebKit2/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:266
&gt;&gt;&gt; +        sceneUpdateFinished();
&gt;&gt; 
&gt;&gt; How can this occur? renderLayerTree() returns early at the beginning if the scene is not active. If it is active, the function then executes serially, which should make it impossible for any task to be scheduled on this thread that would make the scene inactive.
&gt; 
&gt; Because invalidate happens in the main thread.

That&apos;s doing unsafe cross-thread modifications then.

&gt;&gt;&gt; Source/WebKit2/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:292
&gt;&gt;&gt; +            return;
&gt;&gt; 
&gt;&gt; m_coordinateUpdateCompletion should be set here, but to false if m_inForceRepaint is false as well.
&gt; 
&gt; That happens, because it doesn&apos;t return early.

I&apos;m saying it should be set regardless of the value of m_inForceRepaint. But if m_inForceRepaint is false, it should be set to false.

    bool coordinateUpdate = m_inForceRepaint &amp;&amp; std::any_of(...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1309539</commentid>
    <comment_count>9</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2017-05-17 03:32:38 -0700</bug_when>
    <thetext>(In reply to Zan Dobersek from comment #8)
&gt; Comment on attachment 310260 [details]
&gt; Patch
&gt; 
&gt; View in context:
&gt; https://bugs.webkit.org/attachment.cgi?id=310260&amp;action=review
&gt; 
&gt; &gt;&gt;&gt; Source/WebKit2/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:266
&gt; &gt;&gt;&gt; +        sceneUpdateFinished();
&gt; &gt;&gt; 
&gt; &gt;&gt; How can this occur? renderLayerTree() returns early at the beginning if the scene is not active. If it is active, the function then executes serially, which should make it impossible for any task to be scheduled on this thread that would make the scene inactive.
&gt; &gt; 
&gt; &gt; Because invalidate happens in the main thread.
&gt; 
&gt; That&apos;s doing unsafe cross-thread modifications then.

We should probably make m_isActive an Atomic&lt;bool&gt;, yes.

&gt; &gt;&gt;&gt; Source/WebKit2/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:292
&gt; &gt;&gt;&gt; +            return;
&gt; &gt;&gt; 
&gt; &gt;&gt; m_coordinateUpdateCompletion should be set here, but to false if m_inForceRepaint is false as well.
&gt; &gt; 
&gt; &gt; That happens, because it doesn&apos;t return early.
&gt; 
&gt; I&apos;m saying it should be set regardless of the value of m_inForceRepaint. But
&gt; if m_inForceRepaint is false, it should be set to false.
&gt; 
&gt;     bool coordinateUpdate = m_inForceRepaint &amp;&amp; std::any_of(...

That&apos;s what caused the timeout, and I suspect bug #172027 too. If we change coordinateUpdate for the force repaint, the frame is never completed. If the state is PendingAfterCompletion, we won&apos;t process more updates. So, what we do here is handling the force update like it didn&apos;t happen, to ensure frame updates continue working as expected.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1309568</commentid>
    <comment_count>10</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2017-05-17 05:49:12 -0700</bug_when>
    <thetext>Seems like we need to reopen this...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1309578</commentid>
    <comment_count>11</comment_count>
      <attachid>310260</attachid>
    <who name="Zan Dobersek">zan</who>
    <bug_when>2017-05-17 06:54:24 -0700</bug_when>
    <thetext>Comment on attachment 310260
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=310260&amp;action=review

&gt;&gt;&gt;&gt;&gt; Source/WebKit2/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:292
&gt;&gt;&gt;&gt;&gt; +            return;
&gt;&gt;&gt;&gt; 
&gt;&gt;&gt;&gt; m_coordinateUpdateCompletion should be set here, but to false if m_inForceRepaint is false as well.
&gt;&gt;&gt; 
&gt;&gt;&gt; That happens, because it doesn&apos;t return early.
&gt;&gt; 
&gt;&gt; I&apos;m saying it should be set regardless of the value of m_inForceRepaint. But if m_inForceRepaint is false, it should be set to false.
&gt;&gt; 
&gt;&gt;     bool coordinateUpdate = m_inForceRepaint &amp;&amp; std::any_of(...
&gt; 
&gt; That&apos;s what caused the timeout, and I suspect bug #172027 too. If we change coordinateUpdate for the force repaint, the frame is never completed. If the state is PendingAfterCompletion, we won&apos;t process more updates. So, what we do here is handling the force update like it didn&apos;t happen, to ensure frame updates continue working as expected.

When do you expect a forced updated to be finished? And do you expect the DisplayRefreshMonitor callback to be scheduled for forced updates?

You also don&apos;t have any guarantee that there is a scene state update pending that would be executed during a forced repaint, meaning m_clientRendersNextFrame isn&apos;t necessarily flipped to true, which would end up not scheduling a DisplayRefreshMonitor callback in sceneUpdateFinished() that would complete the update.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1310006</commentid>
    <comment_count>12</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2017-05-17 23:44:15 -0700</bug_when>
    <thetext>(In reply to Zan Dobersek from comment #11)
&gt; Comment on attachment 310260 [details]
&gt; Patch
&gt; 
&gt; View in context:
&gt; https://bugs.webkit.org/attachment.cgi?id=310260&amp;action=review
&gt; 
&gt; &gt;&gt;&gt;&gt;&gt; Source/WebKit2/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:292
&gt; &gt;&gt;&gt;&gt;&gt; +            return;
&gt; &gt;&gt;&gt;&gt; 
&gt; &gt;&gt;&gt;&gt; m_coordinateUpdateCompletion should be set here, but to false if m_inForceRepaint is false as well.
&gt; &gt;&gt;&gt; 
&gt; &gt;&gt;&gt; That happens, because it doesn&apos;t return early.
&gt; &gt;&gt; 
&gt; &gt;&gt; I&apos;m saying it should be set regardless of the value of m_inForceRepaint. But if m_inForceRepaint is false, it should be set to false.
&gt; &gt;&gt; 
&gt; &gt;&gt;     bool coordinateUpdate = m_inForceRepaint &amp;&amp; std::any_of(...
&gt; &gt; 
&gt; &gt; That&apos;s what caused the timeout, and I suspect bug #172027 too. If we change coordinateUpdate for the force repaint, the frame is never completed. If the state is PendingAfterCompletion, we won&apos;t process more updates. So, what we do here is handling the force update like it didn&apos;t happen, to ensure frame updates continue working as expected.
&gt; 
&gt; When do you expect a forced updated to be finished? And do you expect the
&gt; DisplayRefreshMonitor callback to be scheduled for forced updates?
&gt; 
&gt; You also don&apos;t have any guarantee that there is a scene state update pending
&gt; that would be executed during a forced repaint, meaning
&gt; m_clientRendersNextFrame isn&apos;t necessarily flipped to true, which would end
&gt; up not scheduling a DisplayRefreshMonitor callback in sceneUpdateFinished()
&gt; that would complete the update.

A fore repaint is always synchronous, it calls renderLayerTree directly so it&apos;s not expected to call updateCompleted(). I don&apos;t know if we should do anything special with the refresh monitor in that case. These are the situations that can happen when a forceRepaint is scheduled.

 1) Previous update is complete. If updateCompleted() is called, it will crash in SHOULD NEVER BE REACHED.

 2) Previous frame is InProgress and m_coordinateUpdateCompletionWithClient is false. If the frame renderLayerTree happens before the force repaint, then updateCompleted() will be called, so it would be like previous case. If it happens after, the forceRepaint one will not calle updateCompleted() and the InProgress frame will. At some point the scene is committed and the update lambda is called. If the force repaint happens before the update would do nothing, leaving m_coordinateUpdateCompletionWithClient as false. When completeCoordinatedUpdateIfNeeded is called, m_coordinateUpdateCompletionWithClient is still false as expected and updateCompleted() is not called (it was already called once for this frame).

 3) Previous frame is InProgress and m_coordinateUpdateCompletionWithClient is true. In this case updateCompleted() won&apos;t be called no matter if one renderLayerTree is called before the other. But at some point the scene is committed and the update lambda is called. If the force repaint happens before the update would do nothing, leaving the m_coordinateUpdateCompletionWithClient as true. When completeCoordinatedUpdateIfNeeded is called, m_coordinateUpdateCompletionWithClient is still true as expected and updateCompleted() is called.

 4) Previous frame if in PendingAfterCompletion. So this is like 2) or 3) but another frame has been scheduled and should be fired after previous one finishes.

1) was causing SHOULD NEVER BE REACHED, and it was fixed in r216182. 

In 2) and 3) the value of m_coordinateUpdateCompletionWithClient might be changed in an unexpected way by the forceRepaint commit, causing updateCompleted() to be called twice and then crashing in SHOULD NEVER BE REACHED. This was fixed by this bug.

In 4) the value of m_coordinateUpdateCompletionWithClient might be changed in an unexpected way by the forceRepaint commit, causing updateCompleted() to never be called, causing the timeout in imported/blink/compositing/layer-creation/incremental-destruction.html and maybe bug #172027 too. This was fixed by this bug.

Maybe there are still cases not considered or we need to do something else with the refresh monitor, but at least after r216970 all tests crashing in SHOULD NEVER BE REACHED stopped crashing, test imported/blink/compositing/layer-creation/incremental-destruction.html is no longer timing out, and Adri can use github again. I admit I don&apos;t completely understand the whole frame update mechanism and refresh monitor, but it&apos;s a lot more stable now. Let&apos;s improve it on top of this if needed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1318808</commentid>
    <comment_count>13</comment_count>
    <who name="Charlie Turner">cturner</who>
    <bug_when>2017-06-13 14:01:08 -0700</bug_when>
    <thetext>I&apos;m still hitting case 1). I can pretty reliably trigger it by watching any YouTube video with Epiphany built against r218095. It&apos;s non-deterministic if you just let videos play, but I found that interacting with any of the controls is a sure fire way of getting this backtrace (among others unfortunately, but you always get one :))

The m_updateState is Completed when I enter the updateCompleted(): 

SHOULD NEVER BE REACHED
../../Source/WebKit2/Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.cpp(188) : void WebKit::CompositingRunLoop::updateCompleted()
1   0x7f0dc5e50818 /home/charlie/jhbuild/install/lib/libjavascriptcoregtk-4.0.so.18(WTFCrash+0x1e) [0x7f0dc5e50818]
2   0x7f0dcd8443a8 /home/charlie/jhbuild/install/lib/libwebkit2gtk-4.0.so.37(WebKit::CompositingRunLoop::updateCompleted()+0xe4) [0x7f0dcd8443a8]
3   0x7f0dcd849d6a /home/charlie/jhbuild/install/lib/libwebkit2gtk-4.0.so.37(WebKit::ThreadedCompositor::sceneUpdateFinished()+0xb8) [0x7f0dcd849d6a]
4   0x7f0dcd84a33f /home/charlie/jhbuild/install/lib/libwebkit2gtk-4.0.so.37(WebKit::ThreadedCompositor::frameComplete()+0x45) [0x7f0dcd84a33f]
5   0x7f0dcda48d06 /home/charlie/jhbuild/install/lib/libwebkit2gtk-4.0.so.37(WebKit::ThreadedCoordinatedLayerTreeHost::frameComplete()+0x26) [0x7f0dcda48d06]
6   0x7f0dcda50c15 /home/charlie/jhbuild/install/lib/libwebkit2gtk-4.0.so.37(WebKit::AcceleratedSurfaceX11::didRenderFrame()+0x27) [0x7f0dcda50c15]
7   0x7f0dcda48e55 /home/charlie/jhbuild/install/lib/libwebkit2gtk-4.0.so.37(WebKit::ThreadedCoordinatedLayerTreeHost::didRenderFrame()+0x43) [0x7f0dcda48e55]
8   0x7f0dcda49bdc /home/charlie/jhbuild/install/lib/libwebkit2gtk-4.0.so.37(WebKit::ThreadedCoordinatedLayerTreeHost::CompositorClient::didRenderFrame()+0x1c) [0x7f0dcda49bdc]
9   0x7f0dcd849c8e /home/charlie/jhbuild/install/lib/libwebkit2gtk-4.0.so.37(WebKit::ThreadedCompositor::renderLayerTree()+0x372) [0x7f0dcd849c8e]
10  0x7f0dcd8489cd /home/charlie/jhbuild/install/lib/libwebkit2gtk-4.0.so.37(+0x64e59cd) [0x7f0dcd8489cd]
11  0x7f0dcd84c916 /home/charlie/jhbuild/install/lib/libwebkit2gtk-4.0.so.37(+0x64e9916) [0x7f0dcd84c916]
12  0x357abca /home/charlie/jhbuild/install/libexec/webkit2gtk-4.0/WebKitWebProcess(std::function&lt;void ()&gt;::operator()() const+0x32) [0x357abca]
13  0x7f0dcd8443c8 /home/charlie/jhbuild/install/lib/libwebkit2gtk-4.0.so.37(WebKit::CompositingRunLoop::updateTimerFired()+0x1c) [0x7f0dcd8443c8]
14  0x7f0dcd847e58 /home/charlie/jhbuild/install/lib/libwebkit2gtk-4.0.so.37(WTF::RunLoop::Timer&lt;WebKit::CompositingRunLoop&gt;::fired()+0x66) [0x7f0dcd847e58]
15  0x7f0dc5ebeaf1 /home/charlie/jhbuild/install/lib/libjavascriptcoregtk-4.0.so.18(+0x2a78af1) [0x7f0dc5ebeaf1]
16  0x7f0dc5ebeb2d /home/charlie/jhbuild/install/lib/libjavascriptcoregtk-4.0.so.18(+0x2a78b2d) [0x7f0dc5ebeb2d]
17  0x7f0dc5ebe1a2 /home/charlie/jhbuild/install/lib/libjavascriptcoregtk-4.0.so.18(+0x2a781a2) [0x7f0dc5ebe1a2]
18  0x7f0dc5ebe1d1 /home/charlie/jhbuild/install/lib/libjavascriptcoregtk-4.0.so.18(+0x2a781d1) [0x7f0dc5ebe1d1]
19  0x7f0dc0c59dca /home/charlie/jhbuild/install/lib/libglib-2.0.so.0(g_main_context_dispatch+0x15a) [0x7f0dc0c59dca]
20  0x7f0dc0c5a170 /home/charlie/jhbuild/install/lib/libglib-2.0.so.0(+0x4b170) [0x7f0dc0c5a170]
21  0x7f0dc0c5a492 /home/charlie/jhbuild/install/lib/libglib-2.0.so.0(g_main_loop_run+0xc2) [0x7f0dc0c5a492]
22  0x7f0dc5ebe738 /home/charlie/jhbuild/install/lib/libjavascriptcoregtk-4.0.so.18(WTF::RunLoop::run()+0xba) [0x7f0dc5ebe738]
23  0x7f0dc5ebc20e /home/charlie/jhbuild/install/lib/libjavascriptcoregtk-4.0.so.18(+0x2a7620e) [0x7f0dc5ebc20e]
24  0x7f0dc5ebdc82 /home/charlie/jhbuild/install/lib/libjavascriptcoregtk-4.0.so.18(+0x2a77c82) [0x7f0dc5ebdc82]
25  0x351a3cf /home/charlie/jhbuild/install/libexec/webkit2gtk-4.0/WebKitWebProcess(WTF::Function&lt;void ()&gt;::operator()() const+0x37) [0x351a3cf]
26  0x7f0dc5e74e9e /home/charlie/jhbuild/install/lib/libjavascriptcoregtk-4.0.so.18(+0x2a2ee9e) [0x7f0dc5e74e9e]
27  0x7f0dc5eba77b /home/charlie/jhbuild/install/lib/libjavascriptcoregtk-4.0.so.18(+0x2a7477b) [0x7f0dc5eba77b]
28  0x7f0dbecfa6ba /lib/x86_64-linux-gnu/libpthread.so.0(+0x76ba) [0x7f0dbecfa6ba]
29  0x7f0dbdd7382d /lib/x86_64-linux-gnu/libc.so.6(clone+0x6d) [0x7f0dbdd7382d]</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1318909</commentid>
    <comment_count>14</comment_count>
    <who name="Charlie Turner">cturner</who>
    <bug_when>2017-06-13 17:10:38 -0700</bug_when>
    <thetext>FWIW, I did test the change to have m_isActive an atomic bool, but that didn&apos;t slow down the frequency of crashing much.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>310260</attachid>
            <date>2017-05-16 06:49:41 -0700</date>
            <delta_ts>2017-05-16 10:16:40 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>wk2-tc-crash.diff</filename>
            <type>text/plain</type>
            <size>4668</size>
            <attacher name="Carlos Garcia Campos">cgarcia</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1NvdXJjZS9XZWJLaXQyL0NoYW5nZUxvZyBiL1NvdXJjZS9XZWJLaXQyL0No
YW5nZUxvZwppbmRleCAwMzllYjJlNmQxNy4uNjRiOTlkNTNjNmMgMTAwNjQ0Ci0tLSBhL1NvdXJj
ZS9XZWJLaXQyL0NoYW5nZUxvZworKysgYi9Tb3VyY2UvV2ViS2l0Mi9DaGFuZ2VMb2cKQEAgLTEs
NSArMSwyOSBAQAogMjAxNy0wNS0xNiAgQ2FybG9zIEdhcmNpYSBDYW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Tg1MmE3IDEwMDY0NAotLS0g
YS9Tb3VyY2UvV2ViS2l0Mi9TaGFyZWQvQ29vcmRpbmF0ZWRHcmFwaGljcy90aHJlYWRlZGNvbXBv
c2l0b3IvVGhyZWFkZWREaXNwbGF5UmVmcmVzaE1vbml0b3IuY3BwCisrKyBiL1NvdXJjZS9XZWJL
aXQyL1NoYXJlZC9Db29yZGluYXRlZEdyYXBoaWNzL3RocmVhZGVkY29tcG9zaXRvci9UaHJlYWRl
ZERpc3BsYXlSZWZyZXNoTW9uaXRvci5jcHAKQEAgLTY2LDYgKzY2LDggQEAgYm9vbCBUaHJlYWRl
ZERpc3BsYXlSZWZyZXNoTW9uaXRvcjo6cmVxdWlyZXNEaXNwbGF5UmVmcmVzaENhbGxiYWNrKCkK
IAogdm9pZCBUaHJlYWRlZERpc3BsYXlSZWZyZXNoTW9uaXRvcjo6ZGlzcGF0Y2hEaXNwbGF5UmVm
cmVzaENhbGxiYWNrKCkKIHsKKyAgICBpZiAoIW1fY29tcG9zaXRvcikKKyAgICAgICAgcmV0dXJu
OwogICAgIG1fZGlzcGxheVJlZnJlc2hUaW1lci5zdGFydE9uZVNob3QoMCk7CiB9CiAK
</data>
<flag name="review"
          id="331348"
          type_id="1"
          status="+"
          setter="mcatanzaro"
    />
          </attachment>
      

    </bug>

</bugzilla>