<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:24:22 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-51055] ServiceContext getters/setters are racing</title>
                <link>https://jira.mongodb.org/browse/SERVER-51055</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;BF-18712 shows a TSAN true positive where setFastClockSource races with getFastClockSource due to latch_detail::Mutex::_onContendedLock&apos;s invocation of getFastClockSource before the setFastClockSource could occur.&lt;/p&gt;

&lt;p&gt;There is no synchronization on the unique_ptr fields of ServiceContext, so these problems are unavoidable. Rather than making new obscure rules about when it&apos;s ok to call the getters, we can rather easily add synchronization to these fields, as they are private members. They could be stored in a synchronized unique_ptr wrapper.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;Acceptance Criteria:&#160;&lt;/p&gt;

&lt;p&gt;ServiceContext will call terminate if a setter happens after a given property has been accessed. Create a patch build to reproduce this and identify all the use cases where this was happening to create tickets that require a fix.&#160;&lt;/p&gt;</description>
                <environment></environment>
        <key id="1480295">SERVER-51055</key>
            <summary>ServiceContext getters/setters are racing</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="billy.donahue@mongodb.com">Billy Donahue</reporter>
                        <labels>
                            <label>sa-remove-fv-backlog-22</label>
                    </labels>
                <created>Fri, 18 Sep 2020 18:35:38 +0000</created>
                <updated>Tue, 12 Dec 2023 21:28:16 +0000</updated>
                                                                            <component>Internal Code</component>
                                        <votes>0</votes>
                                    <watches>9</watches>
                                                                                                                <comments>
                            <comment id="3419256" author="billy.donahue" created="Wed, 30 Sep 2020 18:54:07 +0000"  >&lt;p&gt;Exploratory work to see if the setters can be forced to only occur once.&lt;/p&gt;

&lt;p&gt;(not really for review) &lt;a href=&quot;https://mongodbcr.appspot.com/676640003/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://mongodbcr.appspot.com/676640003/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Patch queue: &lt;a href=&quot;https://spruce.mongodb.com/version/5f74d32f2a60ed66c518e2cf/tasks&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://spruce.mongodb.com/version/5f74d32f2a60ed66c518e2cf/tasks&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Already had to make a carve-out for &lt;tt&gt;setServiceEntryPoint&lt;/tt&gt;, which is set twice by &lt;tt&gt;mongod_main.cpp&lt;/tt&gt;, but I don&apos;t know why we do that yet.&lt;/p&gt;

&lt;p&gt;Lots of tests in the patch queue are triggering an invariant that &lt;tt&gt;set()&lt;/tt&gt; should be called only once. The tests are calling setters for &lt;tt&gt;setOpObserver&lt;/tt&gt;, &lt;tt&gt;setTransportLayer&lt;/tt&gt;, &lt;tt&gt;setTickSource&lt;/tt&gt;, etc... multiple times. Would be some work to fix all of it.&lt;/p&gt;</comment>
                            <comment id="3414879" author="billy.donahue" created="Mon, 28 Sep 2020 19:45:33 +0000"  >&lt;p&gt;The atomicity of setters and getters added by commit &lt;a href=&quot;https://github.com/mongodb/mongo/commit/9ec023a45dff4f8b3b837bee2c99442f0eec5316&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;9ec023a45d&lt;/a&gt; is necessary but isn&apos;t enough to fix the ordering problem. We need further work to enforce invariants about ServiceContext setters occurring after getters.&lt;/p&gt;

&lt;p&gt;Reopening.&lt;/p&gt;</comment>
                            <comment id="3405965" author="billy.donahue" created="Tue, 22 Sep 2020 19:43:47 +0000"  >&lt;p&gt;Should have fixed TSAN failures.&lt;/p&gt;

&lt;p&gt;This is a band-aid. All that&apos;s been added is synchronized access to these unique_ptrs, so that at least the getters return a coherent value, but we still need higher-level semantics to ensure the validity of any getter-returned raw pointers. A subsequent setter can still immediately invalidate that pointer. Without shared_ptr or another kind of shared locking, we won&apos;t be able to do better than that. Frankly the getters might need to return reference-holding objects like shared_ptr&apos;s to do it right.&lt;/p&gt;</comment>
                            <comment id="3405815" author="xgen-internal-githook" created="Tue, 22 Sep 2020 18:42:28 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Billy Donahue&apos;, &apos;email&apos;: &apos;billy.donahue@mongodb.com&apos;, &apos;username&apos;: &apos;BillyDonahue&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-51055&quot; title=&quot;ServiceContext getters/setters are racing&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-51055&quot;&gt;SERVER-51055&lt;/a&gt; ServiceContext::SyncUnique to fix unique_ptr races.&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;The generic template synchronized_value cannot predict the&lt;br/&gt;
      acquisition level of its instantiations or instances. Take a&lt;br/&gt;
      policy parameter to allow mutex details to be customized.&lt;/li&gt;
	&lt;li&gt;simplify synchronized_value implementation&lt;/li&gt;
	&lt;li&gt;merge const_update_guard with update_guard as 1 nested class&lt;/li&gt;
	&lt;li&gt;ServiceContext SyncUnique must use a raw mutex policy to avoid&lt;br/&gt;
      recursion when Latch Diagnostics accesses ServiceContext&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/9ec023a45dff4f8b3b837bee2c99442f0eec5316&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/9ec023a45dff4f8b3b837bee2c99442f0eec5316&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</comment>
                            <comment id="3401493" author="billy.donahue" created="Fri, 18 Sep 2020 18:48:53 +0000"  >&lt;p&gt;CR&#160;&lt;a href=&quot;https://mongodbcr.appspot.com/673000001/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://mongodbcr.appspot.com/673000001/&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on by">
                                                        </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="2523092">SERVER-84118</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10020">
                    <name>Gantt Dependency</name>
                                                                <inwardlinks description="has to be done after">
                                        <issuelink>
            <issuekey id="1815892">SERVER-58450</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1815896">SERVER-58451</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1815898">SERVER-58452</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1815901">SERVER-58453</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1815903">SERVER-58454</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1815905">SERVER-58455</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1815913">SERVER-58456</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1815966">SERVER-58457</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1815967">SERVER-58458</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1815968">SERVER-58459</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1815972">SERVER-58461</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1815973">SERVER-58462</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10520">
                    <name>Problem/Incident</name>
                                            <outwardlinks description="causes">
                                        <issuelink>
            <issuekey id="1491486">SERVER-51165</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="1843500">SERVER-59157</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1811180">SERVER-58336</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>5.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9.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_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>Tue, 22 Sep 2020 18:42:28 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        3 years, 19 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_17050" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Downstream Team Attention</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="16941"><![CDATA[Not Needed]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    <customfield id="customfield_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>PM-3392</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>evelyn.wu@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            3 years, 19 weeks ago
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_16465" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Linked BF Score</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>5.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>billy.donahue@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hy6vbr:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hx0k0g:</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="4268">Service arch 2020-10-05</customfieldvalue>
    <customfieldvalue id="4269">Service arch 2020-10-19</customfieldvalue>
    <customfieldvalue id="4502">Service Arch 2021-03-08</customfieldvalue>
    <customfieldvalue id="4503">Service Arch 2021-03-22</customfieldvalue>
    <customfieldvalue id="4504">Service Arch 2021-04-05</customfieldvalue>
    <customfieldvalue id="4685">Service Arch 2021-04-19</customfieldvalue>
    <customfieldvalue id="4687">Service Arch 2021-05-17</customfieldvalue>
    <customfieldvalue id="5184">Service Arch 2021-07-12</customfieldvalue>
    <customfieldvalue id="5291">Service Arch 2021-08-09</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10750" key="com.atlassian.jira.plugin.system.customfieldtypes:textarea">
                        <customfieldname>Steps To Reproduce</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>&lt;p&gt;BF-18712&lt;/p&gt;</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10555" key="com.atlassian.jira.plugin.system.customfieldtypes:float">
                        <customfieldname>Story Points</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>4.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|hy6hl3:</customfieldvalue>

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