[webkit-dev] Curl resourcehandle leaks in Linux/Gtk port

zaheer ahmad zaheer.mot at gmail.com
Fri Sep 12 04:38:43 PDT 2008


hi,
attached updated leak data with up to three levels tracing. this is on
r33943. appreciate any inputs on these leaks.

thanks,
Zaheer

On Thu, Sep 11, 2008 at 9:58 PM, zaheer ahmad <zaheer.mot at gmail.com> wrote:

> Thanks Marco for raising the bug.
> here are some other leaks i observe on the linux/gtk/arm platform (>50k per
> caller), this is with a run of opening around 30 random pages. The heap size
> goes to 45M, so definitely there are big leaks in the gtk port.
>
> i will try to find the caller to the next level and split up the generic
> functions.
>
> meanwhile, let me know if there are fixes available for any of these
>
> thanks,
> Zaheer
>
> <caller>: WTF::Vector<char, 0u>::reserveCapacity(unsigned int)+40 <size>:
> 5358380 <Avg>: 4564
> <caller>: alloc_small+208 <size>: 4160560 <Avg>: 8110
> <caller>: WTF::Vector<unsigned int, 0u>::reserveCapacity(unsigned int)+56
> <size>: 3780004 <Avg>: 63000
> <caller>: png_malloc+72 <size>: 1827334 <Avg>: 3071
> <caller>: gmem.c:152(IA__g_malloc0+72) <size>: 1706851 <Avg>: 393
> <caller>: KJS::HashTable::createTable() const+32 <size>: 1471404 <Avg>:
> 15169
> <caller>: WTF::fastZeroedMalloc(unsigned int)+12 <size>: 1418356 <Avg>: 551
> <caller>: WebCore::TextCodecLatin1::decode(char const*, unsigned int, bool,
> bool, bool&)+32 <size>: 1330110 <Avg>: 11667
> <caller>: __gconv_open+1344 <size>: 1305600 <Avg>: 32640
> <caller>: WebCore::String::append(WebCore::String const&)+68 <size>:
> 1293644 <Avg>: 869
> <caller>: sqlite3MallocRaw+48 <size>: 1038129 <Avg>: 259
> <caller>: WTF::Vector<unsigned short, 0u>::reserveCapacity(unsigned int)+56
> <size>: 995870 <Avg>: 9575
> <caller>: WebCore::GlyphPageTreeNode::initializePage(WebCore::FontData
> const*, unsigned int)+448 <size>: 995104 <Avg>: 2056
> <caller>: WebCore::StringImpl::create(unsigned short const*, unsigned
> int)+116 <size>: 816884 <Avg>: 32
> <caller>: WebCore::StringImpl::create(unsigned short const*, unsigned
> int)+80 <size>: 510200 <Avg>: 20
> <caller>: cairo-scaled-font.c:1796(_cairo_scaled_glyph_lookup+248) <size>:
> 426720 <Avg>: 96
> <caller>: GIFImageReader::do_lzw(unsigned char const*)+760 <size>: 368730
> <Avg>: 8194
> <caller>: FcPatternObjectAddWithBinding+60 <size>: 365600 <Avg>: 32
> <caller>: WTF::Vector<WebCore::RGBA32Buffer, 0u>::reserveCapacity(unsigned
> int)+60 <size>: 363456 <Avg>: 768
> <caller>: WebCore::FontCache::getFontDataForCharacters(WebCore::Font
> const&, unsigned short const*, int)+36 <size>: 363424 <Avg>: 1108
> <caller>: sqlite3Realloc+60 <size>: 292492 <Avg>: 552
> <caller>: WebCore::JPEGImageDecoder::setData(WebCore::SharedBuffer*,
> bool)+112 <size>: 248920 <Avg>: 1016
> <caller>: WebCore::GlyphPageTreeNode::initializePage(WebCore::FontData
> const*, unsigned int)+1172 <size>: 211768 <Avg>: 2056
> <caller>: strdup+24 <size>: 207135 <Avg>: 36
> <caller>: WebCore::Cache::requestResource(WebCore::DocLoader*,
> WebCore::CachedResource::Type, WebCore::KURL const&, WebCore::String const&,
> bool)+548 <size>: 187680 <Avg>: 240
> <caller>: WebCore::StringImpl::create(char const*, unsigned int)+108
> <size>: 185274 <Avg>: 147
> <caller>: GIFImageReader::read(unsigned char const*, unsigned int,
> WebCore::GIFImageDecoder::GIFQuery, unsigned int)+3284 <size>: 184365 <Avg>:
> 4097
> <caller>: GIFImageReader::read(unsigned char const*, unsigned int,
> WebCore::GIFImageDecoder::GIFQuery, unsigned int)+3264 <size>: 184365 <Avg>:
> 4097
> <caller>: WebCore::GIFImageDecoder::setData(WebCore::SharedBuffer*,
> bool)+112 <size>: 136000 <Avg>: 320
> <caller>: alloc_large+96 <size>: 135960 <Avg>: 586
> <caller>: KJS::UString::Rep::create(unsigned short*, int)+24 <size>: 127200
> <Avg>: 48
> <caller>: FcPatternObjectInsertElt+176 <size>: 126720 <Avg>: 256
> <caller>: png_create_struct_2+108 <size>: 116560 <Avg>: 620
> <caller>: GIFImageReader::read(unsigned char const*, unsigned int,
> WebCore::GIFImageDecoder::GIFQuery, unsigned int)+1912 <size>: 101304 <Avg>:
> 255
> <caller>: WebCore::FontCache::getCachedFontData(WebCore::FontPlatformData
> const*)+120 <size>: 91964 <Avg>: 1108
> <caller>: WebCore::Text::createWithLengthLimit(WebCore::Document*,
> WebCore::String const&, unsigned int&, unsigned int)+312 <size>: 86476
> <Avg>: 52
> <caller>: gmem.c:132(IA__g_malloc+64) <size>: 79287 <Avg>: 22
> <caller>: WebCore::StringImpl::StringImpl(unsigned short const*, unsigned
> int, unsigned int)+48 <size>: 72278 <Avg>: 68
> <caller>:
> /home/ir2daily/source-root/freetype2/src/base/ftutil.c:77(ft_mem_qalloc+24)
> <size>: 70354 <Avg>: 413
> <caller>:
> WebCore::CachedImage::data(WTF::PassRefPtr<WebCore::SharedBuffer>, bool)+424
> <size>: 62240 <Avg>: 80
> <caller>: gmem.c:171(IA__g_realloc+76) <size>: 57080 <Avg>: 50
> <caller>: cairo-hash.c:334(_cairo_hash_table_resize+128) <size>: 56656
> <Avg>: 602
> <caller>: WebCore::GlyphPageTreeNode::getChild(WebCore::FontData const*,
> unsigned int)+80 <size>: 50644 <Avg>: 44
>
>
> On Thu, Sep 11, 2008 at 4:39 PM, Marco Barisione <
> marco.barisione at collabora.co.uk> wrote:
>
>> Il giorno mer, 10/09/2008 alle 13.26 +0530, zaheer ahmad ha scritto:
>> > In the linux Gtk port, with Webkit revision 33493, i see that the
>> > resource handles (curl backend) never get released after completing
>> > the data transfer for that request. This results in big leaks in
>> > resourcehandles as well as the curl internal data structures. (~800k
>> > on opening nytimes.com and closing the connection)
>>
>> See http://bugs.webkit.org/show_bug.cgi?id=20777 for a possible fix
>>
>>
>> --
>> Marco Barisione
>>
>> _______________________________________________
>> webkit-dev mailing list
>> webkit-dev at lists.webkit.org
>> http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.webkit.org/pipermail/webkit-dev/attachments/20080912/dbc8ecf6/attachment.html 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: mem_leak_webkit33943.txt
Url: http://lists.webkit.org/pipermail/webkit-dev/attachments/20080912/dbc8ecf6/attachment.txt 


More information about the webkit-dev mailing list