<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:53:39 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-39969] Fix dumping of SessionCatalog in hang analyzer</title>
                <link>https://jira.mongodb.org/browse/SERVER-39969</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;The changes from &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-38810&quot; title=&quot;Use the Client mutex or the SessionCatalog mutex for concurrency control of the TransactionParticipant&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-38810&quot;&gt;&lt;del&gt;SERVER-38810&lt;/del&gt;&lt;/a&gt; broke the &lt;tt&gt;mongod-dump-sessions&lt;/tt&gt; GDB command. We should disable this command from &lt;a href=&quot;https://github.com/mongodb/mongo/blob/b734df99416b073b5cdf7f2213e29ce1c9fb7a89/buildscripts/hang_analyzer.py#L383&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;running in the hang analyzer&lt;/a&gt; until we have a solution that is compatible with the new changes, or fix it if not too difficult.&lt;/p&gt;</description>
                <environment></environment>
        <key id="710195">SERVER-39969</key>
            <summary>Fix dumping of SessionCatalog in hang analyzer</summary>
                <type id="3" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14718&amp;avatarType=issuetype">Task</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="william.schultz@mongodb.com">William Schultz</assignee>
                                    <reporter username="william.schultz@mongodb.com">William Schultz</reporter>
                        <labels>
                    </labels>
                <created>Tue, 5 Mar 2019 19:50:52 +0000</created>
                <updated>Sun, 29 Oct 2023 22:23:16 +0000</updated>
                            <resolved>Tue, 9 Apr 2019 00:12:21 +0000</resolved>
                                                    <fixVersion>4.1.10</fixVersion>
                                    <component>Replication</component>
                                        <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="2206025" author="xgen-internal-githook" created="Tue, 9 Apr 2019 00:11:48 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;email&apos;: &apos;william.schultz@mongodb.com&apos;, &apos;name&apos;: &apos;William Schultz&apos;, &apos;username&apos;: &apos;will62794&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-39969&quot; title=&quot;Fix dumping of SessionCatalog in hang analyzer&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-39969&quot;&gt;&lt;del&gt;SERVER-39969&lt;/del&gt;&lt;/a&gt; Update the &apos;mongod-dump-sessions&apos; GDB command to be compatible with the new internal format of TransactionParticipant&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/a76bf86f90358af04ba1184afc5f011295afba04&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/a76bf86f90358af04ba1184afc5f011295afba04&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2206011" author="william.schultz" created="Mon, 8 Apr 2019 23:24:51 +0000"  >&lt;p&gt;I tried to dig into the segfault issue a bit more and was able to reproduce it and capture a stack trace. &lt;span class=&quot;nobr&quot;&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/attachment/213494/213494_gdb_session_dump_bt.txt&quot; title=&quot;gdb_session_dump_bt.txt attached to SERVER-39969&quot;&gt;gdb_session_dump_bt.txt&lt;sup&gt;&lt;img class=&quot;rendericon&quot; src=&quot;https://jira.mongodb.org/images/icons/link_attachment_7.gif&quot; height=&quot;7&quot; width=&quot;7&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/sup&gt;&lt;/a&gt;&lt;/span&gt;  is the GDB stacktrace. I searched around for some of the frames referenced in that stack trace and it appears that &lt;a href=&quot;https://sourceware.org/bugzilla/show_bug.cgi?id=20020&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;this bug report&lt;/a&gt; may be related. This is the command run on a RHEL 6.2 host that eventually segfaults when trying to attach to a hung mongod (running on the same machine) and dump the sessions:&lt;/p&gt;

&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;/opt/mongodbtoolchain/gdb/bin/gdb --quiet --nx -ex &quot;file mongod&quot; -ex &quot;attach $(pgrep -o mongod)&quot; -ex &quot;echo \nWriting raw stacks to debugger_mongod_XXXXX_raw_stacks.log.\n&quot;  -ex &quot;source /data/mci/buildscripts/gdb/mongo.py&quot; -ex &quot;source /data/mci/buildscripts/gdb/mongo_printers.py&quot; -ex &quot;source /data/mci/buildscripts/gdb/mongo_lock.py&quot; -ex &quot;set scheduler-locking on&quot;  -ex &quot;set pagination off&quot; -ex &quot;mongod-dump-session&quot; -ex &quot;set confirm off&quot; -ex &quot;quit&quot;&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;

&lt;p&gt;This &lt;a href=&quot;https://sourceware.org/bugzilla/show_bug.cgi?id=20020#c7&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;comment&lt;/a&gt; on the bug report referenced above claims that running &lt;tt&gt;&quot;set print static-members off&quot;&lt;/tt&gt; avoids the issue. This indeed appears to work for this case. That is, the following command does &lt;em&gt;not&lt;/em&gt; crash when dumping the sessions:&lt;/p&gt;


&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;/opt/mongodbtoolchain/gdb/bin/gdb --quiet --nx -ex &quot;file mongod&quot; -ex &quot;attach $(pgrep -o mongod)&quot; -ex &quot;echo \nWriting raw stacks to debugger_mongod_42054_raw_stacks.log.\n&quot;  -ex &quot;source /data/mci/buildscripts/gdb/mongo.py&quot; -ex &quot;source /data/mci/buildscripts/gdb/mongo_printers.py&quot; -ex &quot;source /data/mci/buildscripts/gdb/mongo_lock.py&quot; -ex &quot;set scheduler-locking on&quot;  -ex &quot;set pagination off&quot; -ex &quot;set print static-members off&quot; -ex &quot;mongod-dump-session&quot; -ex &quot;set confirm off&quot; -ex &quot;quit&quot;&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;

&lt;p&gt;There appears to be a &lt;a href=&quot;https://sourceware.org/bugzilla/show_bug.cgi?id=20020#c16&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;patch&lt;/a&gt; that fixes the bug, but it is dated 2019-03-25 (~2 weeks prior to the writing of this comment), so it likely isn&apos;t merged yet.&lt;/p&gt;</comment>
                            <comment id="2205166" author="william.schultz" created="Mon, 8 Apr 2019 15:06:03 +0000"  >&lt;p&gt;When testing out the fix proposed above I ran into a new issue. It looks like, on at least one platform (RHEL 6.2 Santiago), GDB is hitting a segmentation fault when it tries to print out the value of the full &lt;tt&gt;_sessionId&lt;/tt&gt; field &lt;a href=&quot;https://github.com/mongodb/mongo/blob/c8a133c3714d80d02cb8524d5278e6c1321e26f1/buildscripts/gdb/mongo.py#L308&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;here&lt;/a&gt;. I believe this manifests as a &quot;Bad exit code -11&quot; error as seen in the patch build log &lt;a href=&quot;https://evergreen.mongodb.com/task_log_raw/mongodb_mongo_master_linux_64_debug_concurrency_replication_multi_stmt_txn_patch_488e81877725f742b097a5342488542028a53ba2_5ca78e5be3c3317ccc21ecce_19_04_05_17_20_28/0?type=T#L1382&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;here&lt;/a&gt;. From some debugging on a spawned RHEL host, it appears that the issue has something to do with printing the &lt;tt&gt;_uid&lt;/tt&gt; &lt;a href=&quot;https://github.com/mongodb/mongo/blob/c8a133c3714d80d02cb8524d5278e6c1321e26f1/src/mongo/db/logical_session_id.idl#L92-L99&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;field&lt;/a&gt; of the &lt;tt&gt;LogicalSessionId&lt;/tt&gt; type. I am not yet sure what the underlying issue is here, but I am running another &lt;a href=&quot;https://evergreen.mongodb.com/version/5cab61f8e3c3317ccc2b5e51&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;patch build&lt;/a&gt; that disables the printing of the raw &lt;tt&gt;_sessionId&lt;/tt&gt; variable to see if this fixes this problem. &lt;/p&gt;</comment>
                            <comment id="2203661" author="william.schultz" created="Fri, 5 Apr 2019 17:23:00 +0000"  >&lt;p&gt;Ok, it looks like it won&apos;t be too hard to fix this. We just need to account for the fact that fields on the TransactionParticipant object like &lt;tt&gt;_txnState&lt;/tt&gt; have now been pushed inside either the &lt;tt&gt;&lt;a href=&quot;https://github.com/mongodb/mongo/blob/e433a5aee915568cf73b05e89597903855ed1952/src/mongo/db/transaction_participant.h#L851&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;ObservableState&lt;/a&gt;&lt;/tt&gt; type (the &lt;tt&gt;_o&lt;/tt&gt; field), or the &lt;tt&gt;&lt;a href=&quot;https://github.com/mongodb/mongo/blob/e433a5aee915568cf73b05e89597903855ed1952/src/mongo/db/transaction_participant.h#L885&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;PrivateState&lt;/a&gt;&lt;/tt&gt; type (the &lt;tt&gt;_p&lt;/tt&gt; field). So, for example, when &lt;a href=&quot;https://github.com/mongodb/mongo/blob/488e81877725f742b097a5342488542028a53ba2/buildscripts/gdb/mongo.py#L317&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;extracting fields&lt;/a&gt; from the TransactionParticipant, we just extract fields from &lt;tt&gt;txnPart&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;_o&amp;#39;&amp;#93;&lt;/span&gt;&lt;/tt&gt; or &lt;tt&gt;txnPart&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;_p&amp;#39;&amp;#93;&lt;/span&gt;&lt;/tt&gt; instead of &lt;tt&gt;txnPart&lt;/tt&gt;. &lt;/p&gt;</comment>
                            <comment id="2198680" author="william.schultz" created="Tue, 2 Apr 2019 04:07:12 +0000"  >&lt;p&gt;Running a &lt;a href=&quot;https://evergreen.mongodb.com/version/5ca2da76e3c331230bbc3e87&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;patch build&lt;/a&gt; to see if this is broken or not.&lt;/p&gt;</comment>
                            <comment id="2177333" author="judah.schvimer" created="Mon, 11 Mar 2019 17:18:00 +0000"  >&lt;p&gt;We will also consider fixing it since it seems worthwhile.&lt;/p&gt;</comment>
                            <comment id="2177285" author="william.schultz" created="Mon, 11 Mar 2019 16:52:26 +0000"  >&lt;p&gt;I think the specific issue in BF-12368 may have actually been fixed by &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-39972&quot; title=&quot;libstdc++ unique_ptr implementation changed in GCC 7&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-39972&quot;&gt;&lt;del&gt;SERVER-39972&lt;/del&gt;&lt;/a&gt;, i.e. it was due to the change in the unique_ptr implementation in GCC 7. We might still want to verify that the mongod-dump-sessions GDB command is still working as expected though after the most recent refactoring. &lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="631533">SERVER-38045</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                                        </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="213494" name="gdb_session_dump_bt.txt" size="9095" author="william.schultz@mongodb.com" created="Mon, 8 Apr 2019 23:23:53 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>7.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>3.0</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>Mon, 11 Mar 2019 17:18:00 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        4 years, 44 weeks, 2 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_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>
                            4 years, 44 weeks, 2 days ago
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_16465" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Linked BF Score</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>22.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>judah.schvimer@mongodb.com</customfieldvalue>
            <customfieldvalue>william.schultz@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hupohb:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hufdmv:</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="2823">Repl 2019-03-25</customfieldvalue>
    <customfieldvalue id="2896">Repl 2019-04-08</customfieldvalue>
    <customfieldvalue id="2918">Repl 2019-04-22</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|hupaqn:</customfieldvalue>

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