<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 02:53:56 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-388] invalid ensureIndex crashes mongod server</title>
                <link>https://jira.mongodb.org/browse/SERVER-388</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;The mongod server crashes when the c++ client sends a bad ensureIndex().  Here&apos;s the code (&lt;a href=&quot;http://pastebin.com/d744f024&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://pastebin.com/d744f024&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;void statstore_mongo::init(vector&amp;lt;string&amp;gt;&amp;amp; options) {&lt;br/&gt;
  dbconn_.reset(new DBClientConnection());&lt;br/&gt;
  try &lt;/p&gt;
{
    string host = options.size() &amp;gt; 1 ? options[1] : &quot;localhost&quot;;
    dbconn_-&amp;gt;connect(host);
    BSONObjBuilder b;
    b.append(&quot;stat_id&quot;, 1);
    b.append(&quot;word&quot;, 1);
    BSONObj obj = b.obj();
    dbconn_-&amp;gt;ensureIndex(&quot;retweet&quot;, obj);
    // This crashes the server on the second ensureIndex().
    dbconn_-&amp;gt;ensureIndex(&quot;hashtags&quot;, obj);
    dbconn_-&amp;gt;ensureIndex(&quot;location&quot;, obj);
    dbconn_-&amp;gt;ensureIndex(&quot;keywords&quot;, obj);
  }
&lt;p&gt;  catch (const UserException&amp;amp; e) &lt;/p&gt;
{
    string what(&quot;Unable to open mongo database connection: &quot;);
    what.append(e.what());
    throw runtime_error(what);
  }
&lt;p&gt;}&lt;/p&gt;

&lt;p&gt;And here&apos;s a partial log:&lt;/p&gt;

&lt;p&gt;Mon Oct 26 21:27:54 git version: 73ed0277ffabb283f315b1da18a90c9c889b4924&lt;br/&gt;
Mon Oct 26 21:27:54 sys info: Linux dev3.node01.nowpublic.com 2.6.18-92.1.18.el5.028stab060.2 #1 SMP Tue Jan 13 11:38:36 MSK 2009 x86_64&lt;br/&gt;
Mon Oct 26 21:27:54 waiting for connections on port 27017&lt;br/&gt;
Mon Oct 26 21:28:24 connection accepted from 67.220.204.51:42115 #1&lt;br/&gt;
Mon Oct 26 21:28:24 building new index on &lt;/p&gt;
{ stat_id: 1, word: 1 }
&lt;p&gt; for retweet...&lt;br/&gt;
Mon Oct 26 21:28:24 Buildindex retweet idxNo:1 { ns: &quot;retweet&quot;, key: &lt;/p&gt;
{ stat_id: 1, word: 1 }
&lt;p&gt;, name: &quot;stat_id_1_word_1&quot; }&lt;br/&gt;
Mon Oct 26 21:28:24 done for 9 records 0secs&lt;br/&gt;
Mon Oct 26 21:28:24 end connection 67.220.204.51:42115&lt;br/&gt;
Mon Oct 26 21:30:57 connection accepted from 67.220.204.51:21982 #2&lt;br/&gt;
Mon Oct 26 21:30:57 allocating new datafile /usr/local/mongodb/bin/../data/hashtags.ns, filling with zeroes...&lt;br/&gt;
Mon Oct 26 21:30:57 done allocating datafile /usr/local/mongodb/bin/../data/hashtags.ns, size: 16MB, took 0.048 secs&lt;br/&gt;
Mon Oct 26 21:30:57 allocating new datafile /usr/local/mongodb/bin/../data/hashtags.0, filling with zeroes...&lt;br/&gt;
Mon Oct 26 21:30:57 done allocating datafile /usr/local/mongodb/bin/../data/hashtags.0, size: 64MB, took 0.197 secs&lt;br/&gt;
Mon Oct 26 21:30:57  Got signal: 11 (Segmentation fault).&lt;br/&gt;
Mon Oct 26 21:30:57  Backtrace:&lt;br/&gt;
0x58f539 0x2b6785d0f1b0 0x5540d6 0x54f438 0x550ec3 0x539cb0 0x53e226 0x590c36 0x5a7727 0x2b67853292f7 0x2b6785db0e3d&lt;br/&gt;
 ./mongod(_ZN5mongo10abruptQuitEi+0x399) &lt;span class=&quot;error&quot;&gt;&amp;#91;0x58f539&amp;#93;&lt;/span&gt;&lt;br/&gt;
 /lib64/libc.so.6 &lt;span class=&quot;error&quot;&gt;&amp;#91;0x2b6785d0f1b0&amp;#93;&lt;/span&gt;&lt;br/&gt;
 ./mongod &lt;span class=&quot;error&quot;&gt;&amp;#91;0x5540d6&amp;#93;&lt;/span&gt;&lt;br/&gt;
 ./mongod &lt;span class=&quot;error&quot;&gt;&amp;#91;0x54f438&amp;#93;&lt;/span&gt;&lt;br/&gt;
 ./mongod &lt;span class=&quot;error&quot;&gt;&amp;#91;0x550ec3&amp;#93;&lt;/span&gt;&lt;br/&gt;
 ./mongod &lt;span class=&quot;error&quot;&gt;&amp;#91;0x539cb0&amp;#93;&lt;/span&gt;&lt;br/&gt;
 ./mongod &lt;span class=&quot;error&quot;&gt;&amp;#91;0x53e226&amp;#93;&lt;/span&gt;&lt;br/&gt;
 ./mongod(_ZN5mongo10connThreadEv+0x1f6) &lt;span class=&quot;error&quot;&gt;&amp;#91;0x590c36&amp;#93;&lt;/span&gt;&lt;br/&gt;
 ./mongod &lt;span class=&quot;error&quot;&gt;&amp;#91;0x5a7727&amp;#93;&lt;/span&gt;&lt;br/&gt;
 /lib64/libpthread.so.0 &lt;span class=&quot;error&quot;&gt;&amp;#91;0x2b67853292f7&amp;#93;&lt;/span&gt;&lt;br/&gt;
 /lib64/libc.so.6(clone+0x6d) &lt;span class=&quot;error&quot;&gt;&amp;#91;0x2b6785db0e3d&amp;#93;&lt;/span&gt;&lt;br/&gt;
Mon Oct 26 21:30:57  dbexit:&lt;br/&gt;
Mon Oct 26 21:30:57      shutdown: going to flush oplog...&lt;br/&gt;
Mon Oct 26 21:30:57      shutdown: going to close sockets...&lt;br/&gt;
Mon Oct 26 21:30:57      shutdown: waiting for fs...&lt;br/&gt;
Mon Oct 26 21:30:57      shutdown: closing all files...&lt;br/&gt;
Mon Oct 26 21:30:57      closeAllFiles() finished&lt;br/&gt;
Mon Oct 26 21:30:57      shutdown: removing fs lock...&lt;br/&gt;
Mon Oct 26 21:30:57  dbexit: really exiting now&lt;br/&gt;
ERROR: Client::shutdown not called!&lt;/p&gt;</description>
                <environment>linux-x86_64-1.0.1, but it&amp;#39;s one we compiled ourself with boost 1_38 libs, and not the distro</environment>
        <key id="10803">SERVER-388</key>
            <summary>invalid ensureIndex crashes mongod server</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="douggreen">Doug Green</reporter>
                        <labels>
                    </labels>
                <created>Mon, 26 Oct 2009 17:31:17 +0000</created>
                <updated>Tue, 12 Jul 2016 00:29:41 +0000</updated>
                            <resolved>Mon, 26 Oct 2009 21:11:55 +0000</resolved>
                                                    <fixVersion>1.1.3</fixVersion>
                                                        <votes>0</votes>
                                    <watches>0</watches>
                                                                                                                <comments>
                            <comment id="11285" author="auto" created="Mon, 7 Dec 2009 11:13:29 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Eliot Horowitz&apos;, &apos;email&apos;: &apos;eliot@10gen.com&apos;}
&lt;p&gt;Message: fix invalid ensureIndex crashing server &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-388&quot; title=&quot;invalid ensureIndex crashes mongod server&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-388&quot;&gt;&lt;del&gt;SERVER-388&lt;/del&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Conflicts:&lt;/p&gt;

&lt;p&gt;	db/pdfile.cpp&lt;br/&gt;
	jstests/indexapi.js&lt;br/&gt;
&lt;a href=&quot;http://github.com/mongodb/mongo/commit/57a6542753bed4a78d6bece5cb44143732b3e45e&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://github.com/mongodb/mongo/commit/57a6542753bed4a78d6bece5cb44143732b3e45e&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="10998" author="douggreen" created="Tue, 27 Oct 2009 12:46:21 +0000"  >&lt;p&gt;Ahh, this crash was caused by my misunderstanding of databases and collection.  If I pass &quot;dbname.collectionname&quot; instead of just &quot;collectionname&quot; it doesn&apos;t seem to crash.  You probably need a check for people like me just passing a single name instead of the fully qualified collectionname.&lt;/p&gt;</comment>
                            <comment id="10995" author="douggreen" created="Tue, 27 Oct 2009 09:17:18 +0000"  >&lt;p&gt;On further review, I don&apos;t think it has anything to do with the multiple indexes, but it appears to be a problem creating any index using this code, the first time.&lt;/p&gt;</comment>
                            <comment id="10994" author="eliot" created="Mon, 26 Oct 2009 21:11:55 +0000"  >&lt;p&gt;fixed the crash.&lt;br/&gt;
the issue is that the call should be:&lt;br/&gt;
   dbconn_-&amp;gt;ensureIndex(&quot;mydb.hashtags&quot;, obj);&lt;/p&gt;

&lt;p&gt;so it actually was the first call crashing the server, not the 2nd.&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </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>Mon, 26 Oct 2009 21:11:55 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        14 years, 11 weeks, 2 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, 11 weeks, 2 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>auto</customfieldvalue>
            <customfieldvalue>douggreen</customfieldvalue>
            <customfieldvalue>eliot</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrpv1z:</customfieldvalue>

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

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

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