<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:04:42 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-43997] allow the crtDebugCallback to be called from within the log system</title>
                <link>https://jira.mongodb.org/browse/SERVER-43997</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Currently if a error handling callback occurs during logging, and the callback tries to log, the process will deadlock. I know this can happen in the crtDebugCallback callback, and I worry that it&apos;s possible that it would occur in stack tracing or similar. &lt;/p&gt;

&lt;p&gt;We should investigate the use recursive locks in our logv2 locking front ends or back ends.&lt;/p&gt;

&lt;p&gt;Alternatively we could think about an how to create and utilize an alternative lockless logging API for use in such callbacks.&lt;/p&gt;</description>
                <environment></environment>
        <key id="969207">SERVER-43997</key>
            <summary>allow the crtDebugCallback to be called from within the log system</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</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="2">Won&apos;t Fix</resolution>
                                        <assignee username="henrik.edin@mongodb.com">Henrik Edin</assignee>
                                    <reporter username="gabriel.russell@mongodb.com">Gabriel Russell</reporter>
                        <labels>
                    </labels>
                <created>Mon, 14 Oct 2019 19:17:51 +0000</created>
                <updated>Fri, 20 Mar 2020 17:29:38 +0000</updated>
                            <resolved>Fri, 20 Mar 2020 17:29:38 +0000</resolved>
                                                                    <component>Logging</component>
                                        <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="2989471" author="henrik.edin" created="Fri, 20 Mar 2020 17:28:37 +0000"  >&lt;p&gt;Ok. Closing this as &quot;Won&apos;t Fix&quot;. If this proves to still be an issue even after &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-43998&quot; title=&quot;ProgramOutputMultiplexer::appendLine should write to the logger&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-43998&quot;&gt;&lt;del&gt;SERVER-43998&lt;/del&gt;&lt;/a&gt; then we can re-open and implement some guard against this.&lt;/p&gt;</comment>
                            <comment id="2989451" author="schwerin" created="Fri, 20 Mar 2020 17:23:51 +0000"  >&lt;p&gt;Supposing that the mutex in question is only guarding access to the log file, and not some machinery involved in the generation of the log entry itself, I think it makes sense to either close this &quot;Won&apos;t Fix&quot; or minimally change the system so that you can&apos;t log from within the logging system.&lt;/p&gt;

&lt;p&gt;I could imagine a per-thread flag that is set before entering the logging critical section, and just ignoring all attempts to log when that flag is set.&lt;/p&gt;</comment>
                            <comment id="2988881" author="henrik.edin" created="Fri, 20 Mar 2020 13:27:49 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-42823&quot; title=&quot;Output between print() function and ProgramOutputMultiplexer::appendLine() can be interleaved, leading to a deadlock on Windows DEBUG&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-42823&quot;&gt;&lt;del&gt;SERVER-42823&lt;/del&gt;&lt;/a&gt; Mentions that the CRT debug callback was fired when the standard out stream got corrupted because multiple threads were writing to it concurrently. That specific issue has been fixed in&#160;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-43998&quot; title=&quot;ProgramOutputMultiplexer::appendLine should write to the logger&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-43998&quot;&gt;&lt;del&gt;SERVER-43998&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;It is still not safe to log in the CRT debug callback if it is fired during a log system write to cout because it will cause a reentry and we&apos;re already holding the write lock. A solution would be to change to a recursive lock here: &lt;a href=&quot;https://github.com/mongodb/mongo/blob/d302a91c30b2648a2262e4ce737e767a3db8597d/src/mongo/logv2/composite_backend.h#L60&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/blob/d302a91c30b2648a2262e4ce737e767a3db8597d/src/mongo/logv2/composite_backend.h#L60&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Perhaps only on Windows DEBUG. But I don&apos;t like the idea of having different lock types on different builds.&lt;/p&gt;

&lt;p&gt;An other &quot;solution&quot; is to close this as won&apos;t fix as the CRT debug callback should hopefully not be fired from writing to cout anymore. I think it&apos;s helpful to keep the log in there if it is called for some other error/assert within the CRT.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on by">
                                        <issuelink>
            <issuekey id="895673">SERVER-42823</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>3.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Mon, 2 Dec 2019 02:32:48 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        3 years, 46 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_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>PM-1234</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>henrik.edin@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            3 years, 46 weeks, 5 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>schwerin@mongodb.com</customfieldvalue>
            <customfieldvalue>gabriel.russell@mongodb.com</customfieldvalue>
            <customfieldvalue>henrik.edin@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hvxfbj:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr65dz:</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="3740">Dev Tools 2020-03-23</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|hvx1kv:</customfieldvalue>

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