<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 03:28:47 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-16644] LNetError kiblnd_connect_peer() Can&apos;t resolve addr for 192.168.112.4@o2ib17: -13</title>
                <link>https://jira.whamcloud.com/browse/LU-16644</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;Intermittent console messages like this:&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 Mar 15 16:54:55 2023] LNetError: 3119923:0:(o2iblnd_cb.c:1473:kiblnd_connect_peer()) Can&apos;t resolve addr for 192.168.112.4@o2ib17: -13
[Wed Mar 15 17:15:15 2023] LNetError: 3124466:0:(o2iblnd_cb.c:1473:kiblnd_connect_peer()) Can&apos;t resolve addr for 192.168.112.4@o2ib17: -13
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;along with other messages indicating LNet routes are down:&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 Mar 15 17:15:15 2023] LNetError: 31377:0:(lib-move.c:2005:lnet_handle_find_routed_path()) no route to 172.21.3.62@o2ib700 from &amp;lt;?&amp;gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;and possibly other LustreError messages.&lt;/p&gt;

&lt;p&gt;The error emitted by kiblnd_connect_peer() is coming from calls to rdma_resolve_addr(), like so:&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;kiblnd_connect_peer() -&amp;gt; kiblnd_resolve_addr() -&amp;gt;rdma_resolve_addr()
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;where the actual call looks like&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;        /* look for a free privileged port */
        for (port = PROT_SOCK-1; port &amp;gt; 0; port--) {
                srcaddr-&amp;gt;sin_port = htons(port);
                rc = rdma_resolve_addr(cmid,
                                       (struct sockaddr *)srcaddr,
                                       (struct sockaddr *)dstaddr,
                                       timeout_ms);

&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Lustre 2.12.9 does not have either of these patches:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;30b356a28b &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-14296&quot; title=&quot;really raise CAP_NET_BIND_SERVICE before calling rdma_resolve_addr()&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-14296&quot;&gt;&lt;del&gt;LU-14296&lt;/del&gt;&lt;/a&gt; lnet: use an unbound cred in kiblnd_resolve_addr()&lt;/li&gt;
	&lt;li&gt;1e4bd16acf &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-14006&quot; title=&quot;raise CAP_NET_BIND_SERVICE before calling rdma_resolve_addr()&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-14006&quot;&gt;&lt;del&gt;LU-14006&lt;/del&gt;&lt;/a&gt; o2ib: raise bind cap before resolving address&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;I can pull these patches onto our stack and push them to b2_12 for testing and review, but I don&apos;t understand two things:&lt;/p&gt;

&lt;p&gt;(1) We see this routinely on one fairly small cluster (&amp;lt;100 nodes), and almost never on any other cluster (collectively, &amp;gt;5000 nodes). Do you know why this would be?&lt;/p&gt;

&lt;p&gt;(2) I added some debugging and was able to determine that when I see this, some threads have CAP_NET_BIND_SERVICE and so the rdma_resolve_addr() calls succeed, and other threads do not have it. Is there a reason that all the lnet threads involved in connection setup would not all have the same capabilities?&lt;/p&gt;

&lt;p&gt;Those questions make me wonder if the problem is really elsewhere, e.g. some code that drops capabilities and then fails to restore them after it&apos;s finished with the sensitive task.&lt;/p&gt;

&lt;p&gt;For my records, my local ticket is TOSS5940&lt;/p&gt;</description>
                <environment>lustre-2.12.9_3.llnl-3.t4.x86_64&lt;br/&gt;
toss-4.5-4&lt;br/&gt;
4.18.0-425.13.1.1toss.t4.x86_64</environment>
        <key id="75083">LU-16644</key>
            <summary>LNetError kiblnd_connect_peer() Can&apos;t resolve addr for 192.168.112.4@o2ib17: -13</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="3">Duplicate</resolution>
                                        <assignee username="ssmirnov">Serguei Smirnov</assignee>
                                    <reporter username="ofaaland">Olaf Faaland</reporter>
                        <labels>
                    </labels>
                <created>Fri, 17 Mar 2023 03:28:58 +0000</created>
                <updated>Fri, 21 Apr 2023 14:01:14 +0000</updated>
                            <resolved>Fri, 21 Apr 2023 14:01:05 +0000</resolved>
                                    <version>Lustre 2.12.9</version>
                                                        <due></due>
                            <votes>0</votes>
                                    <watches>4</watches>
                                                                            <comments>
                            <comment id="366209" author="ofaaland" created="Fri, 17 Mar 2023 03:29:42 +0000"  >&lt;p&gt;Related to &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-14006&quot; title=&quot;raise CAP_NET_BIND_SERVICE before calling rdma_resolve_addr()&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-14006&quot;&gt;&lt;del&gt;LU-14006&lt;/del&gt;&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="366275" author="pjones" created="Fri, 17 Mar 2023 17:03:40 +0000"  >&lt;p&gt;Serguei&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="366513" author="ssmirnov" created="Mon, 20 Mar 2023 19:03:09 +0000"  >&lt;p&gt;Hi Olaf,&lt;/p&gt;

&lt;p&gt;At this point I don&apos;t have definitive answers to the questions you posted, but here are some ideas for clarification.&lt;/p&gt;

&lt;p&gt;I guess before pulling the patches you mentioned, you could experiment with &quot;options ko2iblnd use_privileged_port=&lt;b&gt;0&lt;/b&gt;&quot;.&#160;&lt;/p&gt;

&lt;p&gt;The reason for the &quot;-13&quot; error may be exhausting the local ports needed to bind to when resolving the IP address.&#160;&lt;/p&gt;

&lt;p&gt;We could check if recovery activities may be interfering by taking a look at the recovery queues:&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;
lnetctl debug recovery --peer
lnetctl debug recovery --local&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;long recovery queues may contribute to port exhaustion.&#160;&lt;/p&gt;

&lt;p&gt;We can also take a look at opensm logs to check if there are any indications of the problem on that level. I wonder if there&apos;s anything going on there which could explain &quot;no route to&quot; errors.&lt;/p&gt;

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

&lt;p&gt;Serguei.&lt;/p&gt;</comment>
                            <comment id="366697" author="ofaaland" created="Tue, 21 Mar 2023 16:17:39 +0000"  >&lt;p&gt;Hi Serguei,&lt;/p&gt;

&lt;p&gt;We checked opensm logs and also tested with other tools such as ib_read_bw, ping, etc. We found no evidence of problems with the IB fabric.&lt;/p&gt;

&lt;p&gt;We never see the CERROR &quot;Failed to bind to a free privileged port&quot; in the console logs, so I conclude we have never exhausted the local ports.&#160; &#160;Also, in cases where my debug patch reported more information about the failure, the local port number that was tried was 1023.&#160; The output is like this:&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;416421:2023-03-16 19:39:16.142718 00000800:00000200:3.0::0:416421:0:(o2iblnd_cb.c:1420:kiblnd_resolve_addr()) bind to port 1023 failed: -13
416421:2023-03-16 19:40:25.774547 00000800:00000200:3.0::0:416421:0:(o2iblnd_cb.c:1420:kiblnd_resolve_addr()) bind to port 1023 failed: -13&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Since there&apos;s no evidence of port exhaustion, should I still look at the recovery debug output?&lt;/p&gt;

&lt;p&gt;thanks,&lt;br/&gt;
Olaf&lt;/p&gt;</comment>
                            <comment id="366725" author="ssmirnov" created="Tue, 21 Mar 2023 19:49:21 +0000"  >&lt;p&gt;It is good to rule out opensm issues. If there&apos;s no evidence of port exhaustion, I think long recovery queues are unlikely to be the problem. You may still experiment with &quot;use_privileged_port=0&quot; setting though as this test should be able to confirm whether porting the capability fixes is going to help.&lt;/p&gt;

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

&lt;p&gt;Serguei.&lt;/p&gt;</comment>
                            <comment id="369522" author="hornc" created="Fri, 14 Apr 2023 17:16:40 +0000"  >&lt;blockquote&gt;&lt;p&gt;(2) I added some debugging and was able to determine that when I see this, some threads have CAP_NET_BIND_SERVICE and so the rdma_resolve_addr() calls succeed, and other threads do not have it. Is there a reason that all the lnet threads involved in connection setup would not all have the same capabilities?&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;It is possible for application threads to trigger connection attempts and they will then run into the capabilities issue. It is easy to reproduce by running mdtest and then inducing network errors with net drop rules.&lt;/p&gt;
</comment>
                            <comment id="369523" author="hornc" created="Fri, 14 Apr 2023 17:18:52 +0000"  >&lt;p&gt;For example, this is ftrace data that was gathered while we were investigating this issue. The application is the mdtest benchmark program. An open() syscall results in the failing call to rdma_resolve_addr():&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;         mdtest-677   [018] .... 614101.377767: &amp;lt;stack trace&amp;gt;
 =&amp;gt; rdma_resolve_addr+0x1/0x7c0 [rdma_cm]
 =&amp;gt; kiblnd_connect_peer+0x204/0x660 [ko2iblnd]
 =&amp;gt; kiblnd_launch_tx+0x96d/0xbe0 [ko2iblnd]
 =&amp;gt; kiblnd_send+0x1f6/0x9b0 [ko2iblnd]
 =&amp;gt; lnet_ni_send+0x42/0xd0 [lnet]
 =&amp;gt; lnet_post_send_locked+0x115/0x620 [lnet]
 =&amp;gt; lnet_return_tx_credits_locked+0x1f2/0x4e0 [lnet]
 =&amp;gt; lnet_msg_decommit+0x102/0x6c0 [lnet]
 =&amp;gt; lnet_finalize+0x407/0x900 [lnet]
 =&amp;gt; kiblnd_tx_done+0xf9/0x3a0 [ko2iblnd]
 =&amp;gt; kiblnd_txlist_done+0x5f/0x80 [ko2iblnd]
 =&amp;gt; kiblnd_peer_connect_failed+0x184/0x320 [ko2iblnd]
 =&amp;gt; kiblnd_connect_peer+0x3e1/0x660 [ko2iblnd]
 =&amp;gt; kiblnd_launch_tx+0x96d/0xbe0 [ko2iblnd]
 =&amp;gt; kiblnd_send+0x1f6/0x9b0 [ko2iblnd]
 =&amp;gt; lnet_ni_send+0x42/0xd0 [lnet]
 =&amp;gt; lnet_send+0x97/0x1d0 [lnet]
 =&amp;gt; LNetPut+0x2c0/0x920 [lnet]
 =&amp;gt; ptl_send_buf+0x206/0x560 [ptlrpc]
 =&amp;gt; ptl_send_rpc+0x93e/0xea0 [ptlrpc]
 =&amp;gt; ptlrpc_send_new_req+0x585/0x9d0 [ptlrpc]
 =&amp;gt; ptlrpc_set_wait+0x28e/0x730 [ptlrpc]
 =&amp;gt; ptlrpc_queue_wait+0x82/0x230 [ptlrpc]
 =&amp;gt; ldlm_cli_enqueue+0x4c4/0xa50 [ptlrpc]
 =&amp;gt; mdc_enqueue_base+0x31b/0x1af0 [mdc]
 =&amp;gt; mdc_intent_lock+0x2bf/0x4e0 [mdc]
 =&amp;gt; lmv_intent_open+0x248/0xba0 [lmv]
 =&amp;gt; lmv_intent_lock+0x1c5/0x980 [lmv]
 =&amp;gt; ll_lookup_it+0x395/0x1bb0 [lustre]
 =&amp;gt; ll_atomic_open+0x133/0x1020 [lustre]
 =&amp;gt; path_openat+0xd99/0x1520
 =&amp;gt; do_filp_open+0x9b/0x110
 =&amp;gt; do_sys_open+0x1bd/0x260
 =&amp;gt; do_syscall_64+0x5b/0x1e0
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The application thread does not have the CAP_NET_BIND_SERVICE capability, so it is unable to bind to the default privileged port. rdma_bind_addr() fails with -EACCESS.&lt;/p&gt;</comment>
                            <comment id="369524" author="ofaaland" created="Fri, 14 Apr 2023 17:36:35 +0000"  >&lt;p&gt;&amp;gt; It is possible for application threads to trigger connection attempts&lt;/p&gt;

&lt;p&gt;Thanks, Chris&lt;/p&gt;</comment>
                            <comment id="369536" author="ofaaland" created="Fri, 14 Apr 2023 19:13:36 +0000"  >&lt;p&gt;I&apos;d already pulled those two patches into our stack.&#160; In case it&apos;s useful to others, I also pushed those two patches to gerrit against b2_12:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;https://review.whamcloud.com/c/fs/lustre-release/+/50642&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/c/fs/lustre-release/+/50642&lt;/a&gt; &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-14006&quot; title=&quot;raise CAP_NET_BIND_SERVICE before calling rdma_resolve_addr()&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-14006&quot;&gt;&lt;del&gt;LU-14006&lt;/del&gt;&lt;/a&gt; o2ib: raise bind cap before resolving address&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;https://review.whamcloud.com/c/fs/lustre-release/+/50643&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/c/fs/lustre-release/+/50643&lt;/a&gt; &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-14296&quot; title=&quot;really raise CAP_NET_BIND_SERVICE before calling rdma_resolve_addr()&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-14296&quot;&gt;&lt;del&gt;LU-14296&lt;/del&gt;&lt;/a&gt; lnet: use an unbound cred in kiblnd_resolve_addr()&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;&#160;&lt;/p&gt;</comment>
                            <comment id="369538" author="ofaaland" created="Fri, 14 Apr 2023 19:16:44 +0000"  >&lt;p&gt;Serguei,&lt;/p&gt;

&lt;p&gt;I don&apos;t need anything else for this issue.&#160; Since 2.15 is the current stable branch, should we just resolve this ticket now?&lt;/p&gt;

&lt;p&gt;thanks&lt;/p&gt;</comment>
                            <comment id="370129" author="pjones" created="Fri, 21 Apr 2023 14:01:05 +0000"  >&lt;p&gt;I think yes - we can close this ticket as a duplicate&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                        <issuelink>
            <issuekey id="61047">LU-14006</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|i03ggf:</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>