Bug 12769 - Lots of leaks when opening multiple tabs from a bookmark in nightly
Summary: Lots of leaks when opening multiple tabs from a bookmark in nightly
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P1 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2007-02-13 23:25 PST by Gavin Sherlock
Modified: 2007-02-28 11:39 PST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gavin Sherlock 2007-02-13 23:25:57 PST
Steps to reproduce:

Using r19616 on 10.4.8 on a dual G5

Set to Private Browsing, empty and disable cache.  Open autoclick bookmark on the Bookmarks bar, named 'News Tabs', with the following bookmarks in it:

feed://images.apple.com/trailers/rss/newtrailers.rss
http://news.google.com/
http://gcc.gnu.org/ml/gcc/
http://search.cpan.org/recent
http://www.xfree86.org/cvs/changes.html
http://www.versiontracker.com/index.shtml
http://www.thinksecret.com/
http://www.macsurfer.com/
http://my.yahoo.com/
http://webkit.opendarwin.org/blog/
http://news.gmane.org/gmane.os.apple.fink.devel
http://appleinsider.com/
http://news.gmane.org/gmane.os.apple.fink.cvs
http://macosrumors.com/
http://feedhouse.mozillazine.org/
http://www.mozillazine.org/
http://bugs.webkit.org/buglist.cgi?query_format=advanced&short_desc_type=allwordssubstr&short_desc=&product=WebKit&long_desc_type=substring&long_desc=&bug_file_loc_type=allwordssubstr&bug_file_loc=&keywords_type=allwords&keywords=&emailassigned_to1=1&emailtype1=substring&email1=&emailassigned_to2=1&emailreporter2=1&emailcc2=1&emailtype2=substring&email2=&bugidtype=include&bug_id=&votes=&chfieldfrom=-1&chfieldto=Now&chfieldvalue=&field0-0-0=noop&type0-0-0=noop&value0-0-0=&order=bugs.resolution,bugs.bug_id&query_based_on=
http://www.macrumors.com/
http://gcc.gnu.org/bugzilla/buglist.cgi?query_format=advanced&short_desc_type=allwordssubstr&short_desc=4.2&target_milestone=4.0.4&target_milestone=4.1.2&target_milestone=4.2.0&known_to_fail_type=allwordssubstr&known_to_work_type=allwordssubstr&long_desc_type=allwordssubstr&long_desc=&bug_file_loc_type=allwordssubstr&bug_file_loc=&gcchost_type=allwordssubstr&gcchost=&gcctarget_type=allwordssubstr&gcctarget=&gccbuild_type=allwordssubstr&gccbuild=&keywords_type=allwords&keywords=&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=SUSPENDED&bug_status=WAITING&bug_status=REOPENED&priority=P1&priority=P2&priority=P3&emailtype1=substring&email1=&emailtype2=substring&email2=&bugidtype=include&bug_id=&votes=&chfieldfrom=&chfieldto=Now&chfieldvalue=&cmdtype=doit&order=Reuse+same+sort+as+last+time&field0-0-0=noop&type0-0-0=noop&value0-0-0=
http://www.macosxrumors.com/
http://cia.navi.cx/stats/project/WebKit
http://soccernet.espn.go.com/index?cc=5901
http://smdforum.stanford.edu/smdforum/index.php

After they have all finished loading, close the window, then in a Terminal type 'leaks <pid>' where pid is the process id of WebKit.  Results are:

sw-90-731-860-3 77 % leaks 12141
Process 12141: 140876 nodes malloced for 16400 KB
Process 12141: 14 leaks for 864 total leaked bytes.
Leak: 0x019516c0  size=80
        0x76d41ca1 0x00000000 0xa3219cb4 0x00000001     v........!......
        0x00000000 0x00000000 0x00000000 0x00000000     ................
        0x00000000 0x00000000 0x06f41860 0x00000000     ...........`....
        0x019472e0 0x00000000 0x00000001 0x00000000     ..r.............
        0x00000000 0x00000000 0x00000000 0x00000000     ................
Leak: 0x06f41860  size=80
        0x71b51201 0x00000020 0x06f42b20 0x00000001     q...... ..+ ....
        0x00000065 0x00000065 0x00000065 0x00000000     ...e...e...e....
        0x0196b180 0x019516c0 0x00000000 0x00000000     ................
        0x00000000 0x00000000 0x00000000 0x00000000     ................
        0x00000000 0x00000000 0x00000000 0x00000000     ................
Leak: 0x0195dd60  size=80       instance of 'NSCFArray'
        0x01901610 0x00010484 0x0000000f 0x06bdc110     ................
        0x06bdb710 0x06bd7ff0 0x06bd7b50 0x0191e780     ..........{P....
        0x019201f0 0x01915c20 0x01915be0 0x01910930     ......\ ..[....0
        0x01910ef0 0x019115b0 0x0191ed90 0x01960470     ...............p
        0x06d11ca0 0x06d11cc0 0x12616670 0x5f636c65     .........afp_cle
Leak: 0x06b42400  size=80
        0x71f52e61 0x00000020 0x06b421b0 0x00000001     q..a... ..!.....
        0x00000008 0x00000008 0x00000008 0x0196b180     ................
        0x00000000 0x019516c0 0x00000000 0x00000000     ................
        0x00000000 0x00000000 0x00000000 0x00000000     ................
        0x00000000 0x00000000 0x00000000 0x00000000     ................
Leak: 0x0196b180  size=80
        0x76d7bbe1 0x00000020 0x01951900 0x00000001     v...... ........
        0x00000018 0x00000018 0x00000018 0x06f41860     ...............`
        0x06b42400 0x019516c0 0x00000000 0x00000000     ..$.............
        0x019472e0 0x00000001 0x00000001 0x00000000     ..r.............
        0x00000000 0x00000000 0x00000000 0x00000000     ................
Leak: 0x0190cd90  size=64       string 'CFProcessPath=/Applications/WebKit.app/Contents/MacOS/WebKit'
Leak: 0x06f2d1b0  size=64       instance of 'NSCFType'
        0xa07c35c0 0x00029780 0x00000001 0x00000001     .|5.............
        0x00000000 0x00000001 0x00000000 0x00000004     ................
        0x00000000 0x00000000 0x00000000 0x011a4470     ..............Dp
        0x00000000 0x00000000 0x00000050 0x00000004     ...........P....
Leak: 0x06f1ffc0  size=64       instance of 'NSCFType'
        0xa07c35c0 0x00019880 0x00000001 0x00000001     .|5.............
        0x0195b600 0x00000000 0x00000000 0x7f800000     ................
        0x7f800000 0x00000000 0x00000000 0x06b74420     ..............D 
        0x90483938 0x904d754c 0x00000000 0x00000004     .H98.MuL........
Leak: 0x06b421b0  size=48       instance of 'NSCFString'
        0xa07ba674 0x0001078c 0x26636f6d 0x2e617070     .{.t....&com.app
        0x6c652e48 0x49546f6f 0x6c626f78 0x2e77696e     le.HIToolbox.win
        0x646f7767 0x726f7570 0x732e6d6f 0x64616c00     dowgroups.modal.
Leak: 0x076661d0  size=48       instance of 'NSCFDictionary'
        0x019015e0 0x00010395 0x00000138 0x00000142     ...........8...B
        0x00000209 0xa1b1c1d3 0x00000000 0x00000000     ................
        0x00000000 0x02252e00 0x02253624 0xd0000003     .....%...%6$....
Leak: 0x06b74420  size=48
        0x44b58000 0x42fc0000 0x44b58000 0x43030000     D...B...D...C...
        0x00000000 0x00000000 0x00000000 0x3f800000     ............?...
        0x06f2d1b0 0x06f2d8c0 0x00000000 0x00000000     ................
Leak: 0x06f42b20  size=48       instance of 'NSCFString'
        0xa07ba674 0x0001078c 0x25636f6d 0x2e617070     .{.t....%com.app
        0x6c652e48 0x49546f6f 0x6c626f78 0x2e77696e     le.HIToolbox.win
        0x646f7767 0x726f7570 0x732e6d65 0x6e750008     dowgroups.menu..
Leak: 0x07673390  size=48       instance of 'NSCFDictionary'
        0x019015e0 0x00010395 0x000000a8 0x000000c7     ................
        0x0000013d 0xa1b1c1d3 0x00000000 0x00000000     ...=............
        0x00000000 0x0224d400 0x0224d8f4 0x00000003     .....$...$......
Leak: 0x06f2d8c0  size=32
        0x00000001 0x00000004 0x00001000 0x0681a000     ................
        0x00000000 0x00000000 0x00000000 0x00000000     ................

Also note, that the first tab, for feed://images.apple.com/trailers/rss/newtrailers.rss, has the wrong page title, tab title, and url showing, somehow using the name of the autoclick bookmark folder, which should probably be a separate bug.  That only occurs when it's opened in an autoclick bookmark.
Comment 1 Mark Rowe (bdash) 2007-02-14 00:17:57 PST
Any chance you could narrow this down to a subset of the bookmarks Gavin?
Comment 2 Gavin Sherlock 2007-02-14 09:04:24 PST
I have narrowed it down somewhat.  Unfortunately, the actual leaks are not necessarily 100% reproducible, but that may be because the page content changes regularly.  Having just the:

feed://images.apple.com/trailers/rss/newtrailers.rss

url open from the autoclick book mark gives a small set of leaks:

sw-90-731-860-3 82 % leaks 12212
Process 12212: 80794 nodes malloced for 7995 KB
Process 12212: 3 leaks for 176 total leaked bytes.
Leak: 0x06b16fe0  size=64       instance of 'NSCFType'
        0xa07c35c0 0x00019880 0x00000003 0x00000001     .|5.............
        0x0195be90 0x00000000 0x00000000 0x7f800000     ................
        0x7f800000 0x00000000 0x00000000 0x07423d70     .............B=p
        0x90483938 0x904d754c 0x00000000 0x00000004     .H98.MuL........
Leak: 0x0190cd90  size=64       string 'CFProcessPath=/Applications/WebKit.app/Contents/MacOS/WebKit'
Leak: 0x01903ce0  size=48       string '/Applications/Safari.app/Contents/MacOS/Safari'

Having just the Google news url (http://news.google.com/) open from the autoclick book mark also gives a small set of leaks:

sw-90-731-860-3 84 % leaks 12218
Process 12218: 81733 nodes malloced for 8106 KB
Process 12218: 3 leaks for 160 total leaked bytes.
Leak: 0x0190cd90  size=64       string 'CFProcessPath=/Applications/WebKit.app/Contents/MacOS/WebKit'
Leak: 0x07048030  size=48       instance of 'NSCFDictionary'
        0x019015e0 0x00010395 0x00000138 0x00000142     ...........8...B
        0x00000209 0xa1b1c1d3 0x00000000 0x00000000     ................
        0x00000000 0x02102000 0x02102824 0x00000003     ...... ...($....
Leak: 0x070463d0  size=48       instance of 'NSCFDictionary'
        0x019015e0 0x00010395 0x000000a8 0x000000c7     ................
        0x0000013d 0xa1b1c1d3 0x00000000 0x00000000     ...=............
        0x00000000 0x02101600 0x02101af4 0x00000003     ................

However, having both of them in there:

feed://images.apple.com/trailers/rss/newtrailers.rss
http://news.google.com/

gives a much larger set of leaks:

sw-90-731-860-3 83 % leaks 12215
Process 12215: 85655 nodes malloced for 8611 KB
Process 12215: 11 leaks for 736 total leaked bytes.
Leak: 0x06e82f20  size=112      instance of 'NSSliderCell'
        0xa3749264 0x00000000 0x00040100 0x00000008     .t.d............
        0x00000000 0x00000000 0x00000000 0x00000000     ................
        0x00000000 0x00000000 0x00000000 0x00000000     ................
        0x00000000 0x00000000 0x00000000 0x00000000     ................
        0x00000000 0x3ff00000 0x00000000 0x00000000     ....?...........
        0x00000000 0x44be0000 0x42f20000 0x41700000     ....D...B...Ap..
        0x41700000 0x40000000 0x00000000 0x00000000     Ap..@...........
Leak: 0x07034950  size=112      instance of 'NSSliderCell'
        0xa3749264 0x00000000 0x00040100 0x00000008     .t.d............
        0x00000000 0x00000000 0x00000000 0x00000000     ................
        0x00000000 0x00000000 0x00000000 0x00000000     ................
        0x00000000 0x00000000 0x00000000 0x00000000     ................
        0x00000000 0x3ff00000 0x00000000 0x00000000     ....?...........
        0x00000000 0x44be0000 0x42f20000 0x41700000     ....D...B...Ap..
        0x41700000 0x40000000 0x00000000 0x00000000     Ap..@...........
Leak: 0x0196c070  size=80       instance of 'NSCFArray'
        0x01901610 0x00010484 0x0000000f 0x069c1300     ................
        0x069c01b0 0x01910930 0x01915c20 0x019111a0     .......0..\ ....
        0x01911860 0x01920b80 0x01969640 0x01968270     ...`.......@...p
        0x019677e0 0x019675c0 0x019636b0 0x07030ce0     ..w...u...6.....
        0x069f8290 0x069f82b0 0x6e672f00 0x00000005     ........ng/.....
Leak: 0x0696e880  size=64       instance of 'NSCFType'
        0xa07c35c0 0x00019880 0x00000001 0x00000001     .|5.............
        0x0195c300 0x00000000 0x00000000 0x7f800000     ................
        0x7f800000 0x00000000 0x00000000 0x07031030     ...............0
        0x90483938 0x904d754c 0x00000000 0x00000004     .H98.MuL........
Leak: 0x0190cd90  size=64       string 'CFProcessPath=/Applications/WebKit.app/Contents/MacOS/WebKit'
Leak: 0x06e593a0  size=64       instance of 'NSCFType'
        0xa07c35c0 0x00019880 0x00000002 0x00000001     .|5.............
        0x0195c300 0x00000000 0x00000000 0x7f800000     ................
        0x7f800000 0x00000000 0x00000000 0x074363e0     .............Cc.
        0x90483938 0x904d754c 0x00000000 0x00000004     .H98.MuL........
Leak: 0x06940600  size=64       instance of 'NSCFType'
        0xa07c35c0 0x00019880 0x00000003 0x00000001     .|5.............
        0x0195c300 0x00000000 0x00000000 0x7f800000     ................
        0x7f800000 0x00000000 0x00000000 0x07439910     .............C..
        0x90483938 0x904d754c 0x00000000 0x00000004     .H98.MuL........
Leak: 0x07031030  size=48
        0x44b58000 0x42fc0000 0x44b58000 0x43030000     D...B...D...C...
        0x00000000 0x00000000 0x00000000 0x3f800000     ............?...
        0x0693f710 0x069402d0 0x00000000 0x00000000     ................
Leak: 0x0747d630  size=48       instance of 'NSCFDictionary'
        0x019015e0 0x00010395 0x000000a8 0x000000c7     ................
        0x0000013d 0xa1b1c1d3 0x00000000 0x00000000     ...=............
        0x00000000 0x02219000 0x022194f4 0x00000003     .....!...!......
Leak: 0x0747d5d0  size=48       instance of 'NSCFDictionary'
        0x019015e0 0x00010395 0x00000138 0x00000142     ...........8...B
        0x00000209 0xa1b1c1d3 0x00000000 0x00000000     ................
        0x00000000 0x02211400 0x02211c24 0x00000003     .....!...!.$....
Leak: 0x069402d0  size=32
        0x00000001 0x00000004 0x00001000 0x0687d000     ................
        0x00000000 0x00000000 0x00000000 0x00000000     ................

However, using all the bookmarks except the movie trailers rss feed and google news still gave:

sw-90-731-860-3 87 % leaks 12235
Process 12235: 135694 nodes malloced for 15635 KB
Process 12235: 9 leaks for 592 total leaked bytes.
Leak: 0x0195c1e0  size=80
        0x76ca7317 0x00000000 0xa3219cb4 0x00000001     v.s......!......
        0x00000000 0x00000000 0x00000000 0x00000000     ................
        0x00000000 0x00000000 0x06e707a0 0x00000000     ................
        0x01944ee0 0x00000000 0x00000001 0x00000000     ..N.............
        0x00000000 0x00000000 0x00000000 0x00000000     ................
Leak: 0x0196d2c0  size=80
        0x76c96037 0x00000020 0x01953770 0x00000001     v.`7... ..7p....
        0x00000018 0x00000018 0x00000018 0x06e707a0     ................
        0x06e5d790 0x0195c1e0 0x00000000 0x00000000     ................
        0x01944ee0 0x00000001 0x00000001 0x00000000     ..N.............
        0x00000000 0x00000000 0x00000000 0x00000000     ................
Leak: 0x06e5d790  size=80
        0x71ba6567 0x00000020 0x06e5c050 0x00000001     q.eg... ...P....
        0x00000008 0x00000008 0x00000008 0x0196d2c0     ................
        0x00000000 0x0195c1e0 0x00000000 0x00000000     ................
        0x00000000 0x00000000 0x00000000 0x00000000     ................
        0x00000000 0x00000000 0x00000000 0x00000000     ................
Leak: 0x06e707a0  size=80
        0x71b8b557 0x00000020 0x06e71000 0x00000001     q..W... ........
        0x00000065 0x00000065 0x00000065 0x00000000     ...e...e...e....
        0x0196d2c0 0x0195c1e0 0x00000000 0x00000000     ................
        0x00000000 0x00000000 0x00000000 0x00000000     ................
        0x00000000 0x00000000 0x00000000 0x00000000     ................
Leak: 0x0190cd90  size=64       string 'CFProcessPath=/Applications/WebKit.app/Contents/MacOS/WebKit'
Leak: 0x01953770  size=64       instance of 'NSCFString'
        0xa07ba674 0x0001078c 0x28636f6d 0x2e617070     .{.t....(com.app
        0x6c652e48 0x49546f6f 0x6c626f78 0x2e77696e     le.HIToolbox.win
        0x646f7767 0x726f7570 0x732e6d65 0x6e756261     dowgroups.menuba
        0x7200ffff 0x00000000 0x00000000 0x00000034     r..............4
Leak: 0x01903ce0  size=48       string '/Applications/Safari.app/Contents/MacOS/Safari'
Leak: 0x06e71000  size=48       instance of 'NSCFString'
        0xa07ba674 0x0001078c 0x25636f6d 0x2e617070     .{.t....%com.app
        0x6c652e48 0x49546f6f 0x6c626f78 0x2e77696e     le.HIToolbox.win
        0x646f7767 0x726f7570 0x732e6d65 0x6e750003     dowgroups.menu..
Leak: 0x06e5c050  size=48       instance of 'NSCFString'
        0xa07ba674 0x0001078c 0x26636f6d 0x2e617070     .{.t....&com.app
        0x6c652e48 0x49546f6f 0x6c626f78 0x2e77696e     le.HIToolbox.win
        0x646f7767 0x726f7570 0x732e6d6f 0x64616c00     dowgroups.modal.

I then thought to check, are there any leaks if I do nothing?  So, open Webkit nightly, which redirects to page checking build number, set Private Browsing, turn off back/forward cache, and close initial window:

sw-90-731-860-3 86 % leaks 12226
Process 12226: 106236 nodes malloced for 8099 KB
Process 12226: 10 leaks for 672 total leaked bytes.
Leak: 0x0195c1e0  size=80
        0x76ca09a9 0x00000000 0xa3219cb4 0x00000001     v........!......
        0x00000000 0x00000000 0x00000000 0x00000000     ................
        0x00000000 0x00000000 0x07a57810 0x00000000     ..........x.....
        0x06e5bf10 0x00000000 0x00000003 0x00000000     ................
        0x00000000 0x00000000 0x00000000 0x00000000     ................
Leak: 0x06e4b9a0  size=80
        0x71bb71e9 0x00000020 0x069427c0 0x00000001     q.q.... ..'.....
        0x00000008 0x00000008 0x00000008 0x0196d2c0     ................
        0x00000000 0x0195c1e0 0x00000000 0x00000000     ................
        0x00000000 0x00000000 0x00000000 0x00000000     ................
        0x00000000 0x00000000 0x00000000 0x00000000     ................
Leak: 0x019c92c0  size=80       instance of 'NSCFArray'
        0x01901610 0x00010484 0x0000000f 0x01964db0     ..............M.
        0x01962710 0x01961a60 0x01961850 0x07031d00     ..'....`...P....
        0x01968720 0x01967c90 0x01967a70 0x01967850     ... ..|...zp..xP
        0x01967000 0x019662c0 0x01965a90 0x01963d00     ..p...b...Z...=.
        0x0697c930 0x069878b0 0x53494f4e 0x00000005     ...0..x.SION....
Leak: 0x07a57810  size=80
        0x70fab059 0x00000020 0x07a57860 0x00000001     p..Y... ..x`....
        0x00000065 0x00000065 0x00000065 0x00000000     ...e...e...e....
        0x0196d2c0 0x0195c1e0 0x00000000 0x00000000     ................
        0x06e5bf10 0x00000002 0x00000002 0x00000000     ................
        0x00000000 0x00000000 0x00000000 0x00000000     ................
Leak: 0x0196d2c0  size=80
        0x76c91a89 0x00000020 0x01953770 0x00000001     v...... ..7p....
        0x00000018 0x00000018 0x00000018 0x07a57810     ..............x.
        0x06e4b9a0 0x0195c1e0 0x00000000 0x00000000     ................
        0x01944ee0 0x00000001 0x00000001 0x00000000     ..N.............
        0x00000000 0x00000000 0x00000000 0x00000000     ................
Leak: 0x01953770  size=64       instance of 'NSCFString'
        0xa07ba674 0x0001078c 0x28636f6d 0x2e617070     .{.t....(com.app
        0x6c652e48 0x49546f6f 0x6c626f78 0x2e77696e     le.HIToolbox.win
        0x646f7767 0x726f7570 0x732e6d65 0x6e756261     dowgroups.menuba
        0x7200ffff 0x00000000 0x00000000 0x00000034     r..............4
Leak: 0x0190cd90  size=64       string 'CFProcessPath=/Applications/WebKit.app/Contents/MacOS/WebKit'
Leak: 0x069427c0  size=48       instance of 'NSCFString'
        0xa07ba674 0x0001078c 0x26636f6d 0x2e617070     .{.t....&com.app
        0x6c652e48 0x49546f6f 0x6c626f78 0x2e77696e     le.HIToolbox.win
        0x646f7767 0x726f7570 0x732e6d6f 0x64616c00     dowgroups.modal.
Leak: 0x01903ce0  size=48       string '/Applications/Safari.app/Contents/MacOS/Safari'
Leak: 0x07a57860  size=48       instance of 'NSCFString'
        0xa07ba674 0x0001078c 0x25636f6d 0x2e617070     .{.t....%com.app
        0x6c652e48 0x49546f6f 0x6c626f78 0x2e77696e     le.HIToolbox.win
        0x646f7767 0x726f7570 0x732e6d65 0x6e750000     dowgroups.menu..

so some of those leaks above are possibly due to this initial window's opening.  I guess if those are fixed, I can retest the autoclick bookmarks to see if there are still any leaks.  Hope this helps.
Comment 3 Maciej Stachowiak 2007-02-27 19:33:41 PST
<rdar://problem/5028152>
Comment 4 Geoffrey Garen 2007-02-28 11:39:27 PST
In Radar, I've marked this as a duplicate of <rdar://problem/4650978>, which tracks our work in eliminating leaks.

A distinct leak report requires a simple set of steps to reproduce along with specific information about what leaked (which you can glean using MallocStackLogging). For example, "WebKit leaks a CFString at launch" or "WebKit leaks an NSURLRequest after visiting google.com."

The leaks tool may produce bogus results for non-Debug builds because it doesn't know how to track memory in WebKit's custom allocator.

We also have a known set of leaks in underlying components on Tiger, which is listed in WebKitTools/Scripts/run-webkit-tests.