<?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>85473</bug_id>
          
          <creation_ts>2012-05-03 04:01:30 -0700</creation_ts>
          <short_desc>IconDatabase thread causes assertion failure: m_verifier.isSafeToUse()</short_desc>
          <delta_ts>2012-05-24 14:57:16 -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>WebCore Misc.</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>67582</dup_id>
          
          <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>0</everconfirmed>
          <reporter name="Dongseong Hwang">dongseong.hwang</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>andersca</cc>
    
    <cc>ap</cc>
    
    <cc>beidson</cc>
    
    <cc>darin</cc>
    
    <cc>levin</cc>
    
    <cc>yong.li.webkit</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>615151</commentid>
    <comment_count>0</comment_count>
    <who name="Dongseong Hwang">dongseong.hwang</who>
    <bug_when>2012-05-03 04:01:30 -0700</bug_when>
    <thetext>adopted(RefCountedBase*) means new start of ia refCounted instance.
RefPtr::release calls WTF::adopted to reset, so RefCounted thread verification
code should reset.

SharedBuffer used by IconDatabase causes the assertion failure because
IconDatabase passes SharedBuffer to main thread.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>615153</commentid>
    <comment_count>1</comment_count>
      <attachid>139981</attachid>
    <who name="Dongseong Hwang">dongseong.hwang</who>
    <bug_when>2012-05-03 04:03:36 -0700</bug_when>
    <thetext>Created attachment 139981
patch v.1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>615155</commentid>
    <comment_count>2</comment_count>
    <who name="Dongseong Hwang">dongseong.hwang</who>
    <bug_when>2012-05-03 04:10:16 -0700</bug_when>
    <thetext>Following code causes assertion failure.
In IconDatabase.cpp

    RefPtr&lt;SharedBuffer&gt; data = dataOriginal ? dataOriginal-&gt;copy() : PassRefPtr&lt;SharedBuffer&gt;(0);
    ....
    {
        MutexLocker locker(m_urlAndIconLock);
        ....
        // Update the data and set the time stamp
        icon-&gt;setImageData(data.release());
        ....
    }</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>615261</commentid>
    <comment_count>3</comment_count>
      <attachid>139981</attachid>
    <who name="David Levin">levin</who>
    <bug_when>2012-05-03 07:24:14 -0700</bug_when>
    <thetext>Comment on attachment 139981
patch v.1

adopted just means that a refcount that wasn&apos;t accounted for now is. This is no reason to reset the verifier.


Something is wrong in this code and this change just attempts to hide the problem.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>615265</commentid>
    <comment_count>4</comment_count>
    <who name="David Levin">levin</who>
    <bug_when>2012-05-03 07:30:34 -0700</bug_when>
    <thetext>If you want to understand the assert, figure out what invariant is being violated when the assert goes off and either why that invariant is incorrect or how to fix the code.

Note here is a similar bug: https://bugs.webkit.org/show_bug.cgi?id=67582

(Perhaps it is the same issue. It is hard to tell from what is in this bug.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>615945</commentid>
    <comment_count>5</comment_count>
    <who name="Dongseong Hwang">dongseong.hwang</who>
    <bug_when>2012-05-03 21:28:13 -0700</bug_when>
    <thetext>Ok, I made mistake that I thought RefPtr::release means passing ownership.

I need to study more about this bug, and if it is duplicated with Bug 67582, I will close this bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>615946</commentid>
    <comment_count>6</comment_count>
    <who name="David Levin">levin</who>
    <bug_when>2012-05-03 21:29:53 -0700</bug_when>
    <thetext>(In reply to comment #5)
&gt; Ok, I made mistake that I thought RefPtr::release means passing ownership.

It means passing ownership of that one ref count but other places may have a ref on the object (and they do in this case).

&gt; I need to study more about this bug, and if it is duplicated with Bug 67582, I will close this bug.

I think the only thing stopping bug 67582 is some wierd windows compile error. I wish we could land it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>633267</commentid>
    <comment_count>7</comment_count>
    <who name="Yong Li">yong.li.webkit</who>
    <bug_when>2012-05-24 14:57:16 -0700</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 67582 ***</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>139981</attachid>
            <date>2012-05-03 04:03:36 -0700</date>
            <delta_ts>2012-05-03 07:24:13 -0700</delta_ts>
            <desc>patch v.1</desc>
            <filename>0001-IconDatabase-thread-causes-assertion-failure-m_verif.patch</filename>
            <type>text/plain</type>
            <size>2016</size>
            <attacher name="Dongseong Hwang">dongseong.hwang</attacher>
            
              <data encoding="base64">RnJvbSA3ZDQ1ODA4ZDc1OWFlMmIwOGE4ZTNmZjJjNWYyMzBkNGZmZWFmYTdiIE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBIdWFuZyBEb25nc3VuZyA8bHV4dGVsbGFAY29tcGFueTEwMC5u
ZXQ+CkRhdGU6IFRodSwgMyBNYXkgMjAxMiAxOTowNTozMyArMDkwMApTdWJqZWN0OiBbUEFUQ0hd
IEljb25EYXRhYmFzZSB0aHJlYWQgY2F1c2VzIGFzc2VydGlvbiBmYWlsdXJlOgogbV92ZXJpZmll
ci5pc1NhZmVUb1VzZSgpCiBodHRwczovL2J1Z3Mud2Via2l0Lm9yZy9zaG93X2J1Zy5jZ2k/aWQ9
ODU0NzMKCldURjo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mVndW4pOwogICAgIG9iamVjdC0+bV9hZG9wdGlvbklzUmVxdWlyZWQgPSBmYWxzZTsKKyAg
ICBvYmplY3QtPm1fdmVyaWZpZXIgPSBUaHJlYWRSZXN0cmljdGlvblZlcmlmaWVyKCk7CiB9CiAK
ICNlbmRpZgotLSAKMS43LjkuNQoK
</data>
<flag name="review"
          id="145726"
          type_id="1"
          status="-"
          setter="levin"
    />
    <flag name="commit-queue"
          id="145727"
          type_id="3"
          status="-"
          setter="levin"
    />
          </attachment>
      

    </bug>

</bugzilla>