<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:18:06 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-28427] GlobalLock with timeout can still block indefinitely</title>
                <link>https://jira.mongodb.org/browse/SERVER-28427</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;There is a potential dead lock between the step down command and the noop writer. The step down command takes the &lt;a href=&quot;https://github.com/mongodb/mongo/blob/r3.4.2/src/mongo/db/repl/replication_coordinator_impl.cpp#L1776&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;global exclusive lock in S mode&lt;/a&gt; and then blocks on &lt;a href=&quot;https://github.com/mongodb/mongo/blob/r3.4.2/src/mongo/db/repl/replication_coordinator_impl.cpp#L2693&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;destroying the noop writer&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;The noop writer takes the &lt;a href=&quot;https://github.com/mongodb/mongo/blob/r3.4.2/src/mongo/db/repl/noop_writer.cpp#L142&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;global exclusive lock in IX mode&lt;/a&gt; when it does writes. The destructor calls &lt;a href=&quot;https://github.com/mongodb/mongo/blob/r3.4.2/src/mongo/db/repl/noop_writer.cpp#L73&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;join&lt;/a&gt; which won&apos;t return until the noop writer finishes its write.&lt;/p&gt;

&lt;p&gt;To fix this we can:&lt;br/&gt;
1. stop the noop writer&apos;s write in &lt;a href=&quot;https://github.com/mongodb/mongo/blob/r3.4.2/src/mongo/db/repl/replication_coordinator_impl.cpp#L1781&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;killAllUserOperations&lt;/a&gt; before we try to shut it down.&lt;br/&gt;
2. Stop the noop writer before we take the global lock and start it back up again if we fail to step down.&lt;br/&gt;
3. mark the operation context as killed in the noop writer destructor so that it stops trying to take the lock. &lt;/p&gt;</description>
                <environment></environment>
        <key id="367054">SERVER-28427</key>
            <summary>GlobalLock with timeout can still block indefinitely</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="2" iconUrl="https://jira.mongodb.org/images/icons/priorities/critical.svg">Critical - P2</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="geert.bosch@mongodb.com">Geert Bosch</assignee>
                                    <reporter username="judah.schvimer@mongodb.com">Judah Schvimer</reporter>
                        <labels>
                    </labels>
                <created>Wed, 22 Mar 2017 19:08:24 +0000</created>
                <updated>Mon, 27 Aug 2018 15:35:21 +0000</updated>
                            <resolved>Mon, 1 May 2017 18:59:40 +0000</resolved>
                                    <version>3.4.2</version>
                    <version>3.5.4</version>
                                    <fixVersion>3.4.5</fixVersion>
                    <fixVersion>3.5.7</fixVersion>
                                    <component>Storage</component>
                                        <votes>0</votes>
                                    <watches>13</watches>
                                                                                                                <comments>
                            <comment id="1566189" author="xgen-internal-githook" created="Sat, 6 May 2017 02:55:22 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;GeertBosch&apos;, u&apos;name&apos;: u&apos;Geert Bosch&apos;, u&apos;email&apos;: u&apos;geert@mongodb.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-28427&quot; title=&quot;GlobalLock with timeout can still block indefinitely&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-28427&quot;&gt;&lt;del&gt;SERVER-28427&lt;/del&gt;&lt;/a&gt; Implement timeouts for the TicketHolder&lt;/p&gt;

&lt;p&gt;(cherry picked from commit 498df9ab853bb03514b8803b9b1f6c2b6900b533)&lt;/p&gt;

&lt;p&gt;Conflicts:&lt;br/&gt;
	src/mongo/db/concurrency/SConscript&lt;br/&gt;
	src/mongo/db/concurrency/d_concurrency.cpp&lt;br/&gt;
	src/mongo/db/concurrency/d_concurrency.h&lt;br/&gt;
	src/mongo/db/concurrency/d_concurrency_test.cpp&lt;br/&gt;
	src/mongo/db/repl/replication_coordinator_impl.cpp&lt;br/&gt;
Branch: v3.4&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/aa8ab6611d27a6a4b014d82a37eb658760fa7425&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/aa8ab6611d27a6a4b014d82a37eb658760fa7425&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1561682" author="xgen-internal-githook" created="Mon, 1 May 2017 18:58:26 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;GeertBosch&apos;, u&apos;name&apos;: u&apos;Geert Bosch&apos;, u&apos;email&apos;: u&apos;geert@mongodb.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-28427&quot; title=&quot;GlobalLock with timeout can still block indefinitely&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-28427&quot;&gt;&lt;del&gt;SERVER-28427&lt;/del&gt;&lt;/a&gt; Implement timeouts for the TicketHolder&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/498df9ab853bb03514b8803b9b1f6c2b6900b533&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/498df9ab853bb03514b8803b9b1f6c2b6900b533&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1530714" author="schwerin" created="Wed, 22 Mar 2017 20:30:14 +0000"  >&lt;p&gt;I don&apos;t believe that the bug here is in the noop writer and stepdown. Rather, the problem is that the noop writer asks to wait up to 1ms to acquire the IX lock, but LockerImpl::lockGlobalBegin is not told that timeout, and its call to waitForTicket does not receive a timeout, either. The offending wait is &lt;a href=&quot;https://github.com/mongodb/mongo/blob/master/src/mongo/db/concurrency/lock_state.cpp#L317&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Prior to &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-22011&quot; title=&quot;Direct writes to the local database can cause deadlock involving the WiredTiger write throttle&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-22011&quot;&gt;&lt;del&gt;SERVER-22011&lt;/del&gt;&lt;/a&gt;, lockGlobalBegin could not block, and given how it is used in other scenarios, I&apos;m not sure it should be legal for it to block. It certainly shouldn&apos;t be legal for it to block indefinitely when the consumer has attempt to supply a timeout.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10420">
                    <name>Backports</name>
                                            <outwardlinks description="backported by">
                                                        </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                                        </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>3.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_12450" key="com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes">
                        <customfieldname>Backport Requested</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="14340"><![CDATA[v3.4]]></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_13552" key="com.go2group.jira.plugin.crm:crm_generic_field">
                        <customfieldname>Case</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[[500A000000b9ed9IAA, 500A000000b9fJoIAI, 500A000000b9fUNIAY, 500A000000bST1XIAW]]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Wed, 22 Mar 2017 20:30:14 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        6 years, 40 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_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            6 years, 40 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>schwerin@mongodb.com</customfieldvalue>
            <customfieldvalue>geert.bosch@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>judah.schvimer@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|ht4mo7:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hraudj:</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="1634">Storage 2017-04-17</customfieldvalue>
    <customfieldvalue id="1670">Storage 2017-05-08</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_11861" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>User Summary</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="11856"><![CDATA[Not Needed]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hri4qv:</customfieldvalue>

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