<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 03:05:52 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-13984] Failing to send lock callbacks keeps a CPU busy</title>
                <link>https://jira.whamcloud.com/browse/LU-13984</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;When a target sends a callback RPC to a dead client, the thread handling the RPC which triggered the lock callback RPC will keep a CPU busy until the client is eventually evicted. The dead client is supposed to be evicted by lock callback timeout, but depending on the server activity, this could not work and it will be evicted by ping_evictor instead, keeping the service thread busy 50% longer. It could also trigger behavior like &quot;&lt;em&gt;Already past deadline, not sending early reply&lt;/em&gt;&quot; or &quot;&lt;em&gt;Request took longer than estimated, client may timeout&lt;/em&gt;&quot;.&lt;/p&gt;

&lt;p&gt;The more you trigger callback RPC like that, the more you keep service threads busy.&lt;/p&gt;

&lt;p&gt;This issue was detected with Lustre 2.10 but was reproduced with &apos;master&apos; branch. Due to all the changes related to MR, some error message patterns are slightly different but the CPU usage is still there. Here is the error logs using &lt;tt&gt;master&lt;/tt&gt;:&lt;/p&gt;

&lt;p&gt;&#160;&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;[Wed Sep 23 12:41:18 2020] Lustre: 12549:0:(client.c:2261:ptlrpc_expire_one_request()) @@@ Request sent has timed out for slow reply: [sent 1600864873/real 1600864873] req@ffff9db643cb3180 x1678624839367552/t0(0) o106-&amp;gt;lustre-OST0002@172.31.46.180@tcp:15/16 lens 328/280 e 0 to 1 dl 1600864880 ref 1 fl Rpc:XQr/0/ffffffff rc 0/-1 job:&apos;&apos;
 [Wed Sep 23 12:41:18 2020] Lustre: 12549:0:(client.c:2261:ptlrpc_expire_one_request()) Skipped 15303010 previous similar messages
 [Wed Sep 23 12:41:39 2020] Lustre: 12549:0:(client.c:2261:ptlrpc_expire_one_request()) @@@ Request sent has timed out for sent delay: [sent 1600864894/real 1600864887] req@ffff9db643cb3180 x1678624839367552/t0(0) o106-&amp;gt;lustre-OST0002@172.31.46.180@tcp:15/16 lens 328/280 e 0 to 1 dl 1600864901 ref 2 fl Rpc:Xr/2/ffffffff rc 0/-1 job:&apos;&apos;
 [Wed Sep 23 12:41:39 2020] Lustre: 12549:0:(client.c:2261:ptlrpc_expire_one_request()) Skipped 2 previous similar messages
 [Wed Sep 23 12:42:11 2020] Lustre: 12549:0:(client.c:2261:ptlrpc_expire_one_request()) @@@ Request sent has failed due to network error: [sent 1600864933/real 1600864933] req@ffff9db643cb3180 x1678624839367552/t0(0) o106-&amp;gt;lustre-OST0002@172.31.46.180@tcp:15/16 lens 328/280 e 0 to 1 dl 1600864940 ref 1 fl Rpc:eXQr/2/ffffffff rc 0/-1 job:&apos;&apos;
 [Wed Sep 23 12:42:11 2020] Lustre: 12549:0:(client.c:2261:ptlrpc_expire_one_request()) Skipped 973802 previous similar messages
 [Wed Sep 23 12:42:23 2020] LustreError: 13285:0:(sec.c:2515:sptlrpc_svc_unwrap_bulk()) @@@ truncated bulk GET 0(4096) req@ffff9db646aa6c00 x1678628476684464/t0(0) o4-&amp;gt;890b8b6c-6958-af76-fd7e-75d275c07381@172.31.46.180@tcp:703/0 lens 608/448 e 3 to 0 dl 1600864953 ref 1 fl Interpret:/0/0 rc 0/0 job:&apos;dd.0&apos;
 [Wed Sep 23 12:42:23 2020] Lustre: lustre-OST0002: Bulk IO write error with 890b8b6c-6958-af76-fd7e-75d275c07381 (at 172.31.46.180@tcp), client will retry: rc = -110
 [Wed Sep 23 12:43:15 2020] Lustre: 12549:0:(client.c:2261:ptlrpc_expire_one_request()) @@@ Request sent has failed due to network error: [sent 1600864997/real 1600864997] req@ffff9db643cb3180 x1678624839367552/t0(0) o106-&amp;gt;lustre-OST0002@172.31.46.180@tcp:15/16 lens 328/280 e 0 to 1 dl 1600865004 ref 1 fl Rpc:eXQr/2/ffffffff rc 0/-1 job:&apos;&apos;
 [Wed Sep 23 12:43:15 2020] Lustre: 12549:0:(client.c:2261:ptlrpc_expire_one_request()) Skipped 8141422 previous similar messages
 [Wed Sep 23 12:44:31 2020] Lustre: ll_ost00_004: service thread pid 12549 was inactive for 200.396 seconds. The thread might be hung, or it might only be slow and will resume later. Dumping the stack trace for debugging purposes:
 [Wed Sep 23 12:44:31 2020] Pid: 12549, comm: ll_ost00_004 3.10.0-957.1.3.el7.x86_64 #1 SMP Thu Nov 15 17:36:42 UTC 2018
 [Wed Sep 23 12:44:31 2020] Call Trace:
 [Wed Sep 23 12:44:31 2020] [&amp;lt;ffffffffffffffff&amp;gt;] 0xffffffffffffffff
 [Wed Sep 23 12:44:51 2020] Lustre: lustre-OST0000: haven&apos;t heard from client 890b8b6c-6958-af76-fd7e-75d275c07381 (at 172.31.46.180@tcp) in 229 seconds. I think it&apos;s dead, and I am evicting it. exp ffff9db9bc393400, cur 1600865094 expire 1600864944 last 1600864865
 [Wed Sep 23 12:44:51 2020] Lustre: Skipped 1 previous similar message
 [Wed Sep 23 12:44:56 2020] Lustre: lustre-OST0001: haven&apos;t heard from client 890b8b6c-6958-af76-fd7e-75d275c07381 (at 172.31.46.180@tcp) in 233 seconds. I think it&apos;s dead, and I am evicting it. exp ffff9db9bc393000, cur 1600865098 expire 1600864948 last 1600864865
 [Wed Sep 23 12:44:56 2020] LustreError: 12549:0:(client.c:1266:ptlrpc_import_delay_req()) @@@ IMP_CLOSED req@ffff9db643cb3180 x1678624839367552/t0(0) o106-&amp;gt;lustre-OST0002@172.31.46.180@tcp:15/16 lens 328/280 e 0 to 1 dl 1600865106 ref 1 fl Rpc:EeXQU/2/ffffffff rc -5/-1 job:&apos;&apos;
 [Wed Sep 23 12:44:57 2020] Lustre: lustre-MDT0000: haven&apos;t heard from client 890b8b6c-6958-af76-fd7e-75d275c07381 (at 172.31.46.180@tcp) in 229 seconds. I think it&apos;s dead, and I am evicting it. exp ffff9db97ce11000, cur 1600865100 expire 1600864950 last 1600864871
 [Wed Sep 23 12:44:57 2020] Lustre: Skipped 1 previous similar message
 [Wed Sep 23 12:45:01 2020] Lustre: MGS: haven&apos;t heard from client 1c674e35-afaf-9ebd-a75e-6b29d3669249 (at 172.31.46.180@tcp) in 239 seconds. I think it&apos;s dead, and I am evicting it. exp ffff9db97ce10000, cur 1600865104 expire 1600864954 last 1600864865
 [Wed Sep 23 12:50:18 2020] LNetError: 10741:0:(lib-move.c:3744:lnet_handle_recovery_reply()) peer NI (172.31.46.180@tcp) recovery failed with -5
 [Wed Sep 23 12:50:18 2020] LNetError: 10741:0:(lib-move.c:3744:lnet_handle_recovery_reply()) Skipped 540 previous similar messages&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Note the high value of: `&lt;tt&gt;Skipped 8141422 previous similar messages&lt;/tt&gt;`&lt;/p&gt;
&lt;h4&gt;&lt;a name=&quot;%C2%A0&quot;&gt;&lt;/a&gt;&#160;&lt;/h4&gt;
&lt;h4&gt;&lt;a name=&quot;Stepstoreproduce&quot;&gt;&lt;/a&gt;Steps to reproduce&lt;/h4&gt;

&lt;p&gt;This issue could be reproduced using test framework to start a filesystem and 2 other clients.&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;On client A, start writing to a file and reboot the host without any cleaning to simulate a host crash&lt;/li&gt;
	&lt;li&gt;&#160;On client B, try to read the file after client A just crashed. Client B process will hang, waiting for lock completion.&lt;/li&gt;
	&lt;li&gt;On the OST where the file is located, you should start seeing the request timeout error messages and the load increasing after tens of seconds (tested with ksocklnd).&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;&#160;&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;
clientA $ (sudo dd &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt;=/dev/zero of=/mnt/lustre/callback bs=4k count=1M &amp;amp;); sleep 1; sudo reboot -nff
clientB $ dd &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt;=/mnt/lustre/callback count=1 &amp;gt;/dev/&lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;
 (hang)
oss1 $ # see load increasing after ~100 sec and a service thread at 100%&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;h4&gt;&lt;a name=&quot;Analysis&quot;&gt;&lt;/a&gt;Analysis&lt;/h4&gt;

&lt;p&gt;The thread is looping with the following stack trace:&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;
 ptlrpc_set_wait
 ldlm_run_ast_work
 ldlm_glimpse_locks
 ofd_intent_policy
 ...&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&lt;tt&gt;ptlrpc_set_wait()&lt;/tt&gt; is calling &lt;tt&gt;ptlrpc_check_set()&lt;/tt&gt; -&amp;gt; &lt;tt&gt;ptlrpc_expire_one_request()&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;ptlrpc_check_set() will be always trying to resend the callback, which will by every few seconds at the beginning, as the socket still exists. It will retry after each request deadline, until the socket timeout is eventually reached and this socket is closed. At that point, re-sending the RPC will fail right away (ENOTCONN). l_wait_event() in ptlrpc_set_wait() will keep calling ptlrpc_check_set() which will fail to send the RPC. The thread will be churning into that code path until the client is eventually evicted.&lt;/p&gt;

&lt;p&gt;I&apos;m proposing a patch which avoid re-resending a RPC if it was send less than a second ago and failed due to network error.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</description>
                <environment></environment>
        <key id="60919">LU-13984</key>
            <summary>Failing to send lock callbacks keeps a CPU busy</summary>
                <type id="1" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="4" iconUrl="https://jira.whamcloud.com/images/icons/priorities/minor.svg">Minor</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="degremoa">Aurelien Degremont</assignee>
                                    <reporter username="degremoa">Aurelien Degremont</reporter>
                        <labels>
                    </labels>
                <created>Wed, 23 Sep 2020 19:17:30 +0000</created>
                <updated>Tue, 3 Nov 2020 05:11:08 +0000</updated>
                            <resolved>Tue, 3 Nov 2020 05:11:08 +0000</resolved>
                                    <version>Lustre 2.10.5</version>
                    <version>Lustre 2.14.0</version>
                                    <fixVersion>Lustre 2.14.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>4</watches>
                                                                            <comments>
                            <comment id="280441" author="gerrit" created="Wed, 23 Sep 2020 19:26:33 +0000"  >&lt;p&gt;Aurelien Degremont (degremoa@amazon.com) uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/40020&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/40020&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-13984&quot; title=&quot;Failing to send lock callbacks keeps a CPU busy&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-13984&quot;&gt;&lt;del&gt;LU-13984&lt;/del&gt;&lt;/a&gt; ptlrpc: throttle RPC resend if network error&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 4c8fa28ace5833adfe0f1e3af02af55780749551&lt;/p&gt;</comment>
                            <comment id="284078" author="gerrit" created="Tue, 3 Nov 2020 03:40:14 +0000"  >&lt;p&gt;Oleg Drokin (green@whamcloud.com) merged in patch &lt;a href=&quot;https://review.whamcloud.com/40020/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/40020/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-13984&quot; title=&quot;Failing to send lock callbacks keeps a CPU busy&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-13984&quot;&gt;&lt;del&gt;LU-13984&lt;/del&gt;&lt;/a&gt; ptlrpc: throttle RPC resend if network error&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: 4103527c1c9b38cb60c95a8f0ace2da1d246c3fc&lt;/p&gt;</comment>
                            <comment id="284095" author="pjones" created="Tue, 3 Nov 2020 05:11:08 +0000"  >&lt;p&gt;Landed for 2.14&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                        <issuelink>
            <issuekey id="25649">LU-5368</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </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|i01amn:</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>