<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:05:15 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-24054] JS segmentation fault on load of certain nans</title>
                <link>https://jira.mongodb.org/browse/SERVER-24054</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Querying for a set of documents always produces a segfault on our system when including a specific document field that may or may not contain corrupted data. The fault is included in the logs.&lt;/p&gt;

&lt;p&gt;Executing a db.collection.find() with the field excluded as a projection does not produce this crash. &lt;/p&gt;
</description>
                <environment>Ubuntu 14.04.3 LTS</environment>
        <key id="284520">SERVER-24054</key>
            <summary>JS segmentation fault on load of certain nans</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="mira.carey@mongodb.com">Mira Carey</assignee>
                                    <reporter username="patrick.woo@gmail.com">Patrick Woo</reporter>
                        <labels>
                            <label>code-and-test</label>
                    </labels>
                <created>Wed, 4 May 2016 20:44:46 +0000</created>
                <updated>Mon, 8 Jan 2024 15:22:54 +0000</updated>
                            <resolved>Tue, 10 May 2016 17:06:21 +0000</resolved>
                                    <version>3.2.1</version>
                                    <fixVersion>3.2.7</fixVersion>
                    <fixVersion>3.3.6</fixVersion>
                                    <component>Querying</component>
                    <component>Shell</component>
                                        <votes>0</votes>
                                    <watches>10</watches>
                                                                                                                <comments>
                            <comment id="1267853" author="xgen-internal-githook" created="Wed, 18 May 2016 17:32:32 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;hanumantmk&apos;, u&apos;name&apos;: u&apos;Jason Carey&apos;, u&apos;email&apos;: u&apos;jcarey@argv.me&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-24054&quot; title=&quot;JS segmentation fault on load of certain nans&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-24054&quot;&gt;&lt;del&gt;SERVER-24054&lt;/del&gt;&lt;/a&gt; JS segfault on load of certain nans&lt;/p&gt;

&lt;p&gt;(cherry picked from commit 35443b806c8050416e76040e0604da8c9acd3c74)&lt;br/&gt;
Branch: v3.2&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/a91418624c39229ba16d24b3cf988d2f9b2d73f3&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/a91418624c39229ba16d24b3cf988d2f9b2d73f3&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1260882" author="xgen-internal-githook" created="Tue, 10 May 2016 16:11:40 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;hanumantmk&apos;, u&apos;name&apos;: u&apos;Jason Carey&apos;, u&apos;email&apos;: u&apos;jcarey@argv.me&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-24054&quot; title=&quot;JS segmentation fault on load of certain nans&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-24054&quot;&gt;&lt;del&gt;SERVER-24054&lt;/del&gt;&lt;/a&gt; JS segfault on load of certain nans&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/35443b806c8050416e76040e0604da8c9acd3c74&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/35443b806c8050416e76040e0604da8c9acd3c74&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1257762" author="patrick.woo@gmail.com" created="Fri, 6 May 2016 15:59:35 +0000"  >&lt;p&gt;Thanks for all the help &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.mongodb.org/images/icons/emoticons/smile.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;.&lt;/p&gt;

&lt;p&gt;Regards,&lt;br/&gt;
Patrick&lt;/p&gt;</comment>
                            <comment id="1257742" author="jason.carey" created="Fri, 6 May 2016 15:48:58 +0000"  >&lt;p&gt;Patrick,&lt;/p&gt;

&lt;p&gt;We take any crash seriously.  I just wanted to confirm with you that your use case wouldn&apos;t be hurt if we just convert nan&apos;s from bson into the javascript nan.  This has the slight downside that documents with novel nan&apos;s won&apos;t round trip if the nan fields are loaded into js.&lt;/p&gt;

&lt;p&gt;Glad to hear you have a workaround in the meanwhile,&lt;br/&gt;
Jason&lt;/p&gt;</comment>
                            <comment id="1257732" author="patrick.woo@gmail.com" created="Fri, 6 May 2016 15:42:45 +0000"  >&lt;p&gt;Hi Jason,&lt;/p&gt;

&lt;p&gt;We have zero need for this. The only expectation was that the shell would not crash under this circumstance and allow us to write over this value with &quot;valid&quot; numerical data.&lt;/p&gt;

&lt;p&gt;It does appear as if the legacy php mongo plugin allows us to do just that, so it is no longer a pressing issue on our end.&lt;/p&gt;

&lt;p&gt;Thanks,&lt;br/&gt;
Patrick&lt;/p&gt;</comment>
                            <comment id="1257725" author="jason.carey" created="Fri, 6 May 2016 15:38:05 +0000"  >&lt;p&gt;Patrick,&lt;/p&gt;

&lt;p&gt;After a little looking, it appears that the value the shell is crashing on is a negative nan (specifically -nan(0xffffffffe7961)).  The shell is crashing because SpiderMonkey makes aggressive use of the nan space in iee754 doubles to store things other than nans, which is reasonable because javascript only has 1 kind of nan.&lt;/p&gt;

&lt;p&gt;Do you have a need for roundtrip-ability of different kinds of nan&apos;s through the shell?&lt;/p&gt;

&lt;p&gt;Regards,&lt;br/&gt;
Jason&lt;/p&gt;</comment>
                            <comment id="1257139" author="patrick.woo@gmail.com" created="Thu, 5 May 2016 22:15:00 +0000"  >&lt;p&gt;Hi Jason,&lt;/p&gt;

&lt;p&gt;I&apos;ve attached the first activity the shell crashes on.&lt;/p&gt;

&lt;p&gt;Patrick&lt;/p&gt;</comment>
                            <comment id="1257109" author="jason.carey" created="Thu, 5 May 2016 21:52:21 +0000"  >&lt;p&gt;Patrick,&lt;/p&gt;

&lt;p&gt;I can see a couple of avenue&apos;s by which corrupt bson might be able to crash the shell, but in order to be sure, would it be possible for you to provide a binary dump of the documents in question?  If you can project the non-corrupt part of the document that&apos;s crashing the shell, and if that part includes the id, you might do so using mongodump as follows:&lt;/p&gt;

&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;mongodump -d DATABASE -c COLLECTION -q &apos;{_id: ID}&apos;  &lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;

&lt;p&gt;where the various all caps values are respectively the database, collection and id of the document that&apos;s causing you problems.&lt;/p&gt;

&lt;p&gt;If you could attach the dump that produces, that would be enough to see exactly the kind of document corruption you&apos;re seeing.&lt;/p&gt;

&lt;p&gt;Regards,&lt;br/&gt;
Jason&lt;/p&gt;</comment>
                            <comment id="1255596" author="patrick.woo@gmail.com" created="Wed, 4 May 2016 23:45:42 +0000"  >&lt;p&gt;I&apos;ve also written a short script to identify which documents trigger the segfault. It looks something like this:&lt;/p&gt;

&lt;p&gt;db.collection.find().forEach(function(document) &lt;/p&gt;
{
        print(document.id);
        document.field;
}
&lt;p&gt;);&lt;/p&gt;

&lt;p&gt;The mere act of accessing document.field is enough to trigger the segfault. Removing the line will complete the loop without issues.&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                            <attachment id="120715" name="activities.bson" size="1358" author="patrick.woo@gmail.com" created="Thu, 5 May 2016 22:13:30 +0000"/>
                            <attachment id="120716" name="activities.metadata.json" size="511" author="patrick.woo@gmail.com" created="Thu, 5 May 2016 22:13:30 +0000"/>
                            <attachment id="120494" name="log.txt" size="13882" author="patrick.woo@gmail.com" created="Wed, 4 May 2016 20:44:46 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_12451" key="com.atlassian.jira.plugin.system.customfieldtypes:multiversion">
                        <customfieldname>Backport Completed</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="16890">3.2.7</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>Thu, 5 May 2016 12:03:33 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        7 years, 39 weeks 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>luke.bonanomi@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            7 years, 39 weeks ago
                        </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>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>mira.carey@mongodb.com</customfieldvalue>
            <customfieldvalue>patrick.woo@gmail.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrk8jr:</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</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_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="1055">Platforms 14 (05/13/16)</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|hrjblj:</customfieldvalue>

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