<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 01:18:04 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>Whamcloud Community JIRA</title>
    <link>https://jira.whamcloud.com</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.4.14</version>
        <build-number>940014</build-number>
        <build-date>05-12-2023</build-date>
    </build-info>


<item>
            <title>[LU-1600] lnet_nid2peer_locked() has race with shutting down of LNet</title>
                <link>https://jira.whamcloud.com/browse/LU-1600</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;lnet_nid2peer_locked()-&amp;gt;lnet_find_peer_locked() will get NULL while LNet is in progress of shutting down, which means lnet_find_peer_locked() can allocate a new peer and try to insert it into peer table. If one thread dropped lock and allocating new peer, another thread could have already finalized everything of LNet, so the first thread will crash system because it will try to get lock and peer-table after allocation of peer.&lt;/p&gt;

&lt;p&gt;The simple solution is add an extra refcount on peer-table (number of peers) before allocating new peer, because the shutting down thread always needs to wait until peers number to be zero before going to the next step.&lt;/p&gt;

&lt;p&gt;This bug is not introduced by new LNet, but it can be exposed easily by new LNet.&lt;/p&gt;</description>
                <environment></environment>
        <key id="15130">LU-1600</key>
            <summary>lnet_nid2peer_locked() has race with shutting down of LNet</summary>
                <type id="1" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="1" iconUrl="https://jira.whamcloud.com/images/icons/priorities/blocker.svg">Blocker</priority>
                        <status id="5" iconUrl="https://jira.whamcloud.com/images/icons/statuses/resolved.png" description="A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.">Resolved</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="1">Fixed</resolution>
                                        <assignee username="liang">Liang Zhen</assignee>
                                    <reporter username="liang">Liang Zhen</reporter>
                        <labels>
                    </labels>
                <created>Thu, 5 Jul 2012 00:11:35 +0000</created>
                <updated>Tue, 24 Jul 2012 00:52:16 +0000</updated>
                            <resolved>Tue, 24 Jul 2012 00:52:16 +0000</resolved>
                                    <version>Lustre 2.3.0</version>
                                    <fixVersion>Lustre 2.3.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>1</watches>
                                                                            <comments>
                            <comment id="41505" author="jlevi" created="Thu, 5 Jul 2012 14:53:39 +0000"  >&lt;p&gt;Are you already looking at this one?&lt;/p&gt;</comment>
                            <comment id="41593" author="liang" created="Mon, 9 Jul 2012 04:33:24 +0000"  >&lt;p&gt;patch landed&lt;/p&gt;</comment>
                            <comment id="41654" author="liang" created="Tue, 10 Jul 2012 10:42:11 +0000"  >&lt;p&gt;I have to reopen it, the patch didn&apos;t fix all issues:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;thread-1: shutdown LNet, have cleaned all peers by lnet_peer_tables_cleanup()&lt;/li&gt;
	&lt;li&gt;thread-2: it&apos;s a LND thread which is calling lnet_parse()-&amp;gt;lnet_nid2peer_locked()
	&lt;ul&gt;
		&lt;li&gt;lnet_find_peer_locked() returns NULL because LNet is shutting down&lt;/li&gt;
		&lt;li&gt;create a new peer, then found LNet is shutting down, so it just attach the new created peer on deathrow list and return&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
	&lt;li&gt;thread-1: lnet_peer_tables_destroy() calls LASSERT(cfs_list_empty(&amp;amp;ptable-&amp;gt;pt_deathrow)), crash...&lt;/li&gt;
&lt;/ul&gt;
</comment>
                            <comment id="41712" author="liang" created="Wed, 11 Jul 2012 13:34:13 +0000"  >&lt;p&gt;the second patch is here: &lt;a href=&quot;http://review.whamcloud.com/3369&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/3369&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="42148" author="pjones" created="Mon, 23 Jul 2012 18:06:30 +0000"  >&lt;p&gt;Liang&lt;/p&gt;

&lt;p&gt;Can this now be marked as resolved?&lt;/p&gt;

&lt;p&gt;Peter&lt;/p&gt;</comment>
                            <comment id="42174" author="liang" created="Tue, 24 Jul 2012 00:52:16 +0000"  >&lt;p&gt;patch landed&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                            <customfield id="customfield_10890" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10390" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hzv67z:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10090" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>4542</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10060" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Severity</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10022"><![CDATA[3]]></customfieldvalue>

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