<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:18:08 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-28437] Hang analyzer GDB module mongo_lock.py should use a memory based mechanism to discover the locks</title>
                <link>https://jira.mongodb.org/browse/SERVER-28437</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;The lock discovery used in the Hang Analyzer GDB module mongo_lock.py invokes functions to retrieve lock data. This approach has the following side affects:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Only works for a live process, and not with a core dump&lt;/li&gt;
	&lt;li&gt;When the function is called, other threads can run, which may change the state of the lock tables&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;A preferable method would be to inspect memory, including the complex C++ std structures, like iterating over an ordered Map. Since this is a difficult undertaking, it may be possible using a third party module, like the &lt;tt&gt;Tr1UnorderedMapPrinter&lt;/tt&gt; class found in /opt/mongodbtoolchain/v2/share/gcc-5.4.0/python/libstdcxx/v6/printers.py&lt;/p&gt;</description>
                <environment></environment>
        <key id="367140">SERVER-28437</key>
            <summary>Hang analyzer GDB module mongo_lock.py should use a memory based mechanism to discover the locks</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="12300">Won&apos;t Do</resolution>
                                        <assignee username="backlog-server-stm">Backlog - Server Tooling and Methods (STM)</assignee>
                                    <reporter username="jonathan.abrahams">Jonathan Abrahams</reporter>
                        <labels>
                            <label>PM-626</label>
                            <label>tig-hanganalyzer</label>
                    </labels>
                <created>Wed, 22 Mar 2017 22:13:34 +0000</created>
                <updated>Tue, 6 Dec 2022 04:04:53 +0000</updated>
                            <resolved>Fri, 28 Jan 2022 19:13:34 +0000</resolved>
                                                                    <component>Testing Infrastructure</component>
                                        <votes>0</votes>
                                    <watches>9</watches>
                                                                                                                <comments>
                            <comment id="4380157" author="max.hirschhorn@10gen.com" created="Mon, 28 Feb 2022 13:49:25 +0000"  >&lt;p&gt;Hey team, I went ahead and implemented this functionality in a new GDB extension library - &lt;a href=&quot;https://github.com/visemet/gdb-mongodb-server&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/visemet/gdb-mongodb-server&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;It hasn&apos;t been put through the paces like the hang analyzer has so I anticipate there are certain cases (MongoDB toolchain version, compiler options, etc.) where it doesn&apos;t work. I did at least confirm I could dump out the LockManager from the core dump in BF-23292 (a relatively recent LockManager deadlock).&lt;/p&gt;</comment>
                            <comment id="4321946" author="brooke.miller" created="Fri, 28 Jan 2022 19:13:35 +0000"  >&lt;p&gt;We don&apos;t have plans to evaluate memory-based debugging info extraction in the hang-analyzer.&lt;/p&gt;</comment>
                            <comment id="1556827" author="eddie.louie" created="Mon, 24 Apr 2017 23:00:14 +0000"  >&lt;p&gt;Sorry for the delayed update. It took a bit of time understanding the Python code. Currently I&apos;ve managed to get the pair structures printed (each element of the unordered_map is a &amp;lt;ResourceId, LockHead*&amp;gt; pair). I was a bit confused by the Tr1HashtableIterator code. It turns out the StdHashtableIterator was more appropriate to use. So instead of going through each thread one by one and dumping the LockManager locks, we could access the LockManager&apos;s _lockBuckets array and iterate through each bucket. Within each bucket we can access the &lt;tt&gt;data&lt;/tt&gt; field, which is the unordered_map that contains all the LockHeads. Once we iterate through all the LockHeads, we can access the grantedList and conflictList. These lists contain the LockRequests that contain the holders and waiters for each lock. I have not integrated all the code yet. I&apos;m looking into this next. Once that is done, we can remove the code that calls the findOrInsert function.&lt;/p&gt;</comment>
                            <comment id="1553109" author="max.hirschhorn@10gen.com" created="Wed, 19 Apr 2017 21:06:28 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=eddie.louie&quot; class=&quot;user-hover&quot; rel=&quot;eddie.louie&quot;&gt;eddie.louie&lt;/a&gt;, could you post an update with how far you&apos;ve gotten in exploring the LockManager structures without calling functions (e.g. using &lt;tt&gt;Tr1UnorderedMapPrinter&lt;/tt&gt;)? I&apos;d like to know how close we think we are to making it possible to run on a core dump.&lt;/p&gt;</comment>
                            <comment id="1531242" author="max.hirschhorn@10gen.com" created="Thu, 23 Mar 2017 13:53:08 +0000"  >&lt;p&gt;Given that this would also resolve the issue we&apos;re having with calling functions on Solaris and would enable support for running the &lt;tt&gt;mongodb&amp;#45;show&amp;#45;locks&lt;/tt&gt; and &lt;tt&gt;mongodb&amp;#45;waitsfor&amp;#45;graph&lt;/tt&gt; GDB commands on core dumps, I think we should spend at least a week trying to get this to work.&lt;/p&gt;

&lt;p&gt;If we discover that this is too difficult for some reason, then we can move it back to the backlog.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                                        </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="631533">SERVER-38045</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>5.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_12751" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Assigned Teams</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="25142"><![CDATA[Server Tooling & Methods]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Thu, 23 Mar 2017 13:53:08 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        1 year, 49 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>alexander.golin@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            1 year, 49 weeks, 2 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>backlog-server-stm</customfieldvalue>
            <customfieldvalue>brooke.miller@mongodb.com</customfieldvalue>
            <customfieldvalue>eddie.louie</customfieldvalue>
            <customfieldvalue>jonathan.abrahams</customfieldvalue>
            <customfieldvalue>max.hirschhorn@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|ht4n73:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hraun3:</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="1594">TIG 2017-04-17</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|hs4dh3:</customfieldvalue>

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