<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:51:41 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[JAVA-186] Memory Leak</title>
                <link>https://jira.mongodb.org/browse/JAVA-186</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;Run this &lt;a href=&quot;https://gist.github.com/b905d59e9af00a7ad33f&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://gist.github.com/b905d59e9af00a7ad33f&lt;/a&gt; to reproduce.&lt;/p&gt;

&lt;p&gt;Java eats up all of its heap then tries to GC over and over again without freeing up any memory.&lt;/p&gt;

&lt;p&gt;I think that the problem is in BasicOutputBuffer.&lt;/p&gt;</description>
                <environment></environment>
        <key id="13335">JAVA-186</key>
            <summary>Memory Leak</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="9">Done</resolution>
                                        <assignee username="eliot">Eliot Horowitz</assignee>
                                    <reporter username="elitheeli">Eli Fox-Epstein</reporter>
                        <labels>
                    </labels>
                <created>Tue, 12 Oct 2010 18:06:17 +0000</created>
                <updated>Fri, 29 Oct 2010 02:50:54 +0000</updated>
                            <resolved>Tue, 12 Oct 2010 19:48:43 +0000</resolved>
                                                                                        <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="19150" author="dahankzter" created="Wed, 13 Oct 2010 17:29:46 +0000"  >&lt;p&gt;You are right of course!&lt;br/&gt;
I can&apos;t believe I didn&apos;t see this!&lt;/p&gt;

&lt;p&gt;Its the internal queue in the executor that grows endlessly due to the endless while loop.&lt;/p&gt;

&lt;p&gt;Well, a reality check every now and then can&apos;t hurt!&lt;/p&gt;</comment>
                            <comment id="19135" author="eliot" created="Tue, 12 Oct 2010 22:50:14 +0000"  >&lt;p&gt;Please see foo.java attached.&lt;br/&gt;
When I run there is no leak nor any increase in gc or memory usage.&lt;/p&gt;</comment>
                            <comment id="19133" author="dahankzter" created="Tue, 12 Oct 2010 21:39:00 +0000"  >&lt;p&gt;Not sure that that is the whole story, replacing the tasks with a single runnable produces the same result.&lt;br/&gt;
There are only 2 threads and increasing them speeds up the pace even&lt;/p&gt;

&lt;p&gt;Giving the JVM a large amount of memory does not help. Time between GC approaches 0 as execution time grows after which it blows up.&lt;/p&gt;

&lt;p&gt;Removing the mongodb code from the runnable and increasing the memory makes it perform a full GC every second but still die with oom after a while.&lt;/p&gt;

&lt;p&gt;I think that its just too fast so the GC can&apos;t cope.&lt;/p&gt;

&lt;p&gt;Still Eliot please remove the explicit calls to gc() in the driver.&lt;/p&gt;</comment>
                            <comment id="19128" author="eliot" created="Tue, 12 Oct 2010 19:48:43 +0000"  >&lt;p&gt;Running your test through a profiler, the issue is you create an infinite number of worker tasks.&lt;br/&gt;
Since that grows unbounded, it uses all the ram&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                            <attachment id="10506" name="foo.java" size="1456" author="eliot" created="Tue, 12 Oct 2010 22:50:14 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hrhcrj:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>14868</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>