<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 03:24:26 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-16149] LNet Discovery queue and deletion race</title>
                <link>https://jira.whamcloud.com/browse/LU-16149</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;    lnet_peer_deletion() can race with another thread calling&lt;br/&gt;
    lnet_peer_queue_for_discovery.&lt;/p&gt;

&lt;p&gt;    Discovery thread:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Calls lnet_peer_deletion():&lt;/li&gt;
	&lt;li&gt;LNET_PEER_DISCOVERING bit is cleared from lnet_peer::lp_state&lt;/li&gt;
	&lt;li&gt;releases lnet_peer::lp_lock&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;    Another thread:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Acquires lnet_net_lock/EX&lt;/li&gt;
	&lt;li&gt;Calls lnet_peer_queue_for_discovery()&lt;/li&gt;
	&lt;li&gt;Takes lnet_peer::lp_lock&lt;/li&gt;
	&lt;li&gt;Sets LNET_PEER_DISCOVERING bit&lt;/li&gt;
	&lt;li&gt;Releases lnet_peer::lp_lock&lt;/li&gt;
	&lt;li&gt;Sees lnet_peer::lp_dc_list is not empty, so it does not add peer&lt;br/&gt;
       to dc request queue&lt;/li&gt;
	&lt;li&gt;lnet_peer_queue_for_discovery() returns, lnet_net_lock/EX releases&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;    Discovery thread:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Acquires lnet_net_lock/EX&lt;/li&gt;
	&lt;li&gt;Deletes peer from ln_dc_working list&lt;/li&gt;
	&lt;li&gt;performs the peer deletion&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;    At this point, the peer is not on any discovery list, and it has&lt;br/&gt;
    LNET_PEER_DISCOVERING bit set. This peer is now stranded, and any&lt;br/&gt;
    messages on the peer&apos;s lnet_peer::lp_dc_pendq are likewise stranded.&lt;/p&gt;

&lt;p&gt;    To solve this, modify lnet_peer_deletion() so that it waits to clear&lt;br/&gt;
    the LNET_PEER_DISCOVERING bit until it has completed deleting the&lt;br/&gt;
    peer and re-acquired the lnet_peer::lp_lock. This ensures we cannot&lt;br/&gt;
    race with any other thread that may add the LNET_PEER_DISCOVERING bit&lt;br/&gt;
    back to the peer.&lt;/p&gt;

&lt;p&gt;    Futhermore, do not bother deleting the peer from the ln_dc_working&lt;br/&gt;
    list in lnet_peer_deletion(). This will be done by&lt;br/&gt;
    lnet_peer_discovery_complete().&lt;/p&gt;</description>
                <environment></environment>
        <key id="72315">LU-16149</key>
            <summary>LNet Discovery queue and deletion race</summary>
                <type id="1" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="3" iconUrl="https://jira.whamcloud.com/images/icons/priorities/major.svg">Major</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="hornc">Chris Horn</assignee>
                                    <reporter username="hornc">Chris Horn</reporter>
                        <labels>
                    </labels>
                <created>Mon, 12 Sep 2022 21:47:46 +0000</created>
                <updated>Thu, 23 Feb 2023 13:24:11 +0000</updated>
                            <resolved>Tue, 25 Oct 2022 19:03:13 +0000</resolved>
                                    <version>Lustre 2.16.0</version>
                    <version>Lustre 2.15.2</version>
                                    <fixVersion>Lustre 2.16.0</fixVersion>
                    <fixVersion>Lustre 2.15.3</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>3</watches>
                                                                            <comments>
                            <comment id="346424" author="gerrit" created="Mon, 12 Sep 2022 21:50:21 +0000"  >&lt;p&gt;&quot;Chris Horn &amp;lt;chris.horn@hpe.com&amp;gt;&quot; uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/48532&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/48532&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-16149&quot; title=&quot;LNet Discovery queue and deletion race&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-16149&quot;&gt;&lt;del&gt;LU-16149&lt;/del&gt;&lt;/a&gt; lnet: Discovery queue and deletion race&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 27a2481daf1026883f004109bd9a766cf5798161&lt;/p&gt;</comment>
                            <comment id="350713" author="gerrit" created="Tue, 25 Oct 2022 17:24:28 +0000"  >&lt;p&gt;&quot;Oleg Drokin &amp;lt;green@whamcloud.com&amp;gt;&quot; merged in patch &lt;a href=&quot;https://review.whamcloud.com/c/fs/lustre-release/+/48532/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/c/fs/lustre-release/+/48532/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-16149&quot; title=&quot;LNet Discovery queue and deletion race&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-16149&quot;&gt;&lt;del&gt;LU-16149&lt;/del&gt;&lt;/a&gt; lnet: Discovery queue and deletion race&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: a966b624ac76e34e8ed28c6980c3f58cb441eeb0&lt;/p&gt;</comment>
                            <comment id="350743" author="pjones" created="Tue, 25 Oct 2022 19:03:13 +0000"  >&lt;p&gt;Landed for 2.16&lt;/p&gt;</comment>
                            <comment id="360422" author="gerrit" created="Wed, 25 Jan 2023 23:11:15 +0000"  >&lt;p&gt;&quot;Serguei Smirnov &amp;lt;ssmirnov@whamcloud.com&amp;gt;&quot; uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/c/fs/lustre-release/+/49772&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/c/fs/lustre-release/+/49772&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-16149&quot; title=&quot;LNet Discovery queue and deletion race&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-16149&quot;&gt;&lt;del&gt;LU-16149&lt;/del&gt;&lt;/a&gt; lnet: Discovery queue and deletion race&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: b2_15&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: d464cf8747032b92d0d0daa7a9a2153a2b30b6d5&lt;/p&gt;</comment>
                            <comment id="363837" author="gerrit" created="Thu, 23 Feb 2023 06:36:43 +0000"  >&lt;p&gt;&quot;Oleg Drokin &amp;lt;green@whamcloud.com&amp;gt;&quot; merged in patch &lt;a href=&quot;https://review.whamcloud.com/c/fs/lustre-release/+/49772/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/c/fs/lustre-release/+/49772/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-16149&quot; title=&quot;LNet Discovery queue and deletion race&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-16149&quot;&gt;&lt;del&gt;LU-16149&lt;/del&gt;&lt;/a&gt; lnet: Discovery queue and deletion race&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: b2_15&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: 7caade3078a168c3d39f6318c485490322604ab4&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                                        </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <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|i02zxb:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10090" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</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>