<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:04: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-43883] Enable WiredTiger cursor copy debug mode in asan builds</title>
                <link>https://jira.mongodb.org/browse/SERVER-43883</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;There is a class of bug that results in using unowned BSON or RecordData objects, which reference memory owned by something else, and accessing that memory after it has been freed or overwritten. This has the potential to lead to undefined behavior and in-memory data corruption.&lt;/p&gt;

&lt;p&gt;See &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-42744&quot; title=&quot;Fix transaction history iterator to not return unowned BSON that may be left dangling&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-42744&quot;&gt;&lt;del&gt;SERVER-42744&lt;/del&gt;&lt;/a&gt;, &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-43879&quot; title=&quot;OplogInterfaceLocal::next should return an owned BSON obj&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-43879&quot;&gt;&lt;del&gt;SERVER-43879&lt;/del&gt;&lt;/a&gt;, &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-43880&quot; title=&quot;renameCollection across DBs uses unowned RecordData after cursor has been yielded &quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-43880&quot;&gt;&lt;del&gt;SERVER-43880&lt;/del&gt;&lt;/a&gt;, and &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-43882&quot; title=&quot;Building indexes for startup recovery uses unowned RecordData after yielding its cursor&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-43882&quot;&gt;&lt;del&gt;SERVER-43882&lt;/del&gt;&lt;/a&gt; for recent examples.&lt;/p&gt;

&lt;p&gt;We should enable WT cursor copy debug mode with the configuration &quot;debug_mode=(cursor_copy=true)&quot; &lt;a href=&quot;https://github.com/mongodb/mongo/blob/a028f3c1888ecb35cd99435658f875b0963ed2f7/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp#L703&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;on the call to wiredtiger_open&lt;/a&gt;.&lt;/p&gt;

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

&lt;p&gt;&lt;em&gt;Old Description:&lt;/em&gt;&lt;br/&gt;
 We should create a build variant or suite that does the following:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Before freeing owned BSONObjs, overwrite the memory with garbage. This will blow up when an unowned BSONObjs is used after the owned object has been freed.&lt;/li&gt;
	&lt;li&gt;When returning data from a cursor, copy memory from WiredTiger into a managed buffer, and return that unowned buffer to the caller. When that cursor is invalidated in any way, from an advance, close, or reset, overwrite the buffer with garbage and free the memory immediately. This will blow up in cases where callers use data from cursors after repositioning or yielding. See an &lt;a href=&quot;https://evergreen.mongodb.com/filediff/5d9beab53627e0315ece0365/?file_name=src%2Fmongo%2Fdb%2Fstorage%2Fwiredtiger%2Fwiredtiger_record_store.cpp&amp;amp;patch_number=0&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;example implementation here&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
</description>
                <environment></environment>
        <key id="964605">SERVER-43883</key>
            <summary>Enable WiredTiger cursor copy debug mode in asan builds</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="13201">Fixed</resolution>
                                        <assignee username="daniel.gottlieb@mongodb.com">Daniel Gottlieb</assignee>
                                    <reporter username="louis.williams@mongodb.com">Louis Williams</reporter>
                        <labels>
                    </labels>
                <created>Tue, 8 Oct 2019 15:34:45 +0000</created>
                <updated>Sun, 29 Oct 2023 22:16:20 +0000</updated>
                            <resolved>Mon, 6 Apr 2020 14:47:46 +0000</resolved>
                                                    <fixVersion>4.4.0-rc1</fixVersion>
                    <fixVersion>4.7.0</fixVersion>
                                    <component>Internal Code</component>
                                        <votes>1</votes>
                                    <watches>7</watches>
                                                                                                                <comments>
                            <comment id="3034475" author="xgen-internal-githook" created="Fri, 10 Apr 2020 02:23:48 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Daniel Gottlieb&apos;, &apos;email&apos;: &apos;daniel.gottlieb@mongodb.com&apos;, &apos;username&apos;: &apos;dgottlieb&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-43883&quot; title=&quot;Enable WiredTiger cursor copy debug mode in asan builds&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-43883&quot;&gt;&lt;del&gt;SERVER-43883&lt;/del&gt;&lt;/a&gt;: Enable WTs cursor copy mode for ASAN builds.&lt;/p&gt;

&lt;p&gt;When a cursor changes its position, accessing the address of the&lt;br/&gt;
previous key and value is illegal, but often works by accident in production.&lt;/p&gt;

&lt;p&gt;Cursor copy mode will allocate memory for a cursor&apos;s keys and values when&lt;br/&gt;
positioned. When the cursor changes its position, that memory is freed. This&lt;br/&gt;
allows address sanitizer builds to catch bugs in MongoDBs use of WiredTiger.&lt;/p&gt;

&lt;p&gt;(cherry picked from commit a5f2ec58c2360effcfeb338804bfa31dc4b7cff6)&lt;br/&gt;
Branch: v4.4&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/e31417bd9aab2cc9dd06531ad37944433f9a73d6&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/e31417bd9aab2cc9dd06531ad37944433f9a73d6&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3027327" author="xgen-internal-githook" created="Mon, 6 Apr 2020 14:44:49 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Daniel Gottlieb&apos;, &apos;email&apos;: &apos;daniel.gottlieb@mongodb.com&apos;, &apos;username&apos;: &apos;dgottlieb&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-43883&quot; title=&quot;Enable WiredTiger cursor copy debug mode in asan builds&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-43883&quot;&gt;&lt;del&gt;SERVER-43883&lt;/del&gt;&lt;/a&gt;: Enable WTs cursor copy mode for ASAN builds.&lt;/p&gt;

&lt;p&gt;When a cursor changes its position, accessing the address of the&lt;br/&gt;
previous key and value is illegal, but often works by accident in production.&lt;/p&gt;

&lt;p&gt;Cursor copy mode will allocate memory for a cursor&apos;s keys and values when&lt;br/&gt;
positioned. When the cursor changes its position, that memory is freed. This&lt;br/&gt;
allows address sanitizer builds to catch bugs in MongoDBs use of WiredTiger.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/a5f2ec58c2360effcfeb338804bfa31dc4b7cff6&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/a5f2ec58c2360effcfeb338804bfa31dc4b7cff6&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3024755" author="milkie" created="Fri, 3 Apr 2020 12:10:30 +0000"  >&lt;p&gt;The dependent tickets are now resolved so I&apos;m moving this back to Open status.&lt;/p&gt;</comment>
                            <comment id="2876594" author="daniel.gottlieb@10gen.com" created="Thu, 13 Feb 2020 15:35:57 +0000"  >&lt;p&gt;Attempting to turn this on for ASAN builds found some bugs with the cursor copy code itself in some trickier scenarios. I&apos;m moving this ticket to blocked.&lt;/p&gt;</comment>
                            <comment id="2725316" author="louis.williams" created="Tue, 14 Jan 2020 20:52:42 +0000"  >&lt;p&gt;Since&#160;&lt;a href=&quot;https://jira.mongodb.org/browse/WT-5165&quot; title=&quot;Add cursor copy debug mode&quot; class=&quot;issue-link&quot; data-issue-key=&quot;WT-5165&quot;&gt;&lt;del&gt;WT-5165&lt;/del&gt;&lt;/a&gt; is now complete, I am repurposing this ticket to enable cursor copy debug mode in WiredTiger, which will accomplish the goals I described.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10420">
                    <name>Backports</name>
                                            <outwardlinks description="backported by">
                                                        </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                            <outwardlinks description="depends on">
                                        <issuelink>
            <issuekey id="1144836">WT-5574</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1146205">WT-5588</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="964926">WT-5165</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                                        </inwardlinks>
                                    </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>2.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_12450" key="com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes">
                        <customfieldname>Backport Requested</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="18953"><![CDATA[v4.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_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Tue, 8 Oct 2019 16:22:55 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        3 years, 43 weeks, 6 days ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[<s><a href='https://jira.mongodb.org/browse/WT-5588'>WT-5588</a></s>, <s><a href='https://jira.mongodb.org/browse/WT-5574'>WT-5574</a></s>]]></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_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>
                            3 years, 43 weeks, 6 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>daniel.gottlieb@mongodb.com</customfieldvalue>
            <customfieldvalue>milkie@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>louis.williams@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hvwndr:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr5min:</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="3630">Execution Team 2020-02-24</customfieldvalue>
    <customfieldvalue id="3634">Execution Team 2020-04-20</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|hvw9n3:</customfieldvalue>

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