<?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>56045</bug_id>
          
          <creation_ts>2011-03-09 12:26:25 -0800</creation_ts>
          <short_desc>REGRESSION (r79781-r79968): Many leaks seen beneath JSWorkerContextBase and WorkerScriptController constructors (leaking a JSGlobalData/JSGlobalObject?)</short_desc>
          <delta_ts>2011-03-17 23:02:26 -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>JavaScriptCore</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>56619</dup_id>
          
          <bug_file_loc>http://build.webkit.org/LeaksViewer/?url=http://build.webkit.org/results/SnowLeopard%20Intel%20Leaks/r80646%20(15446)/DumpRenderTree12-leaks.txt</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="Adam Roben (:aroben)">aroben</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
    
    <cc>barraclough</cc>
    
    <cc>dimich</cc>
    
    <cc>ggaren</cc>
    
    <cc>levin</cc>
    
    <cc>oliver</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>364689</commentid>
    <comment_count>0</comment_count>
    <who name="Adam Roben (:aroben)">aroben</who>
    <bug_when>2011-03-09 12:26:25 -0800</bug_when>
    <thetext>To see the leaks:

1. Go to http://build.webkit.org/LeaksViewer/?url=http://build.webkit.org/results/SnowLeopard%20Intel%20Leaks/r80646%20(15446)/DumpRenderTree12-leaks.txt
2. Select &quot;Tree (Top Down)&quot; at the bottom of the page
3. Sort by &quot;Total&quot;
4. Start digging in

Pretty much all of the leaks seem to be beneath the JSWorkerContextBase and WorkerScriptController constructors. It looks like we&apos;re leaking a JSGlobalObject and a JSGlobalData.

I don&apos;t know whether this is a regression.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>364690</commentid>
    <comment_count>1</comment_count>
    <who name="Adam Roben (:aroben)">aroben</who>
    <bug_when>2011-03-09 12:26:59 -0800</bug_when>
    <thetext>&lt;rdar://problem/9109988&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>366131</commentid>
    <comment_count>2</comment_count>
    <who name="Adam Roben (:aroben)">aroben</who>
    <bug_when>2011-03-11 11:09:25 -0800</bug_when>
    <thetext>Looks like the leaks started happening in this range:

http://build.webkit.org/builders/SnowLeopard%20Intel%20Leaks/builds/15150
http://build.webkit.org/builders/SnowLeopard%20Intel%20Leaks/builds/15280</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>366139</commentid>
    <comment_count>3</comment_count>
    <who name="Adam Roben (:aroben)">aroben</who>
    <bug_when>2011-03-11 11:16:35 -0800</bug_when>
    <thetext>Narrowed it down a little further:

http://build.webkit.org/builders/SnowLeopard%20Intel%20Leaks/builds/15164 (good)
http://build.webkit.org/builders/SnowLeopard%20Intel%20Leaks/builds/15255 (bad)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>366141</commentid>
    <comment_count>4</comment_count>
    <who name="Adam Roben (:aroben)">aroben</who>
    <bug_when>2011-03-11 11:17:54 -0800</bug_when>
    <thetext>http://build.webkit.org/builders/SnowLeopard%20Intel%20Leaks/builds/15235 (bad)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>366143</commentid>
    <comment_count>5</comment_count>
    <who name="Adam Roben (:aroben)">aroben</who>
    <bug_when>2011-03-11 11:18:27 -0800</bug_when>
    <thetext>http://build.webkit.org/builders/SnowLeopard%20Intel%20Leaks/builds/15220 (bad)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>366152</commentid>
    <comment_count>6</comment_count>
    <who name="Adam Roben (:aroben)">aroben</who>
    <bug_when>2011-03-11 11:23:23 -0800</bug_when>
    <thetext>Looks like there were a lot of JSC changes in this period and no workers changes.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>366158</commentid>
    <comment_count>7</comment_count>
    <who name="David Levin">levin</who>
    <bug_when>2011-03-11 11:27:38 -0800</bug_when>
    <thetext>fwiw it seems like all leaks were related to strings allocated for Identifier. I haven&apos;t been able to figure out where the ref count goes wrong on them yet (and likely won&apos;t have much time over the next few days to get further as I&apos;m on tap to be the Chrome WebKit gardener for the next 4 working days).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>366216</commentid>
    <comment_count>8</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2011-03-11 12:11:18 -0800</bug_when>
    <thetext>I briefly looked at Identifier string handling, and I don&apos;t see how strings are removed from HashSet. If we can get dangling pointers there, that would be pretty bad.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>367164</commentid>
    <comment_count>9</comment_count>
    <who name="Adam Roben (:aroben)">aroben</who>
    <bug_when>2011-03-14 13:18:17 -0700</bug_when>
    <thetext>Looks like the leaks don&apos;t happen in every build: http://build.webkit.org/builders/SnowLeopard%20Intel%20Leaks/builds/15500</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>367177</commentid>
    <comment_count>10</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2011-03-14 13:29:10 -0700</bug_when>
    <thetext>See also: bug 56304.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>367208</commentid>
    <comment_count>11</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2011-03-14 14:08:41 -0700</bug_when>
    <thetext>&gt; I don&apos;t see how strings are removed from HashSet

It&apos;s it StringImpl destructor: 

#if USE(JSC)
    if (isIdentifier()) {
        if (!wtfThreadData().currentIdentifierTable()-&gt;remove(this))
            CRASH();
    }
#endif</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>367335</commentid>
    <comment_count>12</comment_count>
    <who name="Mark Rowe (bdash)">mrowe</who>
    <bug_when>2011-03-14 16:26:33 -0700</bug_when>
    <thetext>This also happens outside of the context of workers.  &lt;http://build.webkit.org/results/SnowLeopard%20Intel%20Leaks/r81055%20(15563)/DumpRenderTree14-leaks.txt&gt; shows a number of leaks originating from DRT’s JavaScriptCore thread.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>369515</commentid>
    <comment_count>13</comment_count>
    <who name="Geoffrey Garen">ggaren</who>
    <bug_when>2011-03-17 23:02:26 -0700</bug_when>
    <thetext>

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

    </bug>

</bugzilla>