<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:22:22 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-10136] Passing impossible value to skip on aggregation framework causes mongo to exit with out of memory</title>
                <link>https://jira.mongodb.org/browse/SERVER-10136</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;When passing the following value to $skip on aggregation framework, mongo immediately exists with log message &quot;out of memory&quot;&lt;br/&gt;
The value passed to skip was: 4294967294&lt;/p&gt;

&lt;p&gt;It appears mongo tries to allocate memory according to this number and fails with out of memory.&lt;/p&gt;

&lt;p&gt;In the log file:&lt;br/&gt;
tcmalloc: large alloc 103079223296 bytes == (nil) @ &lt;br/&gt;
Mon Jul  8 19:41:46.915 out of memory, printing stack and exiting:&lt;/p&gt;</description>
                <environment>Ubuntu 12.04 LTS, MongoDB 2.4.3</environment>
        <key id="81625">SERVER-10136</key>
            <summary>Passing impossible value to skip on aggregation framework causes mongo to exit with out of memory</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="mathias@mongodb.com">Mathias Stearn</assignee>
                                    <reporter username="chenfisher">Chen Fisher</reporter>
                        <labels>
                    </labels>
                <created>Mon, 8 Jul 2013 21:19:20 +0000</created>
                <updated>Mon, 11 Jul 2016 17:39:08 +0000</updated>
                            <resolved>Mon, 22 Jul 2013 22:21:41 +0000</resolved>
                                    <version>2.4.3</version>
                                    <fixVersion>2.5.2</fixVersion>
                                    <component>Aggregation Framework</component>
                    <component>Stability</component>
                                        <votes>0</votes>
                                    <watches>6</watches>
                                                                                                                <comments>
                            <comment id="386591" author="auto" created="Mon, 22 Jul 2013 22:19:53 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;RedBeard0531&apos;, u&apos;name&apos;: u&apos;Mathias Stearn&apos;, u&apos;email&apos;: u&apos;mathias@10gen.com&apos;}
&lt;p&gt;Message: Add sort with large limit case to &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-9444&quot; title=&quot;Use new Sorter for Aggregation $sort and $group&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-9444&quot;&gt;&lt;del&gt;SERVER-9444&lt;/del&gt;&lt;/a&gt; test&lt;/p&gt;

&lt;p&gt;Crash reported in &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-10136&quot; title=&quot;Passing impossible value to skip on aggregation framework causes mongo to exit with out of memory&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-10136&quot;&gt;&lt;del&gt;SERVER-10136&lt;/del&gt;&lt;/a&gt;, but resolved automatically by &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-9444&quot; title=&quot;Use new Sorter for Aggregation $sort and $group&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-9444&quot;&gt;&lt;del&gt;SERVER-9444&lt;/del&gt;&lt;/a&gt;.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/c8fac60210477e7c716dc4c5e67556d63b703bb4&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/c8fac60210477e7c716dc4c5e67556d63b703bb4&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="386445" author="redbeard0531" created="Mon, 22 Jul 2013 19:53:12 +0000"  >&lt;p&gt;Ok, then it is the same issue and it is solved in master by &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-9444&quot; title=&quot;Use new Sorter for Aggregation $sort and $group&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-9444&quot;&gt;&lt;del&gt;SERVER-9444&lt;/del&gt;&lt;/a&gt;. Note that we move skips after adjacent limits (adding the skip amout to the limit) since that enables further optimizations. In this case the sort absorbs the limit since we can use a more optimal sorting algorithm when we know we only need some of the results, which led to the crash in 2.4 when we tried to allocate an array large enough to hold that many documents. In 2.5.1 and master, we now only do that if the array size would be under some threshhold size.&lt;/p&gt;</comment>
                            <comment id="386057" author="chenfisher" created="Mon, 22 Jul 2013 07:28:22 +0000"  >&lt;p&gt;I&apos;ve managed to reproduce it with the following pipeline (I narrowed it down to this):&lt;br/&gt;
sort, skip, limit&lt;/p&gt;

&lt;p&gt;example:&lt;br/&gt;
db.collection.aggregate(&lt;span class=&quot;error&quot;&gt;&amp;#91;{$sort:{&amp;quot;something&amp;quot;:-1}}, {$skip:4294967294}, {$limit:25}&amp;#93;&lt;/span&gt;)&lt;/p&gt;</comment>
                            <comment id="384146" author="redbeard0531" created="Thu, 18 Jul 2013 18:19:18 +0000"  >&lt;p&gt;Looking at this ticket again, I&apos;m not sure this is the same issue. I know there was an issue with unindexed $sort + $limit, but I&apos;m not able to repro with $skip.&lt;/p&gt;

&lt;p&gt;Could you provide the exact pipeline that is crashing for you? It sounds like it should crash w/o any data, but if data is nessisary, please provide it or a script that can generate crashing data.&lt;/p&gt;</comment>
                            <comment id="376584" author="redbeard0531" created="Mon, 8 Jul 2013 21:54:31 +0000"  >&lt;p&gt;This will automatically be fixed by &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-9444&quot; title=&quot;Use new Sorter for Aggregation $sort and $group&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-9444&quot;&gt;&lt;del&gt;SERVER-9444&lt;/del&gt;&lt;/a&gt; which should be pushed out soon.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                            <outwardlinks description="depends on">
                                        <issuelink>
            <issuekey id="72890">SERVER-9444</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is depended on by">
                                                        </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                                        </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>5.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10011" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Backwards Compatibility</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10038"><![CDATA[Fully Compatible]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Mon, 8 Jul 2013 21:54:31 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        10 years, 30 weeks, 2 days ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[<s><a href='https://jira.mongodb.org/browse/SERVER-9444'>SERVER-9444</a></s>]]></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>
                            10 years, 30 weeks, 2 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Old_Backport</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10000"><![CDATA[No]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10032" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Operating System</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10026"><![CDATA[ALL]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>auto</customfieldvalue>
            <customfieldvalue>chenfisher</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|hrmnx3:</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>74626</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_10750" key="com.atlassian.jira.plugin.system.customfieldtypes:textarea">
                        <customfieldname>Steps To Reproduce</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>&lt;p&gt;send &quot;aggregate&quot; command with some $match and pass 4294967294 to $skip operator. mongo should immediately exit.&lt;/p&gt;

&lt;p&gt;1. Did not try this with different number but I suspect big enough number would cause mongo to exit as well&lt;/p&gt;

&lt;p&gt;2. Did not try this with &quot;normal&quot; query (non aggregation framework)&lt;/p&gt;</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_10166" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Tests Written</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10154"><![CDATA[Complete]]></customfieldvalue>

                        </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|hrj4jj:</customfieldvalue>

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