<?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>22959</bug_id>
          
          <creation_ts>2008-12-22 01:47:58 -0800</creation_ts>
          <short_desc>Memory leak in soup during loading &amp; unloading an URL</short_desc>
          <delta_ts>2008-12-22 13:22:21 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Platform</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Critical</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Dhananjoy Chutia">dhanrd</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ddkilzer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>103163</commentid>
    <comment_count>0</comment_count>
    <who name="Dhananjoy Chutia">dhanrd</who>
    <bug_when>2008-12-22 01:47:58 -0800</bug_when>
    <thetext>Hi,
   I compiled WebKit-r39433 with configuration option --with-target=x11 --with-http-backend=soup. I created a page to refresh at interval of 2000ms with the following source code:

&lt;html&gt;
    &lt;script&gt;
        function callme()
        {
            setTimeout(callme2,2000);
        }

        function callme2() 
        {
            window.location.reload();
        }
    &lt;/script&gt;
    &lt;body onload=&quot;callme()&quot;&gt;
    &lt;/body&gt;

&lt;/html&gt;

I also observed the VmSize of GtkLauncher and found the following result.

Mon Dec 22 14:10:31 IST 2008
webkit: VmSize:    57348 kB

Mon Dec 22 14:37:31 IST 2008
webkit: VmSize:    58708 kB

I created a patch which shows no leaks for the same above test. I will post it soon.

I have also discussed about these leaks in the following thread:

https://lists.webkit.org/pipermail/webkit-dev/2008-December/006074.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103164</commentid>
    <comment_count>1</comment_count>
      <attachid>26198</attachid>
    <who name="Dhananjoy Chutia">dhanrd</who>
    <bug_when>2008-12-22 02:10:10 -0800</bug_when>
    <thetext>Created attachment 26198
Memory leak fix for soup

Here is my observation for the same test, after applying the patch.

Mon Dec 22 15:01:54 IST 2008
webkit: VmSize:    56972 kB

Mon Dec 22 15:23:54 IST 2008
webkit: VmSize:    56972 kB

It can be seen that there is no leak happened during this test.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103181</commentid>
    <comment_count>2</comment_count>
      <attachid>26198</attachid>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2008-12-22 08:44:10 -0800</bug_when>
    <thetext>Comment on attachment 26198
Memory leak fix for soup

Seems sane and well-tested.  r=me</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103212</commentid>
    <comment_count>3</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2008-12-22 13:22:21 -0800</bug_when>
    <thetext>$ git svn dcommit
Committing to http://svn.webkit.org/repository/webkit/trunk ...
	M	WebCore/ChangeLog
	M	WebCore/platform/network/soup/ResourceHandleSoup.cpp
Committed r39439

http://trac.webkit.org/changeset/39439

</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>26198</attachid>
            <date>2008-12-22 02:10:10 -0800</date>
            <delta_ts>2008-12-22 08:44:10 -0800</delta_ts>
            <desc>Memory leak fix for soup</desc>
            <filename>memleak_fix_for_soup.patch</filename>
            <type>text/plain</type>
            <size>1187</size>
            <attacher name="Dhananjoy Chutia">dhanrd</attacher>
            
              <data encoding="base64">SW5kZXg6IFdlYkNvcmUvQ2hhbmdlTG9nCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIFdlYkNvcmUvQ2hhbmdlTG9n
CShyZXZpc2lvbiAzOTQzNCkKKysrIFdlYkNvcmUvQ2hhbmdlTG9nCSh3b3JraW5nIGNvcHkpCkBA
IC0xLDMgKzEsMTMgQEAKKzIwMDgtMTItMjQgIERoYW5hbmpveSBDaHV0aWEgPGRoYW5yZEBnbWFp
bC5jb20+CisKKyAgICAgICAgUmV2aWV3ZWQgYnkgTk9CT0RZIChPT1BTISkuCisKKyAgICAgICAg
Rml4ZXM6IGh0dHBzOi8vYnVncy53ZWJraXQub3JnL3Nob3dfYnVnLmNnaT9pZD0yMjk1OQorICAg
ICAgICBNZW1vcnkgbGVhayBmaXhlcyBmb3IgV2ViS2l0K3NvdXAKKworICAgICAgICAqIHBsYXRm
b3JtL25ldHdvcmsvc291cC9SZXNvdXJjZUhhbmRsZVNvdXAuY3BwOgorICAgICAgICAoV2ViQ29y
ZTo6ZmluaXNoZWRDYWxsYmFjayk6CisKIDIwMDgtMTItMjIgIE5pa29sYXMgWmltbWVybWFubiAg
PG5pa29sYXMuemltbWVybWFubkB0b3JjaG1vYmlsZS5jb20+CiAKICAgICAgICAgTm90IHJldmll
d2VkLiBUcnkgdG8gZml4IGNsZWFuIE1hYyBidWlsZHMsIHNldCByb2xlPXByaXZhdGUgZm9yIEZv
cm1EYXRhQnVpbGRlci5oCkluZGV4OiBXZWJDb3JlL3BsYXRmb3JtL25ldHdvcmsvc291cC9SZXNv
dXJjZUhhbmRsZVNvdXAuY3BwCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIFdlYkNvcmUvcGxhdGZvcm0vbmV0d29y
ay9zb3VwL1Jlc291cmNlSGFuZGxlU291cC5jcHAJKHJldmlzaW9uIDM5NDM0KQorKysgV2ViQ29y
ZS9wbGF0Zm9ybS9uZXR3b3JrL3NvdXAvUmVzb3VyY2VIYW5kbGVTb3VwLmNwcAkod29ya2luZyBj
b3B5KQpAQCAtMTYzLDggKzE2Myw2IEBAIHN0YXRpYyB2b2lkIGZpbmlzaGVkQ2FsbGJhY2soU291
cFNlc3Npb24KICAgICAgICAgcmV0dXJuOwogCiAgICAgUmVzb3VyY2VIYW5kbGVJbnRlcm5hbCog
ZCA9IGhhbmRsZS0+Z2V0SW50ZXJuYWwoKTsKLSAgICAvLyBUaGUgbWVzc2FnZSBoYXMgYmVlbiBo
YW5kbGVkLgotICAgIGQtPm1fbXNnID0gTlVMTDsKIAogICAgIFJlc291cmNlSGFuZGxlQ2xpZW50
KiBjbGllbnQgPSBoYW5kbGUtPmNsaWVudCgpOwogICAgIGlmICghY2xpZW50KQo=
</data>
<flag name="review"
          id="12374"
          type_id="1"
          status="+"
          setter="ddkilzer"
    />
          </attachment>
      

    </bug>

</bugzilla>