<?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>192513</bug_id>
          
          <creation_ts>2018-12-07 13:50:26 -0800</creation_ts>
          <short_desc>Crash in WebCore::ServiceWorkerGlobalScope</short_desc>
          <delta_ts>2019-01-04 10:47:34 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Service Workers</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Alicia Boya García">aboya</reporter>
          <assigned_to name="youenn fablet">youennf</assigned_to>
          <cc>achristensen</cc>
    
    <cc>bfulgham</cc>
    
    <cc>commit-queue</cc>
    
    <cc>mcatanzaro</cc>
    
    <cc>product-security</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>youennf</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1486130</commentid>
    <comment_count>0</comment_count>
    <who name="Alicia Boya García">aboya</who>
    <bug_when>2018-12-07 13:50:26 -0800</bug_when>
    <thetext>Happened while loading http://youtube.com in Debug. The page continued working after that.

(gdb) f 1
#1  0x00007efe604440e6 in WTF::Ref&lt;WebCore::ServiceWorkerThread, WTF::DumbPtrTraits&lt;WebCore::ServiceWorkerThread&gt; &gt;::operator-&gt; (this=0x7efdf02ae620) at DerivedSources/ForwardingHeaders/wtf/Ref.h:119
119	    T* operator-&gt;() const { ASSERT(m_ptr); return PtrTraits::unwrap(m_ptr); }
(gdb) p m_ptr
$1 = (WTF::DumbPtrTraits&lt;WebCore::ServiceWorkerThread&gt;::StorageType) 0x0

[Current thread is 1 (Thread 0x7efe46465ac0 (LWP 23273))]
#0  WTFCrash () at ../../Source/WTF/wtf/Assertions.cpp:255
#1  0x00007efe604440e6 in WTF::Ref&lt;WebCore::ServiceWorkerThread, WTF::DumbPtrTraits&lt;WebCore::ServiceWorkerThread&gt; &gt;::operator-&gt; (this=0x7efdf02ae620) at DerivedSources/ForwardingHeaders/wtf/Ref.h:119
#2  0x00007efe6043c6ac in WebCore::ServiceWorkerGlobalScope::&lt;lambda()&gt;::operator()(void) (__closure=0x7efdf02ae620) at ../../Source/WebCore/workers/service/ServiceWorkerGlobalScope.cpp:65
#3  0x00007efe60443de2 in WTF::Function&lt;void()&gt;::CallableWrapper&lt;WebCore::ServiceWorkerGlobalScope::skipWaiting(WTF::Ref&lt;WebCore::DeferredPromise&gt;&amp;&amp;)::&lt;lambda()&gt; &gt;::call(void) (this=0x7efdf02ae618)
    at DerivedSources/ForwardingHeaders/wtf/Function.h:101
#4  0x00007efe5d585f42 in WTF::Function&lt;void ()&gt;::operator()() const (this=0x7ffeca2f0158) at DerivedSources/ForwardingHeaders/wtf/Function.h:56
#5  0x00007efe5304bf05 in WTF::dispatchFunctionsFromMainThread () at ../../Source/WTF/wtf/MainThread.cpp:115
#6  0x00007efe530aa2bd in WTF::MainThreadDispatcher::fired (this=0x7efe54285220 &lt;WTF::scheduleDispatchFunctionsOnMainThread()::dispatcher&gt;) at ../../Source/WTF/wtf/generic/MainThreadGeneric.cpp:67
#7  0x00007efe530aa404 in WTF::RunLoop::Timer&lt;WTF::MainThreadDispatcher&gt;::fired (this=0x7efe54285220 &lt;WTF::scheduleDispatchFunctionsOnMainThread()::dispatcher&gt;) at ../../Source/WTF/wtf/RunLoop.h:148
#8  0x00007efe530ad14b in WTF::RunLoop::TimerBase::&lt;lambda(gpointer)&gt;::operator()(gpointer) const (__closure=0x0, userData=0x7efe54285220 &lt;WTF::scheduleDispatchFunctionsOnMainThread()::dispatcher&gt;)
    at ../../Source/WTF/wtf/glib/RunLoopGLib.cpp:170
#9  0x00007efe530ad1a3 in WTF::RunLoop::TimerBase::&lt;lambda(gpointer)&gt;::_FUN(gpointer) () at ../../Source/WTF/wtf/glib/RunLoopGLib.cpp:176
#10 0x00007efe530ac8c8 in WTF::&lt;lambda(GSource*, GSourceFunc, gpointer)&gt;::operator()(GSource *, GSourceFunc, gpointer) const (__closure=0x0, source=0x7efdc80031a0, 
    callback=0x7efe530ad186 &lt;WTF::RunLoop::TimerBase::&lt;lambda(gpointer)&gt;::_FUN(gpointer)&gt;, userData=0x7efe54285220 &lt;WTF::scheduleDispatchFunctionsOnMainThread()::dispatcher&gt;)
    at ../../Source/WTF/wtf/glib/RunLoopGLib.cpp:45
#11 0x00007efe530ac8f8 in WTF::&lt;lambda(GSource*, GSourceFunc, gpointer)&gt;::_FUN(GSource *, GSourceFunc, gpointer) () at ../../Source/WTF/wtf/glib/RunLoopGLib.cpp:46
#12 0x00007efe4a526818 in g_main_dispatch () at /webkit/WebKitBuild/DependenciesGTK/Source/glib-2.54.2/glib/gmain.c:3148
#13 g_main_context_dispatch () at /webkit/WebKitBuild/DependenciesGTK/Source/glib-2.54.2/glib/gmain.c:3813
#14 0x00007efe4a526bd8 in g_main_context_iterate () at /webkit/WebKitBuild/DependenciesGTK/Source/glib-2.54.2/glib/gmain.c:3886
#15 0x00007efe4a526ec2 in g_main_loop_run () at /webkit/WebKitBuild/DependenciesGTK/Source/glib-2.54.2/glib/gmain.c:4082
#16 0x00007efe530ace06 in WTF::RunLoop::run () at ../../Source/WTF/wtf/glib/RunLoopGLib.cpp:96
#17 0x00007efe5df87a71 in WebKit::ChildProcessMain&lt;WebKit::WebProcess, WebKit::WebProcessMain&gt; (argc=3, argv=0x7ffeca2f0598) at ../../Source/WebKit/Shared/unix/ChildProcessMain.h:61
#18 0x00007efe5df8534f in WebKit::WebProcessMainUnix (argc=3, argv=0x7ffeca2f0598) at ../../Source/WebKit/WebProcess/gtk/WebProcessMainGtk.cpp:67
#19 0x0000000000400cc1 in main (argc=3, argv=0x7ffeca2f0598) at ../../Source/WebKit/WebProcess/EntryPoint/unix/WebProcessMain.cpp:52</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1486131</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2018-12-07 13:50:47 -0800</bug_when>
    <thetext>&lt;rdar://problem/46563880&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1490648</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2018-12-22 17:14:57 -0800</bug_when>
    <thetext>(Note that null pointer dereference is at worst a DoS issue, so I don&apos;t think this needs to remain private.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1490649</commentid>
    <comment_count>3</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2018-12-22 17:17:53 -0800</bug_when>
    <thetext>Just from quick code inspection:

            connection-&gt;skipWaiting(workerThread-&gt;identifier(), [workerThread = WTFMove(workerThread), requestIdentifier] {

This is illegal because workerThread could be moved from in the second argument before the first argument is evaluated. It needs a temporary variable to hold the result of workerThread-&gt;identifier().</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1491694</commentid>
    <comment_count>4</comment_count>
      <attachid>358327</attachid>
    <who name="youenn fablet">youennf</who>
    <bug_when>2019-01-04 10:00:44 -0800</bug_when>
    <thetext>Created attachment 358327
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1491733</commentid>
    <comment_count>5</comment_count>
      <attachid>358327</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2019-01-04 10:47:32 -0800</bug_when>
    <thetext>Comment on attachment 358327
Patch

Clearing flags on attachment: 358327

Committed r239620: &lt;https://trac.webkit.org/changeset/239620&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1491734</commentid>
    <comment_count>6</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2019-01-04 10:47:34 -0800</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>358327</attachid>
            <date>2019-01-04 10:00:44 -0800</date>
            <delta_ts>2019-01-04 10:47:32 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>bug-192513-20190104100043.patch</filename>
            <type>text/plain</type>
            <size>2019</size>
            <attacher name="youenn fablet">youennf</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMjM5NTk0CmRpZmYgLS1naXQgYS9Tb3VyY2UvV2ViQ29yZS9D
aGFuZ2VMb2cgYi9Tb3VyY2UvV2ViQ29yZS9DaGFuZ2VMb2cKaW5kZXggZWZjODkyZmQwNGM4OTVk
ZGZmOTM1YzI5MWViMWU1MGZhYTU0OTdjYS4uMDY4MjkxNDczNTVlNTk1MWQ5NWY1NWEzYjgzNjEy
YjMwYTc0MzY5NiAxMDA2NDQKLS0tIGEvU291cmNlL1dlYkNvcmUvQ2hhbmdlTG9nCisrKyBiL1Nv
dXJjZS9XZWJDb3JlL0NoYW5nZUxvZwpAQCAtMSwzICsxLDE2IEBACisyMDE5LTAxLTA0ICBZb3Vl
bm4gRmFibGV0ICA8eW91ZW5uQGFwcGxlLmNvbT4KKworICAgICAgICBDcmFzaCBpbiBXZWJDb3Jl
OjpTZXJ2aWNlV29ya2VyR2xvYmFsU2NvcGUKKyAgICAgICAgaHR0cHM6Ly9idWdzLndlYmtpdC5v
cmcvc2hvd19idWcuY2dpP2lkPTE5MjUxMworICAgICAgICA8cmRhcjovL3Byb2JsZW0vNDY1NjM4
ODA+CisKKyAgIC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jb3BlOjpza2lwV2Fp
dGluZyhSZWY8RGVmZXJyZWRQcm9taXNlPiYmIHByb21pc2UpCiAKICAgICBjYWxsT25NYWluVGhy
ZWFkKFt3b3JrZXJUaHJlYWQgPSBtYWtlUmVmKHRocmVhZCgpKSwgcmVxdWVzdElkZW50aWZpZXJd
KCkgbXV0YWJsZSB7CiAgICAgICAgIGlmIChhdXRvKiBjb25uZWN0aW9uID0gU1dDb250ZXh0TWFu
YWdlcjo6c2luZ2xldG9uKCkuY29ubmVjdGlvbigpKSB7Ci0gICAgICAgICAgICBjb25uZWN0aW9u
LT5za2lwV2FpdGluZyh3b3JrZXJUaHJlYWQtPmlkZW50aWZpZXIoKSwgW3dvcmtlclRocmVhZCA9
IFdURk1vdmUod29ya2VyVGhyZWFkKSwgcmVxdWVzdElkZW50aWZpZXJdIHsKKyAgICAgICAgICAg
IGF1dG8gaWRlbnRpZmllciA9IHdvcmtlclRocmVhZC0+aWRlbnRpZmllcigpOworICAgICAgICAg
ICAgY29ubmVjdGlvbi0+c2tpcFdhaXRpbmcoaWRlbnRpZmllciwgW3dvcmtlclRocmVhZCA9IFdU
Rk1vdmUod29ya2VyVGhyZWFkKSwgcmVxdWVzdElkZW50aWZpZXJdIHsKICAgICAgICAgICAgICAg
ICB3b3JrZXJUaHJlYWQtPnJ1bkxvb3AoKS5wb3N0VGFzayhbcmVxdWVzdElkZW50aWZpZXJdKGF1
dG8mIGNvbnRleHQpIHsKICAgICAgICAgICAgICAgICAgICAgYXV0byYgc2NvcGUgPSBkb3duY2Fz
dDxTZXJ2aWNlV29ya2VyR2xvYmFsU2NvcGU+KGNvbnRleHQpOwogICAgICAgICAgICAgICAgICAg
ICBpZiAoYXV0byBwcm9taXNlID0gc2NvcGUubV9wZW5kaW5nU2tpcFdhaXRpbmdQcm9taXNlcy50
YWtlKHJlcXVlc3RJZGVudGlmaWVyKSkK
</data>

          </attachment>
      

    </bug>

</bugzilla>