<?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>165655</bug_id>
          
          <creation_ts>2016-12-09 08:45:58 -0800</creation_ts>
          <short_desc>[SOUP] Network process crash in WebKit::CustomProtocolManagerImpl::start</short_desc>
          <delta_ts>2017-01-03 04:57:13 -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>WebKitGTK</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>165082</dup_id>
          <see_also>https://bugzilla.redhat.com/show_bug.cgi?id=1403138</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael Catanzaro">mcatanzaro</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bugs-noreply</cc>
    
    <cc>cgarcia</cc>
    
    <cc>mcatanzaro</cc>
    
    <cc>zan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1258139</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2016-12-09 08:45:58 -0800</bug_when>
    <thetext>We seem to have a lot of SOUP crashes in WebKit::CustomProtocolManagerImpl (e.g. bug #149565, bug #165082). Here&apos;s one more:

Truncated backtrace:
Thread no. 1 (10 frames)
 #0 g_type_check_instance_cast at gtype.c:4051
 #1 WebKit::WebSoupRequestAsyncData::~WebSoupRequestAsyncData at /usr/src/debug/webkitgtk-2.14.2/Source/WebKit2/NetworkProcess/CustomProtocols/soup/CustomProtocolManagerImpl.cpp:55
 #2 std::default_delete&lt;WebKit::WebSoupRequestAsyncData&gt;::operator() at /usr/include/c++/6.2.1/bits/unique_ptr.h:76
 #3 std::unique_ptr&lt;WebKit::WebSoupRequestAsyncData, std::default_delete&lt;WebKit::WebSoupRequestAsyncData&gt; &gt;::reset at /usr/include/c++/6.2.1/bits/unique_ptr.h:344
 #4 std::unique_ptr&lt;WebKit::WebSoupRequestAsyncData, std::default_delete&lt;WebKit::WebSoupRequestAsyncData&gt; &gt;::operator=(std::unique_ptr&lt;WebKit::WebSoupRequestAsyncData, std::default_delete&lt;WebKit::WebSoupRequestAsyncData&gt; &gt;&amp;&amp;) at /usr/include/c++/6.2.1/bits/unique_ptr.h:251
 #5 WTF::HashMap&lt;unsigned long, std::unique_ptr&lt;WebKit::WebSoupRequestAsyncData, std::default_delete&lt;WebKit::WebSoupRequestAsyncData&gt; &gt;, WTF::IntHash&lt;unsigned long&gt;, WTF::HashTraits&lt;unsigned long&gt;, WTF::HashTraits&lt;std::unique_ptr&lt;WebKit::WebSoupRequestAsyncData, std::default_delete&lt;WebKit::WebSoupRequestAsyncData&gt; &gt; &gt; &gt;::inlineSet&lt;unsigned long const&amp;, std::unique_ptr&lt;WebKit::WebSoupRequestAsyncData, std::default_delete&lt;WebKit::WebSoupRequestAsyncData&gt; &gt; &gt;(unsigned long const&amp;, std::unique_ptr&lt;WebKit::WebSoupRequestAsyncData, std::default_delete&lt;WebKit::WebSoupRequestAsyncData&gt; &gt;&amp;&amp;) at /usr/src/debug/webkitgtk-2.14.2/Source/WTF/wtf/HashMap.h:308
 #6 WTF::HashMap&lt;unsigned long, std::unique_ptr&lt;WebKit::WebSoupRequestAsyncData, std::default_delete&lt;WebKit::WebSoupRequestAsyncData&gt; &gt;, WTF::IntHash&lt;unsigned long&gt;, WTF::HashTraits&lt;unsigned long&gt;, WTF::HashTraits&lt;std::unique_ptr&lt;WebKit::WebSoupRequestAsyncData, std::default_delete&lt;WebKit::WebSoupRequestAsyncData&gt; &gt; &gt; &gt;::set&lt;std::unique_ptr&lt;WebKit::WebSoupRequestAsyncData, std::default_delete&lt;WebKit::WebSoupRequestAsyncData&gt; &gt; &gt;(unsigned long const&amp;, std::unique_ptr&lt;WebKit::WebSoupRequestAsyncData, std::default_delete&lt;WebKit::WebSoupRequestAsyncData&gt; &gt;&amp;&amp;) at /usr/src/debug/webkitgtk-2.14.2/Source/WTF/wtf/HashMap.h:331
 #7 WebKit::CustomProtocolManagerImpl::start at /usr/src/debug/webkitgtk-2.14.2/Source/WebKit2/NetworkProcess/CustomProtocols/soup/CustomProtocolManagerImpl.cpp:201
 #8 WebCore::ResourceHandle::start at /usr/src/debug/webkitgtk-2.14.2/Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp:1032
 #9 WebCore::ResourceHandle::create at /usr/src/debug/webkitgtk-2.14.2/Source/WebCore/platform/network/ResourceHandle.cpp:101

The user reports &quot;just after logging into computer the alert popped up saying that an error occurred.&quot; Full backtrace downstream.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1263300</commentid>
    <comment_count>1</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2017-01-02 06:53:54 -0800</bug_when>
    <thetext>This is pretty weird... The crash happens in:

m_customProtocolMap.set(customProtocolID, std::make_unique&lt;WebSoupRequestAsyncData&gt;(task, request));

And the bt says that there&apos;s already an entry in the map for the customProtocolID (68). That&apos;s not expected to happen, since that value comes from:

uint64_t customProtocolID = generateCustomProtocolID();

So, what happens is that the current value for that customProtocolID is deleted and in ~WebSoupRequestAsyncData() request is non-null but it&apos;s not a GObject either, so g_object_remove_weak_pointer fails.

This is probably due to a memory corruption or something. Do you know how to reproduce the crash?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1263307</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2017-01-02 07:52:26 -0800</bug_when>
    <thetext>(In reply to comment #1)
&gt; Do you know how to reproduce the crash?

Nope.

FYI: this particular crash has only two reports total in Fedora, so maybe not a priority. The similar crash bug #149565 has 157 reports, but none since 2.10.4, so I&apos;ve closed it just now. The also-similar bug #165082 has 850 reports still rolling in, most recently on Saturday.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1263432</commentid>
    <comment_count>3</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2017-01-03 04:57:13 -0800</bug_when>
    <thetext>Let&apos;s assume this is related to bug #165082.

*** This bug has been marked as a duplicate of bug 165082 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>