<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 02:55:29 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>[SERVER-901] Severe memory leak in mongos on simple queries</title>
                <link>https://jira.mongodb.org/browse/SERVER-901</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Mongos seems to leak on every findOne query.&lt;/p&gt;

&lt;p&gt;How to reproduce? I&apos;ve configured sharding using example script: &lt;a href=&quot;http://github.com/mongodb/mongo-snippets/blob/master/sharding/first.js&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://github.com/mongodb/mongo-snippets/blob/master/sharding/first.js&lt;/a&gt;&lt;br/&gt;
I ran this script once and then tried to benchmark query time using the following code in the client:&lt;/p&gt;

&lt;p&gt;for (i = 0; i &amp;lt; 400; i ++) { for (num = 0; num &amp;lt; 100; num ++) { db.data.findOne(&lt;/p&gt;
{&quot;num&quot; : num}
&lt;p&gt;) }; } 1;&lt;/p&gt;

&lt;p&gt;When running this code I noticed mongos quickly grows in size in memory. Restarting client doesn&apos;t seem to release any memory resources in mongos. I could reproduce it first with mongodb 1.2.0, then I tried 1.2.2, 1.3.1 and finally with the latest git and all versions showed the problem. I&apos;m sorry, I&apos;m not sure how mongodb version number maps to version number of mongos so I&apos;ve set only latest release and unreleased version numbers in jira&apos;s selection box but I guess it probably affects all versions.&lt;/p&gt;

&lt;p&gt;P.S. I&apos;ve tried to run mongos under valgrind and it confirms the problem. See the attached valgrind log.&lt;/p&gt;</description>
                <environment>Ubuntu 9.10, i386</environment>
        <key id="11242">SERVER-901</key>
            <summary>Severe memory leak in mongos on simple queries</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="2" iconUrl="https://jira.mongodb.org/images/icons/priorities/critical.svg">Critical - P2</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="ilyam">Ilya Martynov</reporter>
                        <labels>
                    </labels>
                <created>Wed, 3 Feb 2010 08:26:13 +0000</created>
                <updated>Tue, 12 Jul 2016 00:30:08 +0000</updated>
                            <resolved>Fri, 5 Feb 2010 20:51:34 +0000</resolved>
                                                    <fixVersion>1.3.5</fixVersion>
                                    <component>Sharding</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="12147" author="eliot" created="Fri, 5 Feb 2010 20:51:34 +0000"  >&lt;p&gt;the others look ok for me for now.&lt;br/&gt;
resolving&lt;/p&gt;</comment>
                            <comment id="12146" author="redbeard0531" created="Fri, 5 Feb 2010 18:28:01 +0000"  >&lt;p&gt;I&apos;ve plugged the large (2.6GB!) memory leak. The remaining small leaks are either for std::string which valgrind says to ignore and for various mongo caches. Some of the cache leaks may simply be &quot;leaking&quot; by design since there is little reason to free them when mongos exits and their container is destroyed.&lt;/p&gt;

&lt;p&gt;Reassigning back to eliot for input on the caches. The largest leak (1.6MB) seems related to the TODO in the CursorCache destructor. The updated valgrind.log I uploaded should be more useful since mongos was compiled without inlining.&lt;/p&gt;</comment>
                            <comment id="12145" author="redbeard0531" created="Fri, 5 Feb 2010 18:20:30 +0000"  >&lt;p&gt;Updated valgrind log with debug version of mongos&lt;/p&gt;</comment>
                            <comment id="12144" author="auto" created="Fri, 5 Feb 2010 18:08:21 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;login&apos;: &apos;RedBeard0531&apos;, &apos;name&apos;: &apos;Mathias Stearn&apos;, &apos;email&apos;: &apos;mathias@10gen.com&apos;}
&lt;p&gt;Message: Plug large memory leak in mongos &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-901&quot; title=&quot;Severe memory leak in mongos on simple queries&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-901&quot;&gt;&lt;del&gt;SHARDING-77&lt;/del&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;http://github.com/mongodb/mongo/commit/a39d197a5aa996569d39d073a973a690fde11296&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://github.com/mongodb/mongo/commit/a39d197a5aa996569d39d073a973a690fde11296&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                            <attachment id="10131" name="valgrind.log" size="57883" author="mathias@mongodb.com" created="Fri, 5 Feb 2010 18:20:30 +0000"/>
                            <attachment id="10129" name="valgrind.log" size="45008" author="ilyam" created="Wed, 3 Feb 2010 08:26:13 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>4.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Fri, 5 Feb 2010 18:08:21 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        14 years, 2 weeks, 5 days ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[]]></customfieldvalue>


                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10057" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comment by Customer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>ramon.fernandez@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            14 years, 2 weeks, 5 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>auto</customfieldvalue>
            <customfieldvalue>eliot</customfieldvalue>
            <customfieldvalue>ilyam</customfieldvalue>
            <customfieldvalue>mathias@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrpp3b:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hrin5z:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>22405</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_23361" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Requested By</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10053" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>Time In Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_22870" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Triagers</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrnvlz:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                    </customfields>
    </item>
</channel>
</rss>