thoughtbot / capybara-webkit

A Capybara driver for headless WebKit to test JavaScript web apps
https://thoughtbot.com/open-source
MIT License
1.97k stars 428 forks source link

Help debugging memory leak #945

Closed rupurt closed 6 years ago

rupurt commented 8 years ago

Howdy,

We're experiencing memory leaks in Capybara-Webkit and aren't sure of the best course of action to help track them down. We do call reset! after every test but it doesn't appear to help.

Any guidance you guys could provide would be awesome 😄

rupurt commented 8 years ago

I've started using the OS X leaks utility locally and got a dump locally. I'm not sure what to do with this output though... 😁

Process:         webkit_server [48391]
Path:            /Users/alex/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/capybara-webkit-1.11.1/bin/webkit_server
Load Address:    0x1021a1000
Identifier:      com.yourcompany.webkit_server
Version:         ???
Code Type:       X86-64
Parent Process:  ruby [48244]

Date/Time:       2016-09-08 11:58:29.153 -0400
Launch Time:     2016-09-08 11:48:37.647 -0400
OS Version:      Mac OS X 10.10.5 (14F1713)
Report Version:  7
Analysis Tool:   /Applications/Xcode.app/Contents/Developer/usr/bin/leaks
Analysis Tool Version:  Xcode 7.2.1 (7C1002)
----

leaks Report Version:  2.0
Process 48391: 229714 nodes malloced for 27527 KB
Process 48391: 3667 leaks for 525984 total leaked bytes.
Leak: 0x7f9170c189d0  size=48  zone: DefaultMallocZone_0x10222a000
    0x00000001 0x00000007 0x00000008 0x100007f9     ................
    0x00000018 0x00000000 0x006f006e 0x006e0073     ........n.o.s.n.
    0x00660069 0x00000066 0x00000065 0x00030000     i.f.f...e.......
Leak: 0x7f9170c1a450  size=48  zone: DefaultMallocZone_0x10222a000
    0x0325f4c0 0x00000001 0x03260378 0x00000001     ..%.....x.&.....
    0x03260378 0x00000001 0x0325f4c0 0x00000001     x.&.......%.....
    0x03260378 0x00000001 0x70c30400 0x00007f91     x.&........p....
Leak: 0x7f9170c24850  size=32  zone: DefaultMallocZone_0x10222a000
    0x1ea4c9e0 0x00000001 0x00000004 0xf00007f9     ................
    0x1ea4c9c0 0x00000001 0x00000000 0x00020000     ................
Leak: 0x7f9170c2aca0  size=64  zone: DefaultMallocZone_0x10222a000   WebKit::QStyleFacadeImp  C++  QtWebKitWidgets
    0x0225e280 0x00000001 0x00000000 0x00000000     ..%.............
    0x7322d120 0x00007f91 0x70c20dc0 0x00007f91      ."s.......p....
    0x70c57220 0x00007f91 0x65526b01 0x2a796c70      r.p.....kReply*
    0x00000000 0x00000000 0x170c5725 0x000407f9     ........%W......
Leak: 0x7f9170c2fcb0  size=192  zone: DefaultMallocZone_0x10222a000
    0x00000001 0x0000004d 0x0000004e 0x20000000     ....M...N...... 
    0x00000018 0x00000000 0x0071006a 0x00650075     ........j.q.u.e.
    0x00790072 0x0075002d 0x002d0069 0x00620030     r.y.-.u.i.-.0.b.
    0x00640061 0x00360032 0x00340032 0x00610064     a.d.2.6.2.4.d.a.
    0x00640037 0x00320031 0x00660039 0x00300035     7.d.1.2.9.f.5.0.
    0x00340031 0x00310063 0x00370062 0x00630063     1.4.c.1.b.7.c.c.
    0x00650065 0x00390061 0x00660062 0x00310064     e.e.a.9.b.f.d.1.
    0x00610063 0x00660032 0x00660038 0x00300063     c.a.2.f.8.f.c.0.
    ...
Leak: 0x7f9170c30400  size=48  zone: DefaultMallocZone_0x10222a000
    0x00000001 0x00000007 0x00000008 0xf00007f9     ................
    0x00000018 0x00000000 0x00690077 0x0064006e     ........w.i.n.d.
    0x0077006f 0x00000073 0x00000000 0x00000000     o.w.s...........
Leak: 0x7f9170c33850  size=32  zone: DefaultMallocZone_0x10222a000
    0x1ad3eb30 0x00000001 0x00000001 0x00000001     0...............
    0x1ad3eb10 0x00000001 0x1c5d5360 0x00000001     ........`S].....
Leak: 0x7f9170c34500  size=320  zone: DefaultMallocZone_0x10222a000   QWindowsStylePrivate  C++  QtWidgets
    0x027c5fd0 0x00000001 0x70c57220 0x00007f91     ._|..... r.p....
    0x00000000 0x00000000 0x03260378 0x00000001     ........x.&.....
    0x80200c30 0x00000000 0x00000000 0x00000000     0. .............
    0x70c1a450 0x00007f91 0x70c21970 0x00007f91     P..p....p..p....
    0x00000000 0x00000000 0x00000000 0x00000000     ................
    0x00000000 0x00000000 0x00000000 0x00000000     ................
    0x00000000 0x00000000 0x00000000 0x00000000     ................
    0xffffffff 0x00000000 0x70c57220 0x00007f91     ........ r.p....
    ...
Leak: 0x7f9170c376b0  size=32  zone: DefaultMallocZone_0x10222a000
    0x1b16e680 0x00000001 0x00000004 0x700007f9     ...............p
    0x1b16e660 0x00000001 0x00000000 0x00020000     `...............
Leak: 0x7f9170c384b0  size=48  zone: DefaultMallocZone_0x10222a000
    0x00000001 0x00000006 0x00000007 0x20000000     ............... 
    0x00000018 0x00000000 0x006f006e 0x0070006f     ........n.o.o.p.
    0x006e0065 0x00720000 0x00000000 0x00030000     e.n...r.........
Leak: 0x7f9170c3e220  size=32  zone: DefaultMallocZone_0x10222a000
    0x1e7f8ad0 0x00000001 0x00000001 0x300007f9     ...............0
    0x1e7f8ab0 0x00000001 0x758f98c0 0x00027f91     ...........u....
Leak: 0x7f9170c57220  size=32  zone: DefaultMallocZone_0x10222a000   QWindowsStyle  C++  QtWidgets
    0x027bc200 0x00000001 0x70c34500 0x00007f91     ..{......E.p....
    0x00000004 0x00000000 0x74654e51 0x6b726f77     ........QNetwork
Leak: 0x7f9170ca49e0  size=32  zone: DefaultMallocZone_0x10222a000
    0x1ad3eec0 0x00000001 0x00000001 0x700007f9     ...............p
    0x1ad3eea0 0x00000001 0x00000000 0x00020000     ................
Leak: 0x7f9170ca5850  size=96  zone: DefaultMallocZone_0x10222a000
    0x00000001 0x0000001d 0x0000001e 0x20000000     ............... 
    0x00000018 0x00000000 0x00680054 0x002c0075     ........T.h.u.,.
    0x00300020 0x00200038 0x00650053 0x00200070      .0.8. .S.e.p. .
    0x00300032 0x00360031 0x00310020 0x003a0035     2.0.1.6. .1.5.:.
    0x00390034 0x0034003a 0x00200038 0x004d0047     4.9.:.4.8. .G.M.
    0x00000054 0x00007f91 0x75910ee0 0x00067f91     T..........u....
Leak: 0x7f9170ca6360  size=32  zone: DefaultMallocZone_0x10222a000
    0x1e5cf860 0x00000001 0x00000002 0x400007f9     `.\............@
    0x1e5cf840 0x00000001 0x000a0034 0x00020000     @.\.....4.......
Leak: 0x7f9170ca8b50  size=32  zone: DefaultMallocZone_0x10222a000
    0x11e95c20 0x00000001 0x00000004 0x200007f9      \............. 
    0x11e95c00 0x00000001 0x1fa67d80 0x00020001     .\.......}......
Leak: 0x7f9170ca9940  size=48  zone: DefaultMallocZone_0x10222a000
    0x00000001 0x00000005 0x00000006 0x100007f9     ................
    0x00000018 0x00000000 0x00310031 0x00330039     ........1.1.9.3.
    0x00000036 0x00430000 0x0072006f 0x00000073     6.....C.o.r.s...
Leak: 0x7f9170caa550  size=64  zone: DefaultMallocZone_0x10222a000
    0x00000001 0x0000000d 0x0000000e 0xe00007f9     ................
    0x00000018 0x00000000 0x003b0031 0x006d0020     ........1.;. .m.
    0x0064006f 0x003d0065 0x006c0062 0x0063006f     o.d.e.=.b.l.o.c.
    0x0000006b 0x31663234 0x63623136 0x00040000     k...42f161bc....
Leak: 0x7f9170cab0b0  size=48  zone: DefaultMallocZone_0x10222a000
    0x00000001 0x0000000a 0x0000000b 0xa00007f9     ................
    0x00000018 0x00000000 0x0065004b 0x00700065     ........K.e.e.p.
    0x0041002d 0x0069006c 0x00650076 0x00030000     -.A.l.i.v.e.....
Leak: 0x7f9170cab9e0  size=48  zone: DefaultMallocZone_0x10222a000
    0x00000001 0x00000007 0x00000008 0xe00007f9     ................
    0x00000018 0x00000000 0x006f006e 0x006e0073     ........n.o.s.n.
    0x00660069 0x00000066 0x00000065 0x000307f9     i.f.f...e.......
Leak: 0x7f9170cabed0  size=32  zone: DefaultMallocZone_0x10222a000
    0x11a320e0 0x00000001 0x00000001 0x000007f9     . ..............
    0x11a320c0 0x00000001 0x758bc5d0 0x00027f91     . .........u....
Leak: 0x7f9170cac0d0  size=32  zone: DefaultMallocZone_0x10222a000
    0x1ad3e230 0x00000001 0x00000001 0xd00007f9     0...............
    0x1ad3e210 0x00000001 0x00000000 0x00020000     ................
Leak: 0x7f9170cacf70  size=48  zone: DefaultMallocZone_0x10222a000
    0x00000001 0x0000000a 0x0000000b 0x900007f9     ................
    0x00000018 0x00000000 0x0065004b 0x00700065     ........K.e.e.p.
    0x0041002d 0x0069006c 0x00650076 0x00000000     -.A.l.i.v.e.....
Leak: 0x7f9170cadeb0  size=32  zone: DefaultMallocZone_0x10222a000
    0x00000001 0x00000003 0x00000004 0x600007f9     ...............`
    0x00000018 0x00000000 0x00350032 0x00000037     ........2.5.7...
Leak: 0x7f9170cae290  size=80  zone: DefaultMallocZone_0x10222a000
    0x00000001 0x00000018 0x00000019 0x000007f9     ................
    0x00000018 0x00000000 0x00720070 0x00660065     ........p.r.e.f.
    0x0069006c 0x00680067 0x002d0074 0x00690068     l.i.g.h.t.-.h.i.
    0x003b0074 0x006e0020 0x002d006f 0x0072006f     t.;. .n.o.-.o.r.
    0x00670069 0x006e0069 0x175c0000 0x000507f9     i.g.i.n...\.....
Leak: 0x7f9170cae610  size=64  zone: DefaultMallocZone_0x10222a000
    0x00000001 0x00000011 0x00000012 0x800007f9     ................
    0x00000018 0x00000000 0x00610043 0x00790070     ........C.a.p.y.
    0x00610062 0x00610072 0x0069002e 0x0076006e     b.a.r.a...i.n.v.
    0x006b006f 0x00280065 0x00000029 0x00040000     o.k.e.(.).......
Leak: 0x7f9170cb0080  size=32  zone: DefaultMallocZone_0x10222a000
    0x1ad3e800 0x00000001 0x00000001 0xb00007f9     ................
    0x1ad3e7e0 0x00000001 0x1758f6a9 0x000207f9     ..........X.....
Leak: 0x7f9170cb11d0  size=48  zone: DefaultMallocZone_0x10222a000
    0x00000001 0x00000006 0x00000007 0xb00007f9     ................
    0x00000018 0x00000000 0x00370034 0x00320039     ........4.7.9.2.
    0x00350037 0x74690000 0x006e6f69 0x00030000     7.5...ition.....
Leak: 0x7f9170cb1710  size=32  zone: DefaultMallocZone_0x10222a000
    0x00000001 0x00000001 0x00000002 0x500007f9     ...............P
    0x00000018 0x00000000 0x00000030 0x00000063     ........0...c...
Leak: 0x7f9170cb1d30  size=32  zone: DefaultMallocZone_0x10222a000
    0x00000001 0x00000002 0x00000003 0xc00007f9     ................
    0x00000018 0x00000000 0x00530055 0x00020000     ........U.S.....
Leak: 0x7f9170cb2ef0  size=48  zone: DefaultMallocZone_0x10222a000
    0x00000001 0x00000006 0x00000007 0xa00007f9     ................
    0x00000018 0x00000000 0x006f006e 0x0070006f     ........n.o.o.p.
    0x006e0065 0x00000000 0x758db2a0 0x00007f91     e.n........u....
Leak: 0x7f9170cb3760  size=48  zone: DefaultMallocZone_0x10222a000
    0x00000001 0x0000000a 0x0000000b 0x20000000     ............... 
    0x00000018 0x00000000 0x0065004b 0x00700065     ........K.e.e.p.
    0x0041002d 0x0069006c 0x00650076 0x00630000     -.A.l.i.v.e...c.
Leak: 0x7f9170cb3a30  size=80  zone: DefaultMallocZone_0x10222a000   WebCore::Text  C++  QtWebKit
    0x0510ce68 0x00000001 0x00000000 0x00000000     h...............
    0x00000000 0x00002141 0x758f0ca0 0x00007f91     ....A!.....u....
    0x1791e050 0x00000001 0x1cedec60 0x00000001     P.......`.......
    0x1a901240 0x00000001 0x00000000 0x00000000     @...............
    0x185ae1b8 0x00000001 0x1758c35c 0x000507f9     ..Z.....\.X.....
Leak: 0x7f9170cb4810  size=192  zone: DefaultMallocZone_0x10222a000
    0x00000001 0x0000004e 0x0000004f 0xa00007f9     ....N...O.......
    0x00000018 0x00000000 0x00740068 0x00700074     ........h.t.t.p.
    0x002f003a 0x0073002f 0x00680063 0x006f006f     :././.s.c.h.o.o.
    0x002d006c 0x00630066 0x00610064 0x00370038     l.-.f.c.d.a.8.7.
    0x00340062 0x0066002d 0x00630032 0x002d0033     b.4.-.f.2.c.3.-.
    0x00330034 0x00340064 0x0062002d 0x00390035     4.3.d.4.-.b.5.9.
    0x002d0065 0x00630033 0x00390066 0x00610031     e.-.3.c.f.9.1.a.
    0x00320035 0x00390062 0x00310031 0x0031002d     5.2.b.9.1.1.-.1.
    ...
Leak: 0x7f9170cb7610  size=32  zone: DefaultMallocZone_0x10222a000
    0x7589a6e0 0x00007f91 0x00000000 0x00000001     ...u............
    0x00000000 0x00000000 0x73223ee0 0x00027f91     .........>"s....
Leak: 0x7f9170cb7630  size=32  zone: DefaultMallocZone_0x10222a000
    0x1ad3ea70 0x00000001 0x00000001 0x6f746365     p...........ecto
    0x1ad3ea50 0x00000001 0x7d783a5d 0x00020000     P.......]:x}....
Leak: 0x7f9170cb7940  size=96  zone: DefaultMallocZone_0x10222a000   WebCore::HTMLDivElement  C++  QtWebKit
    0x050cf1c0 0x00000001 0x00000000 0x00000000     ................
    0x00000000 0x0400211e 0x758983d0 0x00007f91     .....!.....u....
    0x758f9c50 0x00007f91 0x00000000 0x00000000     P..u............
    0x00000000 0x00000000 0x00000000 0x00000000     ................
    0x760ad000 0x00007f91 0x760ad000 0x00007f91     ...v.......v....
    0x0d51d5c8 0x00000001 0x13b36280 0x00000001     ..Q......b......
Leak: 0x7f9170cbe090  size=32  zone: DefaultMallocZone_0x10222a000
    0x1b256f50 0x00000001 0x00000001 0x00000001     Po%.............
    0x1b256f30 0x00000001 0x1e7f1090 0x00000001     0o%.............
Leak: 0x7f9170cc3bb0  size=48  zone: DefaultMallocZone_0x10222a000
    0x00000001 0x00000009 0x0000000a 0xb00007f9     ................
    0x00000018 0x00000000 0x00650074 0x00740078     ........t.e.x.t.
    0x0068002f 0x006d0074 0x0000006c 0x000307f9     /.h.t.m.l.......
Leak: 0x7f9170cc7430  size=32  zone: DefaultMallocZone_0x10222a000
    0x17b848c0 0x00000001 0x00000001 0x200007f9     .H............. 
    0x17b848a0 0x00000001 0x00000000 0x00020000     .H..............
Leak: 0x7f9170cc8590  size=48  zone: DefaultMallocZone_0x10222a000
    0x00000001 0x0000000a 0x0000000b 0xe00007f9     ................
    0x00000018 0x00000000 0x0065004b 0x00700065     ........K.e.e.p.
    0x0041002d 0x0069006c 0x00650076 0x00630000     -.A.l.i.v.e...c.
Leak: 0x7f9170cd4ec0  size=32  zone: DefaultMallocZone_0x10222a000
    0x14b4bc80 0x00000001 0x00000001 0x700007f9     ...............p
    0x14b4bc60 0x00000001 0x1758e38c 0x000207f9     `.........X.....
Leak: 0x7f9170d295e0  size=80  zone: DefaultMallocZone_0x10222a000
    0x00000001 0x00000015 0x00000016 0x100007f9     ................
    0x00000018 0x00000000 0x00640041 0x0062006f     ........A.d.o.b.
    0x00410065 0x004d0041 0x00650044 0x00650074     e.A.A.M.D.e.t.e.
    0x00740063 0x0070002e 0x0075006c 0x00690067     c.t...p.l.u.g.i.
    0x0000006e 0x20000000 0x83b6a020 0x0000014f     n......  ...O...
Leak: 0x7f9170d30f10  size=160  zone: DefaultMallocZone_0x10222a000
    0x1eed8d00 0x00000001 0x00000001 0x00000001     ................
    0x00000002 0x00000000 0x2f72d548 0x00000001     ........H.r/....
    0x00000001 0x00000001 0x00000000 0x00000000     ................
    0x00000000 0x00000000 0x00000001 0x00000000     ................
    0x1cee7400 0x00000001 0x00000010 0x00000001     .t..............
    0x00000000 0x00000000 0x00000000 0x00000000     ................
    0x200eb6a0 0x00000001 0x00000002 0x00000002     ... ............
    0x129fc7e0 0x00000001 0x00000007 0x00000007     ................
    ...
Leak: 0x7f9170d381a0  size=160  zone: DefaultMallocZone_0x10222a000
    0x1ade3040 0x00000001 0x00000001 0x00000001     @0..............
    0x00000001 0x00000000 0x13f5a3e0 0x00000001     ................
    0x00000001 0x00000001 0x00000000 0x00000000     ................
    0x00000000 0x00000000 0x00000000 0x00000000     ................
    0x00000000 0x00000000 0x00000000 0x00000000     ................
    0x00000000 0x00000000 0x00000000 0x00000000     ................
    0x00000000 0x00000000 0x00000000 0x00000000     ................
    0x1a8bf000 0x00000001 0x00000090 0x00000082     ................
    ...
Leak: 0x7f9170d461c0  size=160  zone: DefaultMallocZone_0x10222a000
    0x00000001 0x00000042 0x00000043 0x20000000     ....B...C...... 
    0x00000018 0x00000000 0x00360022 0x00340036     ........".6.6.4.
    0x00380064 0x00660065 0x00300039 0x00350064     d.8.e.f.9.0.d.5.
    0x00310032 0x00320035 0x00620062 0x00620033     2.1.5.2.b.b.3.b.
    0x00350032 0x00340063 0x00370064 0x00610033     2.5.c.4.d.7.3.a.
    0x00650032 0x00610065 0x00350038 0x00630061     2.e.e.a.8.5.a.c.
    0x00330030 0x00390037 0x00650033 0x00340035     0.3.7.9.3.e.5.4.
    0x00370034 0x00350039 0x00320062 0x00650039     4.7.9.5.b.2.9.e.
    ...
Leak: 0x7f9170d46260  size=48  zone: DefaultMallocZone_0x10222a000
    0x00000001 0x00000004 0x00000005 0xf00007f9     ................
    0x00000018 0x00000000 0x006f006e 0x0065006e     ........n.o.n.e.
    0x00350000 0x00330038 0x00340036 0x00030000     ..5.8.3.6.4.....
Leak: 0x7f9170d462f0  size=80  zone: DefaultMallocZone_0x10222a000
    0x00000001 0x00000016 0x00000017 0x20000000     ............... 
    0x00000018 0x00000000 0x00700061 0x006c0070     ........a.p.p.l.
    0x00630069 0x00740061 0x006f0069 0x002f006e     i.c.a.t.i.o.n./.
    0x0061006a 0x00610076 0x00630073 0x00690072     j.a.v.a.s.c.r.i.
    0x00740070 0x00000000 0x737b6af0 0x00057f91     p.t......j{s....
Leak: 0x7f9170d4f160  size=48  zone: DefaultMallocZone_0x10222a000
    0x00000001 0x00000008 0x00000009 0x100007f9     ................
    0x00000018 0x00000000 0x002e0030 0x00340030     ........0...0.4.
    0x00380034 0x00370036 0x00000000 0x00030000     4.8.6.7.........
Leak: 0x7f9170d521f0  size=48  zone: DefaultMallocZone_0x10222a000
    0x00000001 0x00000008 0x00000009 0x500007f9     ...............P
    0x00000018 0x00000000 0x002e0030 0x00300030     ........0...0.0.
    0x00310034 0x00320031 0x00000000 0x00030000     4.1.1.2.........
Leak: 0x7f9170d525d0  size=64  zone: DefaultMallocZone_0x10222a000
    0x00000001 0x00000011 0x00000012 0xc00007f9     ................
    0x00000018 0x00000000 0x00610043 0x00790070     ........C.a.p.y.
    0x00610062 0x00610072 0x0069002e 0x0076006e     b.a.r.a...i.n.v.
    0x006b006f 0x00280065 0x00000029 0x00040000     o.k.e.(.).......
Leak: 0x7f9170d52e60  size=80  zone: DefaultMallocZone_0x10222a000
    0x00000001 0x00000018 0x00000019 0x900007f9     ................
    0x00000018 0x00000000 0x00720070 0x00660065     ........p.r.e.f.
    0x0069006c 0x00680067 0x002d0074 0x00690068     l.i.g.h.t.-.h.i.
    0x003b0074 0x006e0020 0x002d006f 0x0072006f     t.;. .n.o.-.o.r.
    0x00670069 0x006e0069 0x00000000 0x00050000     i.g.i.n.........
Leak: 0x7f9170d53fc0  size=96  zone: DefaultMallocZone_0x10222a000
    0x00000001 0x00000022 0x00000023 0x800007f9     ...."...#.......
    0x00000018 0x00000000 0x00660022 0x00630031     ........".f.1.c.
    0x00350035 0x00630039 0x00320062 0x00660039     5.5.9.c.b.2.9.f.
    0x00630062 0x00300031 0x00650066 0x00660038     b.c.1.0.f.e.8.f.
    0x00390063 0x00610039 0x00330033 0x00330034     c.9.9.a.3.3.4.3.
    0x00650064 0x00630036 0x00220036 0x00060000     d.e.6.c.6.".....
Leak: 0x7f9170d542d0  size=48  zone: DefaultMallocZone_0x10222a000
    0x00000001 0x00000004 0x00000005 0x400007f9     ...............@
    0x00000018 0x00000000 0x007a0067 0x00700069     ........g.z.i.p.
    0x00000000 0x00007372 0x00000000 0x00030000     ....rs..........
Leak: 0x7f9170d5c3d0  size=80  zone: DefaultMallocZone_0x10222a000
    0x00000001 0x00000016 0x00000017 0x20000000     ............... 
    0x00000018 0x00000000 0x00700061 0x006c0070     ........a.p.p.l.
    0x00630069 0x00740061 0x006f0069 0x002f006e     i.c.a.t.i.o.n./.
    0x0061006a 0x00610076 0x00630073 0x00690072     j.a.v.a.s.c.r.i.
    0x00740070 0x00000000 0x00000000 0x00050000     p.t.............
Leak: 0x7f9170daa590  size=48  zone: DefaultMallocZone_0x10222a000
    0x00000001 0x00000004 0x00000005 0x800007f9     ................
    0x00000018 0x00000000 0x00360037 0x00340039     ........7.6.9.4.
    0x00720000 0x00430000 0x0072006f 0x00000073     ..r...C.o.r.s...
Leak: 0x7f9170e11980  size=48  zone: DefaultMallocZone_0x10222a000   __NSCFString  ObjC  CoreFoundation  length: 20  "Mac-2BD1B31983FE1663"
...
More stuff but not too many characters
rupurt commented 8 years ago

We do use a lot of iframes do you think that has anything to do with it? Looking at the source of WebPageManager it iterates through the pages that it has a handle on from createPage. I'm not entirely sure if iframes go through createPage.

mhoran commented 8 years ago

Hey @rupurt. What versions of capybara-webkit and QtWebKit are you using? I'd encourage you to use the latest (compatible) versions possible, e.g. QtWebKit 5.5.

Iframes are not treated as "pages" by the WebPageManager -- those are equivalent to tabs, or new windows. We don't keep a handle on frames that aren't accessed by any of the capybara methods, and I can't think of anything that would lead to leaks otherwise.

If you can extract a test case that reliably reproduces this issue, that'd go a long way in tracking down the issue. Unfortunately, as the leaks utility identified, there are lots of leaky internals to Qt and QtWebKit itself that we can't do much about.

twalpole commented 6 years ago

Closing due to lack of response