<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:20:43 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-29386] VoteRequestor and FreshnessChecker need safe destruction</title>
                <link>https://jira.mongodb.org/browse/SERVER-29386</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;The VoteRequester and FreshnessChecker can be destroyed with callbacks still pending on their ScatterGatherRunner.  Since the callbacks access the ScatterGatherRunner::Algorithm owned by the VoteRequestor/FreshnesssChecker, this can result in various bad behavior (crashes or memory corruption leading to just about anything).  The ScatterGatherRunner::Algorithm needs to live until all callbacks are complete.&lt;/p&gt;

&lt;p&gt;This would probably make sense to combine with &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-28389&quot; title=&quot;Pass CallbackCanceled error down to scatter-gather runner algorithm to process&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-28389&quot;&gt;&lt;del&gt;SERVER-28389&lt;/del&gt;&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
        <key id="387356">SERVER-29386</key>
            <summary>VoteRequestor and FreshnessChecker need safe destruction</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="13201">Fixed</resolution>
                                        <assignee username="siyuan.zhou@mongodb.com">Siyuan Zhou</assignee>
                                    <reporter username="matthew.russotto@mongodb.com">Matthew Russotto</reporter>
                        <labels>
                            <label>neweng</label>
                    </labels>
                <created>Fri, 26 May 2017 16:12:40 +0000</created>
                <updated>Mon, 30 Oct 2023 23:16:29 +0000</updated>
                            <resolved>Mon, 28 Aug 2017 22:59:34 +0000</resolved>
                                                    <fixVersion>3.5.13</fixVersion>
                                    <component>Replication</component>
                                        <votes>0</votes>
                                    <watches>7</watches>
                                                                                                                <comments>
                            <comment id="1659108" author="xgen-internal-githook" created="Mon, 28 Aug 2017 22:59:07 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;username&apos;: &apos;visualzhou&apos;, &apos;name&apos;: &apos;Siyuan Zhou&apos;, &apos;email&apos;: &apos;siyuan.zhou@mongodb.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-29386&quot; title=&quot;VoteRequestor and FreshnessChecker need safe destruction&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-29386&quot;&gt;&lt;del&gt;SERVER-29386&lt;/del&gt;&lt;/a&gt; VoteRequestor and FreshnessChecker need safe destruction&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/c246ae62641c3559c38830f6f5f4981e0acffa0c&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/c246ae62641c3559c38830f6f5f4981e0acffa0c&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1584284" author="schwerin" created="Wed, 31 May 2017 20:28:56 +0000"  >&lt;p&gt;I&apos;m not sure whether or not the implementation can own the algorithm object, or if it needs to share ownership with the user of the ScatterGatherRunner. This is probably a fine place to use a &lt;tt&gt;shared_ptr&amp;lt;Algorithm&amp;gt;&lt;/tt&gt;, if that&apos;s an easy approach to fixing the problem.&lt;/p&gt;</comment>
                            <comment id="1584132" author="matthew.russotto" created="Wed, 31 May 2017 18:15:09 +0000"  >&lt;p&gt;Ah, I missed that subtlety.   Yes, it is the algorithm (which is owned by the VoteRequestor or the FreshnessChecker) which is the issue.  The callbacks call the algorithm, which can be destroyed at any time.  In practice it&apos;s a little unlikely because the callbacks get canceled (and currently the canceled version does not reference the algorithm though &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-28389&quot; title=&quot;Pass CallbackCanceled error down to scatter-gather runner algorithm to process&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-28389&quot;&gt;&lt;del&gt;SERVER-28389&lt;/del&gt;&lt;/a&gt; woould change that).  However, there&apos;s still a window where a callback has already started before it gets canceled, and then the algorithm gets destroyed while that callback is still running.  Perhaps the implementation needs to own the algorithm, keeping it safe under the shared pointer.&lt;/p&gt;</comment>
                            <comment id="1583841" author="schwerin" created="Wed, 31 May 2017 15:14:12 +0000"  >&lt;p&gt;The ScatterGatherRunner callbacks aren&apos;t supposed to have references to any of its member variables. Instead, they have a shared pointer to the ScatterGatherRunnerImpl, whose lifetime thus lasts until the callbacks complete. At least, that&apos;s the design. Perhaps the problem is that owners of the ScatterGatherRunner believe it is safe to destroy the Algorithm object they own after the ScatterGatherRunner is destroyed? That&apos;s notably held by bare pointer, so I would believe that it is somehow responsible for this problem.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on by">
                                                        </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                                        </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="365863">SERVER-28389</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <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_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>3.0</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>Wed, 31 May 2017 15:14:12 +0000</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            6 years, 24 weeks, 2 days ago
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_16465" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Linked BF Score</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>15.0</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>schwerin@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>matthew.russotto@mongodb.com</customfieldvalue>
            <customfieldvalue>siyuan.zhou@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|ht82sv:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr9qnb:</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_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="1768">Repl 2017-07-31</customfieldvalue>
    <customfieldvalue id="1769">Repl 2017-08-21</customfieldvalue>
    <customfieldvalue id="1770">Repl 2017-09-11</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|ht7ovb:</customfieldvalue>

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