<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 03:19:45 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-15605] OSS deadlock when running many lfs_migrate processes</title>
                <link>https://jira.whamcloud.com/browse/LU-15605</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;Last Friday, we hit a deadlock on an OSS of Oak (running Lustre 2.12.7), where many kernel threads became blocked in &lt;tt&gt;start_this_handle()&lt;/tt&gt;. It&apos;s the first time we see that and I believe it is due to us running 24 parallel &lt;tt&gt;lfs_migrate&lt;/tt&gt; for OST to OST migration. The load of the OSS increased dramatically to 500+ but almost no I/O was performed on disks anymore. We had to reboot the server to get out of this situation. We have also paused our OST to OST data migration until we know more.&lt;/p&gt;

&lt;p&gt;I captured a vmcore to further investigate the issue.&lt;/p&gt;

&lt;p&gt;Checking other Lustre tickets on this Jira, this problem looks similar to &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-15117&quot; title=&quot;ofd_read_lock vs transaction deadlock while allocating buffers	&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-15117&quot;&gt;&lt;del&gt;LU-15117&lt;/del&gt;&lt;/a&gt; and I wonder if it is also related to EDU-190 (however, in our case, please note that only CentOS 7 is used).&lt;/p&gt;

&lt;p&gt;A typical blocked thread is:&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;PID: 229507  TASK: ffff918339656300  CPU: 2   COMMAND: &quot;ll_ost00_090&quot;
 #0 [ffff9182803d7948] __schedule at ffffffffa2f86d07
 #1 [ffff9182803d79d0] schedule at ffffffffa2f87229
 #2 [ffff9182803d79e0] wait_transaction_locked at ffffffffc0275085 [jbd2]
 #3 [ffff9182803d7a38] add_transaction_credits at ffffffffc0275378 [jbd2]
 #4 [ffff9182803d7a98] start_this_handle at ffffffffc0275601 [jbd2]
 #5 [ffff9182803d7b30] jbd2__journal_start at ffffffffc0275ab3 [jbd2]
 #6 [ffff9182803d7b78] __ldiskfs_journal_start_sb at ffffffffc14425b9 [ldiskfs]
 #7 [ffff9182803d7bb8] osd_trans_start at ffffffffc1516e8e [osd_ldiskfs]
 #8 [ffff9182803d7bf0] ofd_trans_start at ffffffffc1679425 [ofd]
 #9 [ffff9182803d7c20] ofd_attr_set at ffffffffc167ca73 [ofd]
#10 [ffff9182803d7c78] ofd_setattr_hdl at ffffffffc1668dcd [ofd]
#11 [ffff9182803d7cd0] tgt_request_handle at ffffffffc10e789a [ptlrpc]
#12 [ffff9182803d7d58] ptlrpc_server_handle_request at ffffffffc108c73b [ptlrpc]
#13 [ffff9182803d7df8] ptlrpc_main at ffffffffc10900a4 [ptlrpc]
#14 [ffff9182803d7ec8] kthread at ffffffffa28c5c21
#15 [ffff9182803d7f50] ret_from_fork_nospec_begin at ffffffffa2f94ddd
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;I don&apos;t know which thread is holding the transaction. Also, we have 40 OSTs on this OSS, so that probably makes it harder to find out. But some threads are in &lt;tt&gt;osd_write_lock()&lt;/tt&gt; as reported in &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-15117&quot; title=&quot;ofd_read_lock vs transaction deadlock while allocating buffers	&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-15117&quot;&gt;&lt;del&gt;LU-15117&lt;/del&gt;&lt;/a&gt;:&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;PID: 143327  TASK: ffff9169e5f84200  CPU: 3   COMMAND: &quot;ll_ost_out01_00&quot;
 #0 [ffff91a1b3e4f8f8] __schedule at ffffffffa2f86d07
 #1 [ffff91a1b3e4f980] schedule at ffffffffa2f87229
 #2 [ffff91a1b3e4f990] rwsem_down_write_failed at ffffffffa2f88965
 #3 [ffff91a1b3e4fa28] call_rwsem_down_write_failed at ffffffffa2b97767
 #4 [ffff91a1b3e4fa70] down_write at ffffffffa2f8655d
 #5 [ffff91a1b3e4fa88] osd_write_lock at ffffffffc150ae8c [osd_ldiskfs]
 #6 [ffff91a1b3e4fab0] out_tx_xattr_set_exec at ffffffffc10f3a8b [ptlrpc]
 #7 [ffff91a1b3e4fb50] out_tx_end at ffffffffc10ec741 [ptlrpc]
 #8 [ffff91a1b3e4fb90] out_handle at ffffffffc10f0962 [ptlrpc]
 #9 [ffff91a1b3e4fcd0] tgt_request_handle at ffffffffc10e789a [ptlrpc]
#10 [ffff91a1b3e4fd58] ptlrpc_server_handle_request at ffffffffc108c73b [ptlrpc]
#11 [ffff91a1b3e4fdf8] ptlrpc_main at ffffffffc10900a4 [ptlrpc]
#12 [ffff91a1b3e4fec8] kthread at ffffffffa28c5c21
#13 [ffff91a1b3e4ff50] ret_from_fork_nospec_begin at ffffffffa2f94ddd
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;We haven&apos;t seen this problem when running a lower number of parallel &lt;tt&gt;lfs_migrate&lt;/tt&gt; processes,&#160;like 8, which we have been doing for days without hitting this. But on Friday, we did ramp up the OST-to-OST data migration by increasing the number of parallel workers to 16 and finally up to 24 concurrent &lt;tt&gt;lfs_migrate&lt;/tt&gt; (each working on a different file list generated by lfs find + fpart). This last, more aggressive configuration ran for a few hours before we hit this deadlock on one OSS &lt;tt&gt;oak-io6-s2&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;&lt;tt&gt;lfs_migrate&lt;/tt&gt;, which uses &lt;tt&gt;lfs migrate&lt;/tt&gt;, performs the data transfer into a volatile file as root and when this is done, seems to do an explicit &lt;tt&gt;chown&lt;/tt&gt; which, if I&apos;m not wrong, will propagate to the OSTs as &lt;tt&gt;ofd_attr_set&lt;/tt&gt;. In the crash dump, we can see many of those.&lt;/p&gt;

&lt;p&gt;I&apos;m attaching the output of &quot;foreach bt&quot; from the vmcore we took and just uploaded the vmcore itself to the Whamcloud FTP as &lt;tt&gt;vmcore-oak-io6-s2_2022-02-25-18-13-45&lt;/tt&gt; (md5: &lt;tt&gt;a850b3d9af0ac70732023b6e756ab188&lt;/tt&gt;).&lt;/p&gt;</description>
                <environment>CentOS 7.9 (3.10.0-1160.6.1.el7_lustre.pl1.x86_64); clients running Lustre 2.12.8</environment>
        <key id="68897">LU-15605</key>
            <summary>OSS deadlock when running many lfs_migrate processes</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="bzzz">Alex Zhuravlev</assignee>
                                    <reporter username="sthiell">Stephane Thiell</reporter>
                        <labels>
                    </labels>
                <created>Mon, 28 Feb 2022 18:36:16 +0000</created>
                <updated>Tue, 1 Mar 2022 18:53:37 +0000</updated>
                                            <version>Lustre 2.12.7</version>
                                                        <due></due>
                            <votes>0</votes>
                                    <watches>6</watches>
                                                                            <comments>
                            <comment id="327747" author="pjones" created="Tue, 1 Mar 2022 15:21:59 +0000"  >&lt;p&gt;Alex&lt;/p&gt;

&lt;p&gt;Could you please advise?&lt;/p&gt;

&lt;p&gt;Thanks&lt;/p&gt;

&lt;p&gt;Peter&lt;/p&gt;</comment>
                            <comment id="327749" author="bzzz" created="Tue, 1 Mar 2022 15:37:31 +0000"  >&lt;p&gt;I&apos;m looking at the traces.. can you please attach dmesg from vmcore?&lt;/p&gt;</comment>
                            <comment id="327759" author="sthiell" created="Tue, 1 Mar 2022 16:12:06 +0000"  >&lt;p&gt;Thanks! Alex, I just attached it as &lt;span class=&quot;nobr&quot;&gt;&lt;a href=&quot;https://jira.whamcloud.com/secure/attachment/42534/42534_dmesg_oak-io6-s2_2022-02-25-18-13-45.log&quot; title=&quot;dmesg_oak-io6-s2_2022-02-25-18-13-45.log attached to LU-15605&quot;&gt;dmesg_oak-io6-s2_2022-02-25-18-13-45.log&lt;sup&gt;&lt;img class=&quot;rendericon&quot; src=&quot;https://jira.whamcloud.com/images/icons/link_attachment_7.gif&quot; height=&quot;7&quot; width=&quot;7&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/sup&gt;&lt;/a&gt;&lt;/span&gt; &lt;br/&gt;
I think the problem started around this line:&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;[14611341.653001] INFO: task ll_ost_io00_001:199270 blocked for more than 120 seconds.
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                            <comment id="327762" author="bzzz" created="Tue, 1 Mar 2022 16:23:26 +0000"  >&lt;p&gt;AFAICS, this one is missing in the version: &lt;a href=&quot;https://review.whamcloud.com/31293&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/31293&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="327765" author="sthiell" created="Tue, 1 Mar 2022 16:38:24 +0000"  >&lt;p&gt;Oh! Interesting! Our servers are based on 2.12.7 which contains &quot;&lt;a href=&quot;https://jira.whamcloud.com/browse/LU-10048&quot; title=&quot;osd-ldiskfs to truncate outside of main transaction&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-10048&quot;&gt;&lt;del&gt;LU-10048&lt;/del&gt;&lt;/a&gt; osd: async truncate&quot; but NOT &quot;&lt;a href=&quot;https://jira.whamcloud.com/browse/LU-10048&quot; title=&quot;osd-ldiskfs to truncate outside of main transaction&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-10048&quot;&gt;&lt;del&gt;LU-10048&lt;/del&gt;&lt;/a&gt; ofd: take local locks within transaction&quot; (31293). Do you think that&apos;s the one? Is there a backport to b2_12? Thanks!!&lt;/p&gt;</comment>
                            <comment id="327766" author="sthiell" created="Tue, 1 Mar 2022 16:48:05 +0000"  >&lt;p&gt;Hi Alex,&lt;/p&gt;

&lt;p&gt;This one: &lt;a href=&quot;https://review.whamcloud.com/#/c/43278/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/#/c/43278/&lt;/a&gt;&lt;br/&gt;
&quot;&lt;a href=&quot;https://jira.whamcloud.com/browse/LU-13093&quot; title=&quot;osd_trans_exec_check()) lustre-OST0001: opcode 0: used 8, used now 8, reserved 1 LBUG&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-13093&quot;&gt;&lt;del&gt;LU-13093&lt;/del&gt;&lt;/a&gt; osd: fix osd_attr_set race&quot;&lt;/p&gt;

&lt;p&gt;has not landed into 2.12 either.&lt;/p&gt;</comment>
                            <comment id="327784" author="sthiell" created="Tue, 1 Mar 2022 18:53:37 +0000"  >&lt;p&gt;Looks like Etienne back ported &quot;&lt;a href=&quot;https://jira.whamcloud.com/browse/LU-10048&quot; title=&quot;osd-ldiskfs to truncate outside of main transaction&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-10048&quot;&gt;&lt;del&gt;LU-10048&lt;/del&gt;&lt;/a&gt; ofd: take local locks within transaction&quot; to b2_12 in &#160;&lt;a href=&quot;https://review.whamcloud.com/#/c/43277/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/#/c/43277/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We could try to apply both patches like they did in &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-10048&quot; title=&quot;osd-ldiskfs to truncate outside of main transaction&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-10048&quot;&gt;&lt;del&gt;LU-10048&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                            <attachment id="42534" name="dmesg_oak-io6-s2_2022-02-25-18-13-45.log" size="1061407" author="sthiell" created="Tue, 1 Mar 2022 16:10:10 +0000"/>
                            <attachment id="42520" name="foreach_bt_oak-io6-s2_2022-02-25-18-13-45.log" size="3030790" author="sthiell" created="Mon, 28 Feb 2022 18:08:45 +0000"/>
                    </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|i02jlz:</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>