<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:02:10 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-3131] JS Error: out of memory leading to segfaults</title>
                <link>https://jira.mongodb.org/browse/SERVER-3131</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Full details are at &lt;a href=&quot;http://foswiki.org/Tasks/Item10672?section=mongodb-user2#Crash_5&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://foswiki.org/Tasks/Item10672?section=mongodb-user2#Crash_5&lt;/a&gt; (and even more details at &lt;a href=&quot;http://foswiki.org/Tasks/Item10672&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://foswiki.org/Tasks/Item10672&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;We tested for two weeks before putting into production, a new version of our application (Foswiki) using MongoDB 1.8.1 as a query-cache/accelerator. There were no unexplained instabilities. In production now though, we can run the site for a couple of days, but at least twice a week we are getting segfaults in whichever mongod happens to be the primary.&lt;/p&gt;

&lt;p&gt;It&apos;s not a sudden thing - we get these spurious JS Error: out of memory and Assertion: 10432:JS_NewObject failed for global warnings in the log, for an hour or two, before the mongod process segfaults.&lt;/p&gt;

&lt;p&gt;The problem is extremely hard to reproduce; we haven&apos;t been able to reproduce ourselves, in our test environment, using artificial loads (our production site is public to the Internet).&lt;/p&gt;

&lt;p&gt;seta.log.022c is a snippet leading up to the latest segfault.&lt;/p&gt;

&lt;p&gt;seta.log.022b is a snippet leading up to and including the first few minutes of problems after running fine for a couple of days.&lt;/p&gt;

&lt;p&gt;Both are using -vvvvv verbosity, which generates ~10GB/day of log files (extremely burdensome), so I&apos;ve filtered them using grep -v ^checking&lt;/p&gt;</description>
                <environment>Ubuntu 10.04.2 LTS, 4GB RAM VMWare instance with one CPU core (Intel(R) Xeon(R) CPU X5680 @ 3.33GHz)&lt;br/&gt;
&lt;br/&gt;
Three member replica set, running as follows:&lt;br/&gt;
mongod --pidfilepath /var/lib/mongodb/seta.pid --config /etc/mongodb/seta.conf --replSet seta --dbpath /var/lib/mongodb/seta -vvvvv --port 27017 --logpath /var/log/mongodb/seta.log&lt;br/&gt;
&lt;br/&gt;
/etc/mongodb/seta.conf:&lt;br/&gt;
logappend=true&lt;br/&gt;
noprealloc = true&lt;br/&gt;
smallfiles = true&lt;br/&gt;
directoryperdb = true&lt;br/&gt;
&lt;br/&gt;
We were crashing with 1.8.1 from the 10gben deb repo, and we just got another segfault today running mongod --version&lt;br/&gt;
db version v1.8.2-rc1, pdfile version 4.5&lt;br/&gt;
Mon May 23 17:18:45 git version: da537eae3ec18611424dabb63a202d4940059be4&lt;br/&gt;
&lt;br/&gt;
Members are running *only* MongoDB, and nothing else&lt;br/&gt;
&lt;br/&gt;
This is the same setup which was discussed at &lt;a href=&quot;http://groups.google.com/group/mongodb-user/browse_thread/thread/35efda30f3aeff35&quot;&gt;http://groups.google.com/group/mongodb-user/browse_thread/thread/35efda30f3aeff35&lt;/a&gt;</environment>
        <key id="17401">SERVER-3131</key>
            <summary>JS Error: out of memory leading to segfaults</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="antoine">Antoine Girbal</assignee>
                                    <reporter username="csirac2">Paul Harvey</reporter>
                        <labels>
                    </labels>
                <created>Mon, 23 May 2011 07:32:11 +0000</created>
                <updated>Tue, 12 Jul 2016 00:19:04 +0000</updated>
                            <resolved>Wed, 29 Jun 2011 00:08:23 +0000</resolved>
                                    <version>1.8.1</version>
                                    <fixVersion>1.9.1</fixVersion>
                                    <component>JavaScript</component>
                                        <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="41475" author="jason.coombs@yougov.com" created="Sat, 9 Jul 2011 15:46:16 +0000"  >&lt;p&gt;We started getting these &quot;out of memory&quot; errors today. We just moved to a new datacenter, so we have a few extra variables to contend with. We&apos;re also running MongoDB 1.8.1 (same as in the original datacenter). We did not encounter the segfault, even after several hours of the OOM errors, but we did restart the process to restore service. The OOM errors started after running for about 8 hours. We&apos;re using the same applications, though we&apos;re running more nodes. We&apos;re under moderate load. We have turned on journaling for our master DB (which we did not in our old DC).&lt;/p&gt;

&lt;p&gt;Should this ticket be marked as resolved when all that was done was to allow for an increase in JS memory? Is that the prescribed fix (wait until you get these errors, then bump up your JS memory)? Does the resolution indicate that the leak is caused by a client&apos;s JS code itself?&lt;/p&gt;

&lt;p&gt;Is there any value in upgrading to 1.8.2 with respect to this issue? Should we consider limiting the number of application nodes connecting? Is there any reason to think that journaling would have any impact?&lt;/p&gt;

&lt;p&gt;For now, we&apos;re watching for the OOM errors, expecting they&apos;ll crop up again in a few hours.&lt;/p&gt;</comment>
                            <comment id="39638" author="antoine" created="Wed, 29 Jun 2011 00:08:23 +0000"  >&lt;p&gt;moving this issue to 1.9.1 version since the increase in JS memory is available in 1.9 line.&lt;/p&gt;</comment>
                            <comment id="34385" author="antoine" created="Wed, 25 May 2011 17:53:02 +0000"  >&lt;p&gt;ok let us know how it goes.&lt;br/&gt;
On our side we&apos;ll try to find leak&lt;/p&gt;</comment>
                            <comment id="34270" author="csirac2" created="Wed, 25 May 2011 00:07:33 +0000"  >&lt;p&gt;We are now running with a build from b6f07e2b6db67ce4ef5812af4b912e3851f388f0 and changed the limit to 128M (resulting in 14fa0ca45328097b38d4d9dcf39081302079ecc6). For now I&apos;m going to keep the cron job which restarts everything, for a while, so I&apos;ll come back in a week or two with my findings.&lt;/p&gt;

&lt;p&gt;Still, I feel that we need extra debug info to really get to the bottom of this leak.&lt;/p&gt;</comment>
                            <comment id="34096" author="csirac2" created="Tue, 24 May 2011 07:36:53 +0000"  >&lt;p&gt;Thank you! I&apos;ll git it a shot tonight. As I mentioned on &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-3012&quot; title=&quot;JS &amp;quot;out of memory&amp;quot; should recover more gracefully&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-3012&quot;&gt;&lt;del&gt;SERVER-3012&lt;/del&gt;&lt;/a&gt;, it would be great if there was some extra debug info we could get out of -vvvvv&lt;span class=&quot;error&quot;&gt;&amp;#91;...&amp;#93;&lt;/span&gt; debug logs, which could aid us in tracking down a JS leak. I don&apos;t know how JS memory management is done, but perhaps GC events or heapsize changes could be useful... if those things exist&lt;/p&gt;</comment>
                            <comment id="34083" author="antoine" created="Tue, 24 May 2011 06:58:33 +0000"  >&lt;p&gt;The fact that these errors appear after running the app for some time, and then dont go away, point to a mem leak.&lt;br/&gt;
Make sure that you dont use any global js variable that may grow over time, or set a variable with a random name.&lt;br/&gt;
If not the mem leak may be in our wrapper or SM itself.&lt;/p&gt;

&lt;p&gt;following test of &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-3012&quot; title=&quot;JS &amp;quot;out of memory&amp;quot; should recover more gracefully&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-3012&quot;&gt;&lt;del&gt;SERVER-3012&lt;/del&gt;&lt;/a&gt;, I increased the SM mem limit to 64MB in trunk.&lt;br/&gt;
This should buy you 8x the time before the error occurs.&lt;br/&gt;
If you want to extend further then you can increase it in src code and recompile.&lt;/p&gt;

&lt;p&gt;In engine_spidermonkey.cpp look for:&lt;br/&gt;
            _runtime = JS_NewRuntime(64L * 1024L * 1024L);&lt;/p&gt;
</comment>
                            <comment id="34056" author="csirac2" created="Tue, 24 May 2011 03:59:27 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-3012&quot; title=&quot;JS &amp;quot;out of memory&amp;quot; should recover more gracefully&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-3012&quot;&gt;&lt;del&gt;SERVER-3012&lt;/del&gt;&lt;/a&gt; at least has a reproducible test case. Perhaps fixing that bug will make this one disappear too... wishful thinking?&lt;/p&gt;</comment>
                            <comment id="33885" author="csirac2" created="Mon, 23 May 2011 07:36:58 +0000"  >&lt;p&gt;I should clarify that we have three replica members, each are their own separate VMs (4GB RAM). They are in the same DC.&lt;/p&gt;

&lt;p&gt;Also the 022b log although 270KiB, is only 40 seconds of time elapsed, not &quot;several minutes&quot; as I said in the initial description. -vvvvv is extreme logging!&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                            <attachment id="11887" name="seta.log.022b" size="274995" author="csirac2" created="Mon, 23 May 2011 07:32:12 +0000"/>
                            <attachment id="11886" name="seta.log.022c" size="15457" author="csirac2" created="Mon, 23 May 2011 07:32:12 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>8.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Tue, 24 May 2011 06:58:33 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        12 years, 32 weeks, 4 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>
                            12 years, 32 weeks, 4 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="10020"><![CDATA[Linux]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>antoine</customfieldvalue>
            <customfieldvalue>jason.coombs@yougov.com</customfieldvalue>
            <customfieldvalue>csirac2</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrozcv:</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>21168</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|ht0f9z:</customfieldvalue>

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