<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:00:49 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-2662] seg fault equivalent when query plan cannot recover from yield, does not assert, and is yielded again</title>
                <link>https://jira.mongodb.org/browse/SERVER-2662</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Thread 7 Crashed:&lt;br/&gt;
0   libSystem.B.dylib                   0x00007fff86fcfc75 __abort + 113&lt;br/&gt;
1   libSystem.B.dylib                   0x00007fff86fcfcd9 abort_report_np + 0&lt;br/&gt;
2   libSystem.B.dylib                   0x00007fff86fbcc90 __pthread_markcancel + 0&lt;br/&gt;
3   mongod                              0x000000010008410c boost::shared_ptr&amp;lt;mongo::Cursor&amp;gt;::operator-&amp;gt;() const + 64 (shared_ptr.hpp:419)&lt;br/&gt;
4   mongod                              0x0000000100091098 mongo::ClientCursor::ClientCursor(int, boost::shared_ptr&amp;lt;mongo::Cursor&amp;gt; const&amp;amp;, std::string const&amp;amp;, mongo::BSONObj) + 860 (clientcursor.cpp:260)&lt;br/&gt;
5   mongod                              0x00000001001a7feb mongo::UserQueryOp::prepareToYield() + 211 (query.cpp:694)&lt;br/&gt;
6   mongod                              0x00000001000ba12a mongo::QueryPlanSet::Runner::prepareToYield(mongo::QueryOp&amp;amp;) + 76 (queryoptimizer.cpp:659)&lt;br/&gt;
7   mongod                              0x00000001000bb703 mongo::QueryPlanSet::Runner::mayYield(std::vector&amp;lt;boost::shared_ptr&amp;lt;mongo::QueryOp&amp;gt;, std::allocator&amp;lt;boost::shared_ptr&amp;lt;mongo::QueryOp&amp;gt; &amp;gt; &amp;gt; const&amp;amp;) + 125 (queryoptimizer.cpp:544)&lt;br/&gt;
8   mongod                              0x00000001000be23a mongo::QueryPlanSet::Runner::run() + 1172 (queryoptimizer.cpp:600)&lt;br/&gt;
9   mongod                              0x00000001000c09ef mongo::QueryPlanSet::runOp(mongo::QueryOp&amp;amp;) + 591 (queryoptimizer.cpp:494)&lt;br/&gt;
10  mongod                              0x00000001000c0d57 mongo::MultiPlanScanner::runOpOnce(mongo::QueryOp&amp;amp;) + 157 (queryoptimizer.cpp:715)&lt;br/&gt;
11  mongod                              0x0000000100247f6c mongo::MultiPlanScanner::runOp(mongo::QueryOp&amp;amp;) + 38 (queryoptimizer.cpp:732)&lt;br/&gt;
12  mongod                              0x00000001001a975a boost::shared_ptr&amp;lt;mongo::UserQueryOp&amp;gt; mongo::MultiPlanScanner::runOp&amp;lt;mongo::UserQueryOp&amp;gt;(mongo::UserQueryOp&amp;amp;) + 42 (queryoptimizer.h:290)&lt;br/&gt;
13  mongod                              0x00000001001a015f mongo::runQuery(mongo::Message&amp;amp;, mongo::QueryMessage&amp;amp;, mongo::CurOp&amp;amp;, mongo::Message&amp;amp;) + 4906 (query.cpp:1126)&lt;br/&gt;
14  mongod                              0x0000000100235e1e mongo::receivedQuery(mongo::Client&amp;amp;, mongo::DbResponse&amp;amp;, mongo::Message&amp;amp;) + 189 (instance.cpp:176)&lt;br/&gt;
15  mongod                              0x0000000100237253 mongo::assembleResponse(mongo::Message&amp;amp;, mongo::DbResponse&amp;amp;, mongo::SockAddr const&amp;amp;) + 860 (instance.cpp:283)&lt;br/&gt;
16  mongod                              0x00000001002e9b8c mongo::connThread(mongo::MessagingPort*) + 724 (db.cpp:239)&lt;br/&gt;
17  mongod                              0x00000001002f2847 void boost::_bi::list1&amp;lt;boost::_bi::value&amp;lt;mongo::MessagingPort*&amp;gt; &amp;gt;::operator()&amp;lt;void &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.mongodb.org/images/icons/emoticons/star_yellow.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;(mongo::MessagingPort*), boost::_bi::list0&amp;gt;(boost::_bi::type&amp;lt;void&amp;gt;, void (&lt;b&gt;&amp;amp;)(mongo::MessagingPort&lt;/b&gt;), boost::_bi::list0&amp;amp;, int) + 59 (bind.hpp:253)&lt;br/&gt;
18  mongod                              0x000000010015836a boost::_bi::bind_t&amp;lt;void, void &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.mongodb.org/images/icons/emoticons/star_yellow.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;(mongo::MessagingPort*), boost::_bi::list1&amp;lt;boost::_bi::value&amp;lt;mongo::MessagingPort*&amp;gt; &amp;gt; &amp;gt;::operator()() + 54 (bind_template.hpp:20)&lt;br/&gt;
19  mongod                              0x0000000100158388 boost::detail::thread_data&amp;lt;boost::_bi::bind_t&amp;lt;void, void &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.mongodb.org/images/icons/emoticons/star_yellow.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;(mongo::MessagingPort*), boost::_bi::list1&amp;lt;boost::_bi::value&amp;lt;mongo::MessagingPort*&amp;gt; &amp;gt; &amp;gt; &amp;gt;::run() + 28 (thread.hpp:56)&lt;br/&gt;
20  libboost_thread-mt.dylib            0x0000000100f3e404 thread_proxy + 132&lt;br/&gt;
21  libSystem.B.dylib                   0x00007fff86f1a536 _pthread_start + 331&lt;br/&gt;
22  libSystem.B.dylib                   0x00007fff86f1a3e9 thread_start + 13&lt;/p&gt;

&lt;p&gt;        virtual bool prepareToYield() {&lt;br/&gt;
            if ( _findingStartCursor.get() ) &lt;/p&gt;
{
                return _findingStartCursor-&amp;gt;prepareToYield();
            }
&lt;p&gt;            else {&lt;br/&gt;
                if ( ! _cc ) &lt;/p&gt;
{
                    _cc.reset( new ClientCursor( QueryOption_NoCursorTimeout , _c , _pq.ns() ) );
                }
&lt;p&gt;                return _cc-&amp;gt;prepareToYield( _yieldData );&lt;br/&gt;
            }&lt;br/&gt;
        }&lt;/p&gt;


&lt;p&gt;        virtual void recoverFromYield() {&lt;br/&gt;
            _nYields++;&lt;/p&gt;

&lt;p&gt;            if ( _findingStartCursor.get() ) &lt;/p&gt;
{
                _findingStartCursor-&amp;gt;recoverFromYield();
            }
&lt;p&gt;            else if ( ! ClientCursor::recoverFromYield( _yieldData ) ) {&lt;br/&gt;
                _c.reset();&lt;br/&gt;
                _cc.reset();&lt;br/&gt;
                _so.reset();&lt;/p&gt;

&lt;p&gt;                if ( _capped ) &lt;/p&gt;
{
                    msgassertedNoTrace( 13338, str::stream() &amp;lt;&amp;lt; &quot;capped cursor overrun during query: &quot; &amp;lt;&amp;lt; _pq.ns() );
                }
&lt;p&gt;                else &lt;/p&gt;
{
                    // we don&apos;t fail query since we&apos;re fine with returning partial data if collection dropped

                    // todo: this is wrong.  the cursor could be gone if closeAllDatabases command just ran
                }

&lt;p&gt;            }&lt;br/&gt;
        }&lt;/p&gt;

&lt;p&gt;If we clear _c in recoverFromYield() and don&apos;t assert, the query optimizer may call prepareToYield() before next() and we will create a ClientCursor with a null _c causing a bad shared_ptr reference and assert/abort.&lt;/p&gt;</description>
                <environment></environment>
        <key id="14956">SERVER-2662</key>
            <summary>seg fault equivalent when query plan cannot recover from yield, does not assert, and is yielded again</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="aaron">Aaron Staple</assignee>
                                    <reporter username="aaron">Aaron Staple</reporter>
                        <labels>
                    </labels>
                <created>Wed, 2 Mar 2011 02:00:28 +0000</created>
                <updated>Tue, 12 Jul 2016 00:19:51 +0000</updated>
                            <resolved>Thu, 17 Mar 2011 18:54:48 +0000</resolved>
                                                    <fixVersion>1.8.1</fixVersion>
                    <fixVersion>1.9.0</fixVersion>
                                    <component>Concurrency</component>
                                        <votes>0</votes>
                                    <watches>0</watches>
                                                                                                                <comments>
                            <comment id="26294" author="auto" created="Sat, 19 Mar 2011 02:05:04 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;login&apos;: u&apos;astaple&apos;, u&apos;name&apos;: u&apos;Aaron&apos;, u&apos;email&apos;: u&apos;aaron@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-2662&quot; title=&quot;seg fault equivalent when query plan cannot recover from yield, does not assert, and is yielded again&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-2662&quot;&gt;&lt;del&gt;SERVER-2662&lt;/del&gt;&lt;/a&gt; don&apos;t attempt to yield a query after an earlier yield fails and drops the cursor&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/15c6cce90ad277ecb10cc9f4f8a53f4061358259&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/15c6cce90ad277ecb10cc9f4f8a53f4061358259&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="26293" author="auto" created="Sat, 19 Mar 2011 02:05:03 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;login&apos;: u&apos;astaple&apos;, u&apos;name&apos;: u&apos;Aaron&apos;, u&apos;email&apos;: u&apos;aaron@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-2662&quot; title=&quot;seg fault equivalent when query plan cannot recover from yield, does not assert, and is yielded again&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-2662&quot;&gt;&lt;del&gt;SERVER-2662&lt;/del&gt;&lt;/a&gt; test&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/ab41f59e8f8d5bd9f40513cd1121f4365d3484c4&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/ab41f59e8f8d5bd9f40513cd1121f4365d3484c4&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="26134" author="auto" created="Thu, 17 Mar 2011 18:52:37 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;login&apos;: u&apos;astaple&apos;, u&apos;name&apos;: u&apos;Aaron&apos;, u&apos;email&apos;: u&apos;aaron@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-2662&quot; title=&quot;seg fault equivalent when query plan cannot recover from yield, does not assert, and is yielded again&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-2662&quot;&gt;&lt;del&gt;SERVER-2662&lt;/del&gt;&lt;/a&gt; don&apos;t attempt to yield a query after an earlier yield fails and drops the cursor&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/d3a9fe9ae236b7b3013533453c0b33fd94051bb6&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/d3a9fe9ae236b7b3013533453c0b33fd94051bb6&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="25443" author="auto" created="Mon, 7 Mar 2011 19:13:10 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;login&apos;: u&apos;astaple&apos;, u&apos;name&apos;: u&apos;Aaron&apos;, u&apos;email&apos;: u&apos;aaron@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-2662&quot; title=&quot;seg fault equivalent when query plan cannot recover from yield, does not assert, and is yielded again&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-2662&quot;&gt;&lt;del&gt;SERVER-2662&lt;/del&gt;&lt;/a&gt; test&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/93572fc05b83f3635abd1dc2d55aa810a46b8a83&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/93572fc05b83f3635abd1dc2d55aa810a46b8a83&lt;/a&gt;&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, 7 Mar 2011 19:13:10 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        12 years, 48 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>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, 48 weeks, 5 days 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>aaron</customfieldvalue>
            <customfieldvalue>auto</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrp4sv:</customfieldvalue>

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

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

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