Bug 40654
Summary: | Database access in worker threads results in memory leaks due to lack of autorelease pool | ||
---|---|---|---|
Product: | WebKit | Reporter: | Mark Rowe (bdash) <mrowe> |
Component: | WebCore Misc. | Assignee: | Nobody <webkit-unassigned> |
Status: | NEW | ||
Severity: | Normal | CC: | ap, beidson, darin, dimich, dumi, ericu, simon.fraser |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | Mac | ||
OS: | OS X 10.6 | ||
URL: | http://build.webkit.org/results/SnowLeopard%20Intel%20Leaks/r61233%20(8108)/fast/workers/storage/change-version-handle-reuse-worker-stderr.txt | ||
Bug Depends on: | 40655 | ||
Bug Blocks: |
Mark Rowe (bdash)
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 <http://build.webkit.org/results/SnowLeopard%20Intel%20Leaks/r61233%20(8108)/DumpRenderTree2-leaks.txt> you can also see that these objects are in fact leaked.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Darin Adler
http://trac.webkit.org/changeset/61626
http://trac.webkit.org/changeset/61627
Alexey Proskuryakov
See also: bug 40655.
Simon Fraser (smfr)
So callOnMainThread() requires an autorelease pool?
Simon Fraser (smfr)
Here'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.
Simon Fraser (smfr)
Or is it wrong for dispatchDidModifyDatabase() to be called on the worker thread?
Simon Fraser (smfr)
Bug 40655 should fix that.