<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 03:18:46 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-15491] rename deadlock</title>
                <link>https://jira.whamcloud.com/browse/LU-15491</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;thread 1: mv dir1/10 dir2/10&lt;br/&gt;
thread 2: mv dir2/11 dir2/2&lt;br/&gt;
where dir1/10 is hardlink to dir2/2 and dir2/10 is hardlink to dir2/11&lt;br/&gt;
so thread 1 and thread2 try to take those locks in reverse order with the predictable result&lt;/p&gt;

&lt;p&gt;This is reproduced with non-dne racer run here: &lt;a href=&quot;http://testing.linuxhacker.ru:3333/lustre-reports/21289/testresults/racer-long-zfs-centos7_x86_64-centos7_x86_64-retry3/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://testing.linuxhacker.ru:3333/lustre-reports/21289/testresults/racer-long-zfs-centos7_x86_64-centos7_x86_64-retry3/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;deadlock report reports:&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
   -- Lock: 0xffff8800a93f5b00/0x539a6d335586e266 (pid: 6606)
       Node: local, ns lustre-MDT0000
       Resource: [0x200000401:0x9fd9:0x0].0
       Req mode: EX, grant mode: --, read: 0, write: 1
       Bits: 0x3
waits for granted lock
   -- Lock: 0xffff8800af61e1c0/0x539a6d335586e235 (pid: 14160)
       Node: local, ns lustre-MDT0000
       Resource: [0x200000401:0x9fd9:0x0].0
       Req mode: EX, grant mode: EX, read: 0, write: 1
       Bits: 0x21
but holder is blocked waiting on another lock
   -- Lock: 0xffff880114890900/0x539a6d335586e258 (pid: 14160)
       Node: local, ns lustre-MDT0000
       Resource: [0x200000401:0xa0b7:0x0].0
       Req mode: EX, grant mode: --, read: 0, write: 1
       Bits: 0x3
that is held by the first thread wanting the first lock in the chain
   -- Lock: 0xffff8800a93f61c0/0x539a6d335586e23c (pid: 6606)
       Node: local, ns lustre-MDT0000
       Resource: [0x200000401:0xa0b7:0x0].0
       Req mode: EX, grant mode: EX, read: 0, write: 1
       Bits: 0x21
Deadlock!
ungranted lock
   -- Lock: 0xffff880114890900/0x539a6d335586e258 (pid: 14160)
       Node: local, ns lustre-MDT0000
       Resource: [0x200000401:0xa0b7:0x0].0
       Req mode: EX, grant mode: --, read: 0, write: 1
       Bits: 0x3
waits for granted lock
   -- Lock: 0xffff8800a93f61c0/0x539a6d335586e23c (pid: 6606)
       Node: local, ns lustre-MDT0000
       Resource: [0x200000401:0xa0b7:0x0].0
       Req mode: EX, grant mode: EX, read: 0, write: 1
       Bits: 0x21
but holder is blocked waiting on another lock
   -- Lock: 0xffff8800a93f5b00/0x539a6d335586e266 (pid: 6606)
       Node: local, ns lustre-MDT0000
       Resource: [0x200000401:0x9fd9:0x0].0
       Req mode: EX, grant mode: --, read: 0, write: 1
       Bits: 0x3
that is held by the first thread wanting the first lock in the chain
   -- Lock: 0xffff8800af61e1c0/0x539a6d335586e235 (pid: 14160)
       Node: local, ns lustre-MDT0000
       Resource: [0x200000401:0x9fd9:0x0].0
       Req mode: EX, grant mode: EX, read: 0, write: 1
       Bits: 0x21
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;thread info for pid 6606 at 0xffff8800d3c6e000:&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;  mti_rr = {
&#160; &#160; rr_opcode = REINT_RENAME,
&#160; &#160; rr_open_handle = 0x0,
&#160; &#160; rr_lease_handle = 0x0,
&#160; &#160; rr_fid1 = 0xffff880116b15000,
&#160; &#160; rr_fid2 = 0xffff880116b15010,
&#160; &#160; rr_name = {
&#160; &#160; &#160; ln_name = 0xffff880116b15060 &quot;10&quot;,
&#160; &#160; &#160; ln_namelen = 2
&#160; &#160; },
&#160; &#160; rr_tgt_name = {
&#160; &#160; &#160; ln_name = 0xffff880116b15068 &quot;10&quot;,
&#160; &#160; &#160; ln_namelen = 2
&#160; &#160; },
crash&amp;gt; p *(struct ll_fid *)0xffff880116b15000
$3 = {
&#160; id = 8589935617,
&#160; generation = 1,
&#160; f_type = 0
}
crash&amp;gt; p *(struct ll_fid *)0xffff880116b15010
$4 = {
&#160; id = 8589935618,
&#160; generation = 41273,
&#160; f_type = 0
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;thread info for pid 14160 at 0xffff88010f554000&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;&#160; mti_rr = {
&#160; &#160; rr_opcode = REINT_RENAME,
&#160; &#160; rr_open_handle = 0x0,
&#160; &#160; rr_lease_handle = 0x0,
&#160; &#160; rr_fid1 = 0xffff880116b15c20,
&#160; &#160; rr_fid2 = 0xffff880116b15c30,
&#160; &#160; rr_name = {
&#160; &#160; &#160; ln_name = 0xffff880116b15c80 &quot;11&quot;,
&#160; &#160; &#160; ln_namelen = 2
&#160; &#160; },
&#160; &#160; rr_tgt_name = {
&#160; &#160; &#160; ln_name = 0xffff880116b15c88 &quot;2&quot;,
&#160; &#160; &#160; ln_namelen = 1
&#160; &#160; },
crash&amp;gt; p *(struct ll_fid *)0xffff880116b15c20
$6 = {
&#160; id = 8589935617,
&#160; generation = 1,
&#160; f_type = 0
}
crash&amp;gt; p *(struct ll_fid *)0xffff880116b15c30
$7 = {
&#160; id = 8589935617,
&#160; generation = 1,
&#160; f_type = 0
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;And indeed in mdt_reint_rename() we see:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; lock_ibits = MDS_INODELOCK_LOOKUP | MDS_INODELOCK_XATTR;
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; rc = mdt_rename_source_lock(info, msrcdir, mold, lh_oldp,
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; lh_rmt, lock_ibits, cos_incompat);
 &lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;aka 0x21 lock bit for mold&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
  &#160; &#160; &#160; &#160; &#160; &#160; &#160; lh_newp = &amp;amp;info-&amp;gt;mti_lh[MDT_LH_NEW];
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; mdt_lock_reg_init(lh_newp, LCK_EX);
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; lock_ibits = MDS_INODELOCK_LOOKUP | MDS_INODELOCK_UPDATE;
... &lt;span class=&quot;code-comment&quot;&gt;// skip remote check
&lt;/span&gt;  &#160; &#160; &#160; &#160; &#160; &#160; &#160; rc = mdt_reint_object_lock(info, mnew, lh_newp, lock_ibits,
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;cos_incompat); &lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;aka 0x3 lock bit&lt;/p&gt;

&lt;p&gt;vmcore is available in the report (the server one) if you want to marvel at the coincidence&lt;/p&gt;</description>
                <environment></environment>
        <key id="68289">LU-15491</key>
            <summary>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="1" iconUrl="https://jira.whamcloud.com/images/icons/statuses/open.png" description="The issue is open and ready for the assignee to start work on it.">Open</status>
                    <statusCategory id="2" key="new" colorName="default"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="green">Oleg Drokin</assignee>
                                    <reporter username="green">Oleg Drokin</reporter>
                        <labels>
                    </labels>
                <created>Fri, 28 Jan 2022 06:04:26 +0000</created>
                <updated>Tue, 15 Aug 2023 21:01:11 +0000</updated>
                                            <version>Lustre 2.15.0</version>
                                    <fixVersion>Lustre 2.16.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>9</watches>
                                                                            <comments>
                            <comment id="324242" author="gerrit" created="Fri, 28 Jan 2022 07:53:59 +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/46352&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/46352&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-15491&quot; title=&quot;rename deadlock&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-15491&quot;&gt;LU-15491&lt;/a&gt; mdt: rename lock inversion deadlock&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 397236142ce8406f8a996f81f06aee0a6af4a696&lt;/p&gt;</comment>
                            <comment id="351862" author="adilger" created="Fri, 4 Nov 2022 21:09:31 +0000"  >&lt;p&gt;+1 on master: &lt;a href=&quot;https://testing.whamcloud.com/test_sets/2f4ce97f-d375-4353-8c2c-7a8696c9f84b&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://testing.whamcloud.com/test_sets/2f4ce97f-d375-4353-8c2c-7a8696c9f84b&lt;/a&gt;&lt;br/&gt;
Clients each have two threads stuck waiting in 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;[Fri Nov  4 17:45:37 2022] task:mv              state:D stack:    0 pid:499292 ppid:235624 flags:0x00000080
[Fri Nov  4 17:45:37 2022] Call Trace:
[Fri Nov  4 17:45:37 2022]  schedule+0x35/0xa0
[Fri Nov  4 17:45:37 2022]  __mutex_lock.isra.7+0x310/0x420
[Fri Nov  4 17:45:37 2022]  lock_rename+0x28/0xb0
[Fri Nov  4 17:45:37 2022]  do_renameat2+0x277/0x4e0
[Fri Nov  4 17:45:37 2022]  __x64_sys_rename+0x1c/0x20

[Fri Nov  4 17:45:37 2022] task:mv              state:D stack:    0 pid:499317 ppid:235529 flags:0x00000080
[Fri Nov  4 17:45:37 2022] Call Trace:
[Fri Nov  4 17:45:37 2022]  schedule+0x35/0xa0
[Fri Nov  4 17:45:37 2022]  __mutex_lock.isra.7+0x310/0x420
[Fri Nov  4 17:45:37 2022]  lock_rename+0x28/0xb0
[Fri Nov  4 17:45:37 2022]  do_renameat2+0x277/0x4e0
[Fri Nov  4 17:45:37 2022]  __x64_sys_rename+0x1c/0x20

[Fri Nov  4 17:43:34 2022] task:mv              state:D stack:    0 pid:198990 ppid:184082 flags:0x00000080
[Fri Nov  4 17:43:34 2022] Call Trace:
[Fri Nov  4 17:43:34 2022]  schedule+0x35/0xa0
[Fri Nov  4 17:43:34 2022]  __mutex_lock.isra.7+0x310/0x420
[Fri Nov  4 17:43:34 2022]  lock_rename+0x28/0xb0
[Fri Nov  4 17:43:34 2022]  do_renameat2+0x277/0x4e0
[Fri Nov  4 17:43:34 2022]  __x64_sys_renameat+0x1d/0x20

[Fri Nov  4 17:43:34 2022] task:mv              state:D stack:    0 pid:198998 ppid:184046 flags:0x00004080
[Fri Nov  4 17:43:34 2022] Call Trace:
[Fri Nov  4 17:43:34 2022]  schedule+0x35/0xa0
[Fri Nov  4 17:43:34 2022]  __mutex_lock.isra.7+0x310/0x420
[Fri Nov  4 17:43:34 2022]  lock_rename+0x28/0xb0
[Fri Nov  4 17:43:34 2022]  do_renameat2+0x277/0x4e0
[Fri Nov  4 17:43:34 2022]  __x64_sys_renameat2+0x20/0x30
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;and one MDS thread stuck in 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;Fri Nov  4 17:42:41 2022] Pid: 114790, comm: mdt00_023 4.18.0-372.26.1.el8_lustre.x86_64 #1 SMP Mon Oct 17 07:45:27 UTC 2022
[Fri Nov  4 17:42:41 2022] Call Trace TBD:
[Fri Nov  4 17:42:41 2022] [&amp;lt;0&amp;gt;] ldlm_completion_ast+0x7ac/0x900 [ptlrpc]
[Fri Nov  4 17:42:41 2022] [&amp;lt;0&amp;gt;] ldlm_cli_enqueue_fini+0xa4d/0xf40 [ptlrpc]
[Fri Nov  4 17:42:41 2022] [&amp;lt;0&amp;gt;] ldlm_cli_enqueue+0x61d/0xa70 [ptlrpc]
[Fri Nov  4 17:42:41 2022] [&amp;lt;0&amp;gt;] osp_md_object_lock+0x1cd/0x2c0 [osp]
[Fri Nov  4 17:42:41 2022] [&amp;lt;0&amp;gt;] lod_object_lock+0x132/0x7f0 [lod]
[Fri Nov  4 17:42:41 2022] [&amp;lt;0&amp;gt;] mdt_remote_object_lock_try+0x186/0x3c0 [mdt]
[Fri Nov  4 17:42:41 2022] [&amp;lt;0&amp;gt;] mdt_remote_object_lock+0x1f/0x30 [mdt]
[Fri Nov  4 17:42:41 2022] [&amp;lt;0&amp;gt;] mdt_rename_lock+0x26b/0x3a0 [mdt]
[Fri Nov  4 17:42:41 2022] [&amp;lt;0&amp;gt;] mdt_reint_migrate+0x5bd/0x1430 [mdt]
[Fri Nov  4 17:42:41 2022] [&amp;lt;0&amp;gt;] mdt_reint_rec+0x117/0x270 [mdt]
[Fri Nov  4 17:42:41 2022] [&amp;lt;0&amp;gt;] mdt_reint_internal+0x4bc/0x7d0 [mdt]
[Fri Nov  4 17:42:41 2022] [&amp;lt;0&amp;gt;] mdt_reint+0x5d/0x110 [mdt]
[Fri Nov  4 17:42:41 2022] [&amp;lt;0&amp;gt;] tgt_request_handle+0xc8c/0x19c0 [ptlrpc]
[Fri Nov  4 17:42:41 2022] [&amp;lt;0&amp;gt;] ptlrpc_server_handle_request+0x31d/0xbc0 [ptlrpc]
[Fri Nov  4 17:42:41 2022] [&amp;lt;0&amp;gt;] ptlrpc_main+0xc0b/0x1560 [ptlrpc]
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                            <comment id="382558" author="adilger" created="Tue, 15 Aug 2023 21:01:11 +0000"  >&lt;p&gt;+1 on master racer with same &lt;tt&gt;mdt_reint_migrate()&lt;/tt&gt; + &lt;tt&gt;mdt_rename_lock()&lt;/tt&gt; stack traces on MDS and stuck &lt;tt&gt;mv&lt;/tt&gt; processes on client.&lt;br/&gt;
&lt;a href=&quot;https://testing.whamcloud.com/test_sets/b3a6dd16-2b8b-4ef7-9be6-59a09053aa7a&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://testing.whamcloud.com/test_sets/b3a6dd16-2b8b-4ef7-9be6-59a09053aa7a&lt;/a&gt;&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|i02gk7:</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>