<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 03:17:01 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-15285] same dir rename deadlock</title>
                <link>https://jira.whamcloud.com/browse/LU-15285</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;removal of big rename lock uncovered a deadlock situation.&lt;/p&gt;

&lt;p&gt;When two threads are racing to perform the opposite rename:&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;mv a b &amp;amp;
mv b a &lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;we obtain PDO locks in the source-target order and it opens up the deadlock (easily seen in master)&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt; Deadlock!
ungranted lock
&#160; &#160;-- Lock: 0xffff8800b3d24b40/0x45f9a916d27c17ce (pid: 14611)
&#160; &#160; &#160; &#160;Resource: 8589935618:1:0:13873
&#160; &#160; &#160; &#160;Req mode: PW, grant mode: --, read: 0, write: 1
&#160; &#160; &#160; &#160;Bits: 0x2
waits for granted lock
&#160; &#160;-- Lock: 0xffff8800b4795200/0x45f9a916d27c17c0 (pid: 12773)
&#160; &#160; &#160; &#160;Resource: 8589935618:1:0:13873
&#160; &#160; &#160; &#160;Req mode: PW, grant mode: PW, read: 0, write: 1
&#160; &#160; &#160; &#160;Bits: 0x2
that is blocked waiting on another lock
&#160; &#160;-- Lock: 0xffff8800b4797600/0x45f9a916d27c17d5 (pid: 12773)
&#160; &#160; &#160; &#160;Resource: 8589935618:1:0:13361
&#160; &#160; &#160; &#160;Req mode: PW, grant mode: --, read: 0, write: 1
&#160; &#160; &#160; &#160;Bits: 0x2
that is held by the first thread wanting the first lock in the chain
&#160; &#160;-- Lock: 0xffff8800b4513840/0x45f9a916d27c17c7 (pid: 14611)
&#160; &#160; &#160; &#160;Resource: 8589935618:1:0:13361
&#160; &#160; &#160; &#160;Req mode: PW, grant mode: PW, read: 0, write: 1
&#160; &#160; &#160; &#160;Bits: 0x2
Deadlock!
ungranted lock
&#160; &#160;-- Lock: 0xffff8800b4797600/0x45f9a916d27c17d5 (pid: 12773)
&#160; &#160; &#160; &#160;Resource: 8589935618:1:0:13361
&#160; &#160; &#160; &#160;Req mode: PW, grant mode: --, read: 0, write: 1
&#160; &#160; &#160; &#160;Bits: 0x2
waits for granted lock
&#160; &#160;-- Lock: 0xffff8800b4513840/0x45f9a916d27c17c7 (pid: 14611)
&#160; &#160; &#160; &#160;Resource: 8589935618:1:0:13361
&#160; &#160; &#160; &#160;Req mode: PW, grant mode: PW, read: 0, write: 1
&#160; &#160; &#160; &#160;Bits: 0x2
that is blocked waiting on another lock
&#160; &#160;-- Lock: 0xffff8800b3d24b40/0x45f9a916d27c17ce (pid: 14611)
&#160; &#160; &#160; &#160;Resource: 8589935618:1:0:13873
&#160; &#160; &#160; &#160;Req mode: PW, grant mode: --, read: 0, write: 1
&#160; &#160; &#160; &#160;Bits: 0x2
that is held by the first thread wanting the first lock in the chain
&#160; &#160;-- Lock: 0xffff8800b4795200/0x45f9a916d27c17c0 (pid: 12773)
&#160; &#160; &#160; &#160;Resource: 8589935618:1:0:13873
&#160; &#160; &#160; &#160;Req mode: PW, grant mode: PW, read: 0, write: 1
&#160; &#160; &#160; &#160;Bits: 0x2&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;&#160; &#160; rr_opcode = REINT_RENAME,
&#160; &#160; rr_open_handle = 0x0,
&#160; &#160; rr_lease_handle = 0x0,
&#160; &#160; rr_fid1 = 0xffff8800a9d81b40,
&#160; &#160; rr_fid2 = 0xffff8800a9d81b50,
&#160; &#160; rr_name = {
&#160; &#160; &#160; ln_name = 0xffff8800a9d81ba0 &quot;14&quot;,
&#160; &#160; &#160; ln_namelen = 2
&#160; &#160; },
&#160; &#160; rr_tgt_name = {
&#160; &#160; &#160; ln_name = 0xffff8800a9d81ba8 &quot;16&quot;,
&#160; &#160; &#160; ln_namelen = 2
&#160; &#160; },
---
&#160; &#160; rr_opcode = REINT_RENAME,
&#160; &#160; rr_open_handle = 0x0,
&#160; &#160; rr_lease_handle = 0x0,
&#160; &#160; rr_fid1 = 0xffff8800a9d84b58,
&#160; &#160; rr_fid2 = 0xffff8800a9d84b68,
&#160; &#160; rr_name = {
&#160; &#160; &#160; ln_name = 0xffff8800a9d84bb8 &quot;16&quot;,
&#160; &#160; &#160; ln_namelen = 2
&#160; &#160; },
&#160; &#160; rr_tgt_name = {
&#160; &#160; &#160; ln_name = 0xffff8800a9d84bc0 &quot;14&quot;,
&#160; &#160; &#160; ln_namelen = 2
&#160; &#160; }, &lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;crash&amp;gt; bt 12773
PID: 12773 &#160;TASK: ffff8800b827c440 &#160;CPU: 3 &#160; COMMAND: &quot;mdt00_005&quot;
&#160;#0 [ffff8800b7b37920] __schedule at ffffffff817e3e22
&#160;#1 [ffff8800b7b37988] schedule at ffffffff817e4339
&#160;#2 [ffff8800b7b37998] ldlm_completion_ast at ffffffffa05ec3dd [ptlrpc]
&#160;#3 [ffff8800b7b37a38] ldlm_cli_enqueue_local at ffffffffa05ea219 [ptlrpc]
&#160;#4 [ffff8800b7b37ad8] mdt_reint_rename at ffffffffa0d53948 [mdt]
&#160;#5 [ffff8800b7b37bf0] mdt_reint_rec at ffffffffa0d5dfb7 [mdt]
&#160;#6 [ffff8800b7b37c18] mdt_reint_internal at ffffffffa0d32acc [mdt]
&#160;#7 [ffff8800b7b37c58] mdt_reint at ffffffffa0d3d647 [mdt]
&#160;#8 [ffff8800b7b37c88] tgt_request_handle at ffffffffa06852be [ptlrpc]
&#160;#9 [ffff8800b7b37d18] ptlrpc_server_handle_request at ffffffffa06309c0 [ptlrpc]
#10 [ffff8800b7b37dd0] ptlrpc_main at ffffffffa0632559 [ptlrpc]
#11 [ffff8800b7b37ea8] kthread at ffffffff810ba114
#12 [ffff8800b7b37f50] ret_from_fork_nospec_begin at ffffffff817f1e5d
crash&amp;gt; bt 14611
PID: 14611 &#160;TASK: ffff8800c930b330 &#160;CPU: 1 &#160; COMMAND: &quot;mdt00_013&quot;
&#160;#0 [ffff8800b7efb920] __schedule at ffffffff817e3e22
&#160;#1 [ffff8800b7efb988] schedule at ffffffff817e4339
&#160;#2 [ffff8800b7efb998] ldlm_completion_ast at ffffffffa05ec3dd [ptlrpc]
&#160;#3 [ffff8800b7efba38] ldlm_cli_enqueue_local at ffffffffa05ea219 [ptlrpc]
&#160;#4 [ffff8800b7efbad8] mdt_reint_rename at ffffffffa0d53948 [mdt]
&#160;#5 [ffff8800b7efbbf0] mdt_reint_rec at ffffffffa0d5dfb7 [mdt]
&#160;#6 [ffff8800b7efbc18] mdt_reint_internal at ffffffffa0d32acc [mdt]
&#160;#7 [ffff8800b7efbc58] mdt_reint at ffffffffa0d3d647 [mdt]
&#160;#8 [ffff8800b7efbc88] tgt_request_handle at ffffffffa06852be [ptlrpc]
&#160;#9 [ffff8800b7efbd18] ptlrpc_server_handle_request at ffffffffa06309c0 [ptlrpc]
#10 [ffff8800b7efbdd0] ptlrpc_main at ffffffffa0632559 [ptlrpc]
#11 [ffff8800b7efbea8] kthread at ffffffff810ba114
#12 [ffff8800b7efbf50] ret_from_fork_nospec_begin at ffffffff817f1e5d &lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Additionally while looking at this code it&apos;s not yet clear to me why do we need mdt_pdir_hash_lock at all since everythning it does is also done by the mdt_object_local_lock (that we get into from mdt_object_lock_save call)&lt;/p&gt;</description>
                <environment></environment>
        <key id="67360">LU-15285</key>
            <summary>same dir rename deadlock</summary>
                <type id="1" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="2" iconUrl="https://jira.whamcloud.com/images/icons/priorities/critical.svg">Critical</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="green">Oleg Drokin</assignee>
                                    <reporter username="green">Oleg Drokin</reporter>
                        <labels>
                    </labels>
                <created>Mon, 29 Nov 2021 21:09:01 +0000</created>
                <updated>Wed, 11 Oct 2023 14:15:51 +0000</updated>
                            <resolved>Mon, 31 Jan 2022 04:29:32 +0000</resolved>
                                    <version>Lustre 2.15.0</version>
                                    <fixVersion>Lustre 2.15.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>8</watches>
                                                                            <comments>
                            <comment id="319402" author="gerrit" created="Mon, 29 Nov 2021 21:59:53 +0000"  >&lt;p&gt;&quot;Oleg Drokin &amp;lt;green@whamcloud.com&amp;gt;&quot; uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/45676&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/45676&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-15285&quot; title=&quot;same dir rename deadlock&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-15285&quot;&gt;&lt;del&gt;LU-15285&lt;/del&gt;&lt;/a&gt; mdt: fix same-dir racing rename deadlock&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 4fdbe3209492fd567ed6cee3f6c876776c41f122&lt;/p&gt;</comment>
                            <comment id="319518" author="adilger" created="Tue, 30 Nov 2021 11:47:00 +0000"  >&lt;p&gt;Oleg, I was thinking about your &lt;tt&gt;mdt_pdir_hash_lock&lt;/tt&gt; vs. &lt;tt&gt;mdt_object_local_lock&lt;/tt&gt; comment. If they were taking exactly the same lock, wouldn&apos;t the thread deadlock on itself in that case?  &lt;/p&gt;</comment>
                            <comment id="324500" author="gerrit" created="Mon, 31 Jan 2022 01:24:07 +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/45676/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/45676/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-15285&quot; title=&quot;same dir rename deadlock&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-15285&quot;&gt;&lt;del&gt;LU-15285&lt;/del&gt;&lt;/a&gt; mdt: fix same-dir racing rename deadlock&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: 82ec537d8b4cc9261828f4efe6b03d8d33f38432&lt;/p&gt;</comment>
                            <comment id="324528" author="pjones" created="Mon, 31 Jan 2022 04:29:32 +0000"  >&lt;p&gt;Landed for 2.15&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                            <outwardlinks description="duplicates">
                                                        </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                        <issuelink>
            <issuekey id="31766">LU-12125</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="57104">LU-12834</issuekey>
        </issuelink>
                            </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|i02b2f:</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>