<?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>40654</bug_id>
          
          <creation_ts>2010-06-15 23:00:53 -0700</creation_ts>
          <short_desc>Database access in worker threads results in memory leaks due to lack of autorelease pool</short_desc>
          <delta_ts>2010-08-23 17:11:21 -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>Mac</rep_platform>
          <op_sys>OS X 10.6</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc>http://build.webkit.org/results/SnowLeopard%20Intel%20Leaks/r61233%20(8108)/fast/workers/storage/change-version-handle-reuse-worker-stderr.txt</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>40655</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Mark Rowe (bdash)">mrowe</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
    
    <cc>beidson</cc>
    
    <cc>darin</cc>
    
    <cc>dimich</cc>
    
    <cc>dumi</cc>
    
    <cc>ericu</cc>
    
    <cc>simon.fraser</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>238677</commentid>
    <comment_count>0</comment_count>
    <who name="Mark Rowe (bdash)">mrowe</who>
    <bug_when>2010-06-15 23:00:53 -0700</bug_when>
    <thetext>You can see the following stderr output from a number of worker tests while running the regression tests:

2010-06-15 22:13:15.128 DumpRenderTree[29876:766f] *** __NSAutoreleaseNoPool(): Object 0x11a5a2f70 of class NSCFString autoreleased with no pool in place - just leaking

If you look at &lt;http://build.webkit.org/results/SnowLeopard%20Intel%20Leaks/r61233%20(8108)/DumpRenderTree2-leaks.txt&gt; you can also see that these objects are in fact leaked.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>241426</commentid>
    <comment_count>1</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2010-06-22 13:33:16 -0700</bug_when>
    <thetext>http://trac.webkit.org/changeset/61626
http://trac.webkit.org/changeset/61627</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>241429</commentid>
    <comment_count>2</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2010-06-22 13:41:30 -0700</bug_when>
    <thetext>See also: bug 40655.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>268191</commentid>
    <comment_count>3</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2010-08-23 16:49:27 -0700</bug_when>
    <thetext>So callOnMainThread() requires an autorelease pool?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>268203</commentid>
    <comment_count>4</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2010-08-23 17:08:24 -0700</bug_when>
    <thetext>Here&apos;s where the autorelease spew is coming from:

#0  0x00007fff80fe6d94 in __NSAutoreleaseNoPool ()
#1  0x00007fff80f32099 in _CFAutoreleasePoolAddObject ()
#2  0x00007fff80f31e06 in -[NSObject(NSObject) autorelease] ()
#3  0x00000001019352ed in HardAutorelease (obj=0x105c3c960) at FoundationExtras.h:73
#4  0x0000000101935311 in WTF::StringImpl::operator NSString* (this=0x105c07c70) at /Volumes/Monster/Development/apple/webkit/WebKit.git/WebCore/platform/text/mac/StringImplMac.mm:30
#5  0x000000010085119f in WTF::String::operator NSString* (this=0x108fa7440) at WTFString.h:277
#6  0x00000001008a3158 in WebDatabaseTrackerClient::dispatchDidModifyDatabase (this=0x107810ec0, origin=0x10790cc10, databaseIdentifier=@0x108fa7440) at /Volumes/Monster/Development/apple/webkit/

WebDatabaseTrackerClient::dispatchDidModifyDatabase() is doing Obj-C stuff.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>268205</commentid>
    <comment_count>5</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2010-08-23 17:09:44 -0700</bug_when>
    <thetext>Or is it wrong for dispatchDidModifyDatabase() to be called on the worker thread?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>268206</commentid>
    <comment_count>6</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2010-08-23 17:11:21 -0700</bug_when>
    <thetext>Bug 40655 should fix that.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>