<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:20:19 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-9405] Map/Reduce leads to Segmentation fault in 2.4.1</title>
                <link>https://jira.mongodb.org/browse/SERVER-9405</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description></description>
                <environment></environment>
        <key id="72363">SERVER-9405</key>
            <summary>Map/Reduce leads to Segmentation fault in 2.4.1</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="3">Duplicate</resolution>
                                        <assignee username="mathias@mongodb.com">Mathias Stearn</assignee>
                                    <reporter username="artech">Mezhenin Artem</reporter>
                        <labels>
                    </labels>
                <created>Fri, 19 Apr 2013 13:37:10 +0000</created>
                <updated>Wed, 10 Dec 2014 23:06:37 +0000</updated>
                            <resolved>Sun, 1 Sep 2013 22:23:35 +0000</resolved>
                                    <version>2.4.1</version>
                                                    <component>MapReduce</component>
                                        <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="317029" author="redbeard0531" created="Fri, 19 Apr 2013 14:59:38 +0000"  >&lt;p&gt;The segfault is due to mishandling objects that have BSON-derived objects as protoypes (which is how Object.create() works). If instead you just did var value = this.ec or var value = Object.extend({}, this.ec) it should work.&lt;/p&gt;

&lt;p&gt;The segfault was actually fixed yesterday as part of &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-9089&quot; title=&quot;&amp;#39;Cloning&amp;#39; a document in JavaScript can create an empty _bson field&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-9089&quot;&gt;&lt;del&gt;SERVER-9089&lt;/del&gt;&lt;/a&gt;. However, even with the fix, when converting from js objects back to BSON (mongodb&apos;s internal representation of objects) we intentionally ignore prototypes (ie all fields where hasOwnProperty() is false). The idea is to preserve only the data that is unique to that object. As such, using Object.create will yield the wrong results, even if it didn&apos;t segfault.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                            <outwardlinks description="duplicates">
                                        <issuelink>
            <issuekey id="69452">SERVER-9089</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Fri, 19 Apr 2013 14:59:38 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        10 years, 43 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>false</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, 43 weeks, 5 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>mathias@mongodb.com</customfieldvalue>
            <customfieldvalue>artech</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrmwg7:</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>50120</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;$ mongo&lt;br/&gt;
MongoDB shell version: 2.4.1&lt;br/&gt;
connecting to: test&lt;br/&gt;
&amp;gt; db.t.find()&lt;br/&gt;
{ &quot;_id&quot; : ObjectId(&quot;517129d195ae71f6cc3ccd34&quot;), &quot;b&quot; : &quot;firefox&quot;, &quot;ec&quot; : &lt;/p&gt;
{ &quot;1&quot; : 2, &quot;2&quot; : 3 }
&lt;p&gt; }&lt;br/&gt;
{ &quot;_id&quot; : ObjectId(&quot;517129d995ae71f6cc3ccd35&quot;), &quot;b&quot; : &quot;firefox2&quot;, &quot;ec&quot; : &lt;/p&gt;
{ &quot;2&quot; : 3 }
&lt;p&gt; }&lt;br/&gt;
{ &quot;_id&quot; : ObjectId(&quot;517129e095ae71f6cc3ccd36&quot;), &quot;b&quot; : &quot;firefox3&quot;, &quot;ec&quot; : { } }&lt;br/&gt;
&amp;gt; var r = function(key, values) &lt;/p&gt;
{
...                            return 1;
...                        }
&lt;p&gt;; &lt;br/&gt;
&amp;gt; map = function(){&lt;br/&gt;
... var value = Object.create(this.ec);&lt;br/&gt;
... value.b = {}; value.b&lt;span class=&quot;error&quot;&gt;&amp;#91;this.b&amp;#93;&lt;/span&gt; = 1;&lt;br/&gt;
... emit(&apos;123&apos;, value);&lt;br/&gt;
... }&lt;br/&gt;
function (){&lt;br/&gt;
var value = Object.create(this.ec);&lt;br/&gt;
value.b = {}; value.b&lt;span class=&quot;error&quot;&gt;&amp;#91;this.b&amp;#93;&lt;/span&gt; = 1;&lt;br/&gt;
emit(&apos;123&apos;, value);&lt;br/&gt;
}&lt;br/&gt;
&amp;gt; db.t.mapReduce(map, r, &lt;/p&gt;
{out: &apos;test&apos;}
&lt;p&gt;)&lt;br/&gt;
Fri Apr 19 17:34:16.475 DBClientCursor::init call() failed&lt;br/&gt;
Fri Apr 19 17:34:16.477 JavaScript execution failed: Error: error doing query: failed at src/mongo/shell/query.js:L78&lt;br/&gt;
Fri Apr 19 17:34:16.478 trying reconnect to 127.0.0.1:27017&lt;br/&gt;
Fri Apr 19 17:34:16.478 reconnect 127.0.0.1:27017 failed couldn&apos;t connect to server 127.0.0.1:27017&lt;/p&gt;


&lt;p&gt;=================&lt;/p&gt;


&lt;p&gt;$ sudo tail  -n 50 /var/log/mongodb/mongodb.log &lt;br/&gt;
Fri Apr 19 15:53:13.660 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn9&amp;#93;&lt;/span&gt; CMD: drop test.tmp.mr.t_4&lt;br/&gt;
Fri Apr 19 15:53:13.660 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn9&amp;#93;&lt;/span&gt; CMD: drop test.tmp.mr.t_4_inc&lt;br/&gt;
Fri Apr 19 15:53:13.660 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn9&amp;#93;&lt;/span&gt; CMD: drop test.tmp.mr.t_4&lt;br/&gt;
Fri Apr 19 15:53:13.661 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn9&amp;#93;&lt;/span&gt; CMD: drop test.tmp.mr.t_4_inc&lt;br/&gt;
Fri Apr 19 15:57:34.532 &lt;span class=&quot;error&quot;&gt;&amp;#91;initandlisten&amp;#93;&lt;/span&gt; connection accepted from 127.0.0.1:45999 #10 (9 connections now open)&lt;br/&gt;
Fri Apr 19 15:57:35.975 &lt;span class=&quot;error&quot;&gt;&amp;#91;initandlisten&amp;#93;&lt;/span&gt; connection accepted from 127.0.0.1:46005 #11 (10 connections now open)&lt;br/&gt;
Fri Apr 19 15:57:52.089 &lt;span class=&quot;error&quot;&gt;&amp;#91;initandlisten&amp;#93;&lt;/span&gt; connection accepted from 127.0.0.1:46072 #12 (11 connections now open)&lt;br/&gt;
Fri Apr 19 17:10:51.496 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn9&amp;#93;&lt;/span&gt; end connection 127.0.0.1:44763 (10 connections now open)&lt;br/&gt;
Fri Apr 19 17:10:55.846 &lt;span class=&quot;error&quot;&gt;&amp;#91;initandlisten&amp;#93;&lt;/span&gt; connection accepted from 127.0.0.1:38164 #13 (11 connections now open)&lt;br/&gt;
Fri Apr 19 17:29:54.017 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn13&amp;#93;&lt;/span&gt; end connection 127.0.0.1:38164 (10 connections now open)&lt;br/&gt;
Fri Apr 19 17:29:56.047 &lt;span class=&quot;error&quot;&gt;&amp;#91;initandlisten&amp;#93;&lt;/span&gt; connection accepted from 127.0.0.1:43164 #14 (11 connections now open)&lt;br/&gt;
Fri Apr 19 17:30:21.397 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn14&amp;#93;&lt;/span&gt; end connection 127.0.0.1:43164 (10 connections now open)&lt;br/&gt;
Fri Apr 19 17:30:22.412 &lt;span class=&quot;error&quot;&gt;&amp;#91;initandlisten&amp;#93;&lt;/span&gt; connection accepted from 127.0.0.1:43290 #15 (11 connections now open)&lt;br/&gt;
Fri Apr 19 17:33:41.091 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn15&amp;#93;&lt;/span&gt; CMD: drop test.tmp.mr.t_5&lt;br/&gt;
Fri Apr 19 17:33:41.092 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn15&amp;#93;&lt;/span&gt; CMD: drop test.tmp.mr.t_5_inc&lt;br/&gt;
Fri Apr 19 17:33:41.092 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn15&amp;#93;&lt;/span&gt; build index test.tmp.mr.t_5_inc &lt;/p&gt;
{ 0: 1 }
&lt;p&gt;Fri Apr 19 17:33:41.092 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn15&amp;#93;&lt;/span&gt; build index done.  scanned 0 total records. 0 secs&lt;br/&gt;
Fri Apr 19 17:33:41.092 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn15&amp;#93;&lt;/span&gt; build index test.tmp.mr.t_5 &lt;/p&gt;
{ _id: 1 }
&lt;p&gt;Fri Apr 19 17:33:41.093 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn15&amp;#93;&lt;/span&gt; build index done.  scanned 0 total records. 0 secs&lt;br/&gt;
cannot write property b to read-only object&lt;br/&gt;
Fri Apr 19 17:33:41.095 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn15&amp;#93;&lt;/span&gt; JavaScript execution failed: TypeError: Cannot set property &apos;firefox&apos; of undefined near &apos;b&lt;span class=&quot;error&quot;&gt;&amp;#91;this.b&amp;#93;&lt;/span&gt; = 1&apos;  (line 3)&lt;br/&gt;
Fri Apr 19 17:33:41.096 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn15&amp;#93;&lt;/span&gt; CMD: drop test.tmp.mr.t_5&lt;br/&gt;
Fri Apr 19 17:33:41.096 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn15&amp;#93;&lt;/span&gt; CMD: drop test.tmp.mr.t_5_inc&lt;br/&gt;
Fri Apr 19 17:33:41.097 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn15&amp;#93;&lt;/span&gt; mr failed, removing collection :: caused by :: 16722 JavaScript execution failed: TypeError: Cannot set property &apos;firefox&apos; of undefined near &apos;b&lt;span class=&quot;error&quot;&gt;&amp;#91;this.b&amp;#93;&lt;/span&gt; = 1&apos;  (line 3)&lt;br/&gt;
Fri Apr 19 17:33:41.097 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn15&amp;#93;&lt;/span&gt; CMD: drop test.tmp.mr.t_5&lt;br/&gt;
Fri Apr 19 17:33:41.097 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn15&amp;#93;&lt;/span&gt; CMD: drop test.tmp.mr.t_5_inc&lt;br/&gt;
Fri Apr 19 17:34:16.469 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn15&amp;#93;&lt;/span&gt; CMD: drop test.tmp.mr.t_6&lt;br/&gt;
Fri Apr 19 17:34:16.469 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn15&amp;#93;&lt;/span&gt; CMD: drop test.tmp.mr.t_6_inc&lt;br/&gt;
Fri Apr 19 17:34:16.469 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn15&amp;#93;&lt;/span&gt; build index test.tmp.mr.t_6_inc &lt;/p&gt;
{ 0: 1 }
&lt;p&gt;Fri Apr 19 17:34:16.470 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn15&amp;#93;&lt;/span&gt; build index done.  scanned 0 total records. 0 secs&lt;br/&gt;
Fri Apr 19 17:34:16.470 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn15&amp;#93;&lt;/span&gt; build index test.tmp.mr.t_6 &lt;/p&gt;
{ _id: 1 }
&lt;p&gt;Fri Apr 19 17:34:16.470 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn15&amp;#93;&lt;/span&gt; build index done.  scanned 0 total records. 0 secs&lt;br/&gt;
Fri Apr 19 17:34:16.470 Invalid access at address: 0x18 from thread: conn15&lt;/p&gt;

&lt;p&gt;Fri Apr 19 17:34:16.470 Got signal: 11 (Segmentation fault).&lt;/p&gt;

&lt;p&gt;Fri Apr 19 17:34:16.473 Backtrace:&lt;br/&gt;
0xdc7f71 0x6ce459 0x6ce9e2 0x7f19d9a9b030 0xd63ad0 0xd629fc 0xd63284 0xd6e135 0xd66b40 0xf1a3f2 0x3bfa4cc06362 &lt;br/&gt;
 /usr/bin/mongod(_ZN5mongo15printStackTraceERSo+0x21) &lt;span class=&quot;error&quot;&gt;&amp;#91;0xdc7f71&amp;#93;&lt;/span&gt;&lt;br/&gt;
 /usr/bin/mongod(_ZN5mongo10abruptQuitEi+0x399) &lt;span class=&quot;error&quot;&gt;&amp;#91;0x6ce459&amp;#93;&lt;/span&gt;&lt;br/&gt;
 /usr/bin/mongod(_ZN5mongo24abruptQuitWithAddrSignalEiP7siginfoPv+0x262) &lt;span class=&quot;error&quot;&gt;&amp;#91;0x6ce9e2&amp;#93;&lt;/span&gt;&lt;br/&gt;
 /lib/x86_64-linux-gnu/libpthread.so.0(+0xf030) &lt;span class=&quot;error&quot;&gt;&amp;#91;0x7f19d9a9b030&amp;#93;&lt;/span&gt;&lt;br/&gt;
 /usr/bin/mongod(_ZN5mongo7V8Scope9v8ToMongoEN2v86HandleINS1_6ObjectEEEi+0x160) &lt;span class=&quot;error&quot;&gt;&amp;#91;0xd63ad0&amp;#93;&lt;/span&gt;&lt;br/&gt;
 /usr/bin/mongod(_ZN5mongo7V8Scope15v8ToMongoObjectERNS_14BSONObjBuilderERKSsN2v86HandleINS5_5ValueEEEiPNS_7BSONObjE+0x2bc) &lt;span class=&quot;error&quot;&gt;&amp;#91;0xd629fc&amp;#93;&lt;/span&gt;&lt;br/&gt;
 /usr/bin/mongod(_ZN5mongo7V8Scope16v8ToMongoElementERNS_14BSONObjBuilderERKSsN2v86HandleINS5_5ValueEEEiPNS_7BSONObjE+0x624) &lt;span class=&quot;error&quot;&gt;&amp;#91;0xd63284&amp;#93;&lt;/span&gt;&lt;br/&gt;
 /usr/bin/mongod(_ZN5mongo7V8Scope14nativeCallbackEPS0_RKN2v89ArgumentsE+0x245) &lt;span class=&quot;error&quot;&gt;&amp;#91;0xd6e135&amp;#93;&lt;/span&gt;&lt;br/&gt;
 /usr/bin/mongod(_ZN5mongo7V8Scope10v8CallbackERKN2v89ArgumentsE+0xb0) &lt;span class=&quot;error&quot;&gt;&amp;#91;0xd66b40&amp;#93;&lt;/span&gt;&lt;br/&gt;
 /usr/bin/mongod() &lt;span class=&quot;error&quot;&gt;&amp;#91;0xf1a3f2&amp;#93;&lt;/span&gt;&lt;br/&gt;
 &lt;span class=&quot;error&quot;&gt;&amp;#91;0x3bfa4cc06362&amp;#93;&lt;/span&gt;&lt;/p&gt;</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|ht00xj:</customfieldvalue>

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