<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:23:07 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-50612] ScopedTaskExecutor violates the TaskExecutor contract</title>
                <link>https://jira.mongodb.org/browse/SERVER-50612</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Implementations of &lt;a href=&quot;https://github.com/mongodb/mongo/blob/3012da79e0b640bf2429f2b83a59ef1ba60271cc/src/mongo/executor/task_executor.h#L218-L233&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;TaskExecutor::scheduleWork are required&lt;/a&gt; not to move-from their provided &apos;work&apos; CallbackFn when returning a non-ok status.  This requirement is relied on in &lt;a href=&quot;https://github.com/mongodb/mongo/blob/de36e2cbc7e7f38a4d2b1d017666277478ba1c7b/src/mongo/executor/task_executor.cpp#L43-L48&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;TaskExecutor::schedule to call the callback&lt;/a&gt; with the non-ok status returned from scheduleWork.&lt;/p&gt;

&lt;p&gt;ScopedTaskExecutor is violating this contract and moving-from the provided work callback even when returning a non-ok Status from scheduleWork.  We have evidence of this happening from build failures.  While not confirmed, the likely culprit is &lt;a href=&quot;https://github.com/mongodb/mongo/blob/96b779115f139a47fe9d6349f7ce0d54140ad25f/src/mongo/executor/scoped_task_executor.cpp#L253&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;this line&lt;/a&gt;.  We need to fix this or else risk triggering &lt;a href=&quot;https://github.com/mongodb/mongo/blob/de36e2cbc7e7f38a4d2b1d017666277478ba1c7b/src/mongo/executor/task_executor.cpp#L47&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;this invariant&lt;/a&gt; in production runs.&lt;/p&gt;</description>
                <environment></environment>
        <key id="1455882">SERVER-50612</key>
            <summary>ScopedTaskExecutor violates the TaskExecutor contract</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="1" iconUrl="https://jira.mongodb.org/images/icons/statuses/open.png" description="">Open</status>
                    <statusCategory id="2" key="new" colorName="default"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="backlog-server-servicearch">Backlog - Service Architecture</assignee>
                                    <reporter username="spencer@mongodb.com">Spencer Brody</reporter>
                        <labels>
                            <label>servicearch-wfbf-day</label>
                    </labels>
                <created>Fri, 28 Aug 2020 16:45:06 +0000</created>
                <updated>Fri, 14 Jul 2023 01:10:57 +0000</updated>
                                                                                                <votes>0</votes>
                                    <watches>5</watches>
                                                                                                                <comments>
                            <comment id="4262696" author="JIRAUSER1262719" created="Tue, 21 Dec 2021 21:32:49 +0000"  >&lt;p&gt;We haven&#8217;t heard back from you in at least 1 year, so I&apos;m going to close this ticket. If this is still an issue for you, please provide additional information and we will reopen the ticket.&lt;/p&gt;</comment>
                            <comment id="3403764" author="spencer" created="Mon, 21 Sep 2020 18:29:23 +0000"  >&lt;p&gt;So my previous comment about how to work around this isn&apos;t quite right.  Just ensuring that the ScopedTaskExecutor is shut down before the parent isn&apos;t enough.  A concurrent race of calling schedule() against the ScopedTaskExecutor alongside shutting down the parent executor can trigger this, even if the ScopedTaskExecutor is always shut down before the parent executor.  You can get an interleaving where the call to schedule() against the STE runs before the STE is shut down, but the call to schedule() against the underlying parent executor doesn&apos;t happen until after the parent executor is shut down.  So to be resilient to this you have to ensure that no calls to schedule() against any outstanding STEs will happen anymore before you shut down the parent executor (something that may be harder to guarantee in practice).&lt;/p&gt;</comment>
                            <comment id="3364707" author="spencer" created="Fri, 28 Aug 2020 18:33:24 +0000"  >&lt;p&gt;Note to other readers: the way the bug in ScopedTaskExecutor is triggered is if the parent executor that ScopedTaskExecutor was created against is shut down before the scoped executor is.  You can avoid this bug by ensuring that all ScopedTaskExecutors get shutdown() before their parent executor.&lt;/p&gt;</comment>
                            <comment id="3364696" author="bruce.lucas@10gen.com" created="Fri, 28 Aug 2020 18:31:45 +0000"  >&lt;p&gt;OK, thanks.&lt;/p&gt;</comment>
                            <comment id="3364695" author="spencer" created="Fri, 28 Aug 2020 18:30:46 +0000"  >&lt;p&gt;The bug in ScopedTaskExecutor does technically exist in 4.4, but ScopedTaskExecutor is way less used in 4.4 and to my knowledge there are no uses that can trigger this bug.&lt;/p&gt;</comment>
                            <comment id="3364677" author="bruce.lucas@10gen.com" created="Fri, 28 Aug 2020 18:24:49 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=spencer&quot; class=&quot;user-hover&quot; rel=&quot;spencer&quot;&gt;spencer&lt;/a&gt;, is this issue present in 4.4 or only master? If the former it would be good if possible to leave a comment on this ticket mentioning the string that the invariant would produce, for searchability in case it does happen.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on by">
                                                        </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10520">
                    <name>Problem/Incident</name>
                                            <outwardlinks description="causes">
                                                        </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="1456080">SERVER-50619</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="2391593">SERVER-78971</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1482347">SERVER-51079</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1955379">SERVER-62220</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>6.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                <customfield id="customfield_12751" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Assigned Teams</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="25132"><![CDATA[Service Arch]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Fri, 28 Aug 2020 18:24:49 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        2 years, 7 weeks, 1 day 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_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>PM-2659</customfieldvalue>
                        </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>max.hirschhorn@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            2 years, 7 weeks, 1 day ago
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_16465" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Linked BF Score</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0.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>backlog-server-servicearch</customfieldvalue>
            <customfieldvalue>bruce.lucas@mongodb.com</customfieldvalue>
            <customfieldvalue>lauren.lewis@mongodb.com</customfieldvalue>
            <customfieldvalue>spencer@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hy2qev:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr565r:</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_10555" key="com.atlassian.jira.plugin.system.customfieldtypes:float">
                        <customfieldname>Story Points</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>5.0</customfieldvalue>
                        </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|hy2co7:</customfieldvalue>

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