<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 02:39:56 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-10985] Attempting to send a mkdir create intents crashes server</title>
                <link>https://jira.whamcloud.com/browse/LU-10985</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;Testing WBC code against unpatched 2.11 servers it could be easily observed that sending a create intent (a valid intent handled by mdt_intent_reint ) crashes mdt with&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;[  850.056294] LustreError: 2568:0:(layout.c:2398:req_capsule_extend()) ASSERTION( fmt-&amp;gt;rf_fields[i].nr &amp;gt;= old-&amp;gt;rf_fields[i].nr ) failed: 
[  850.058033] LustreError: 2568:0:(layout.c:2398:req_capsule_extend()) LBUG
[  850.058796] Pid: 2568, comm: mdt01_002
[  850.059467] 
Call Trace:
[  850.060682]  [&amp;lt;ffffffffa01ab7ce&amp;gt;] libcfs_call_trace+0x4e/0x60 [libcfs]
[  850.061433]  [&amp;lt;ffffffffa01ab85c&amp;gt;] lbug_with_loc+0x4c/0xb0 [libcfs]
[  850.062203]  [&amp;lt;ffffffffa05b32a9&amp;gt;] req_capsule_extend+0x159/0x1c0 [ptlrpc]
[  850.062920]  [&amp;lt;ffffffffa0c5d237&amp;gt;] mdt_create_unpack+0x157/0x4b0 [mdt]
[  850.063630]  [&amp;lt;ffffffffa0c5dd78&amp;gt;] mdt_reint_unpack+0xa8/0x210 [mdt]
[  850.064290]  [&amp;lt;ffffffffa0c4824f&amp;gt;] mdt_reint_internal+0x3f/0x990 [mdt]
[  850.064992]  [&amp;lt;ffffffffa0c54bc7&amp;gt;] mdt_intent_reint+0x157/0x420 [mdt]
[  850.065693]  [&amp;lt;ffffffffa0c4b8e2&amp;gt;] mdt_intent_opc+0x442/0xad0 [mdt]
[  850.066381]  [&amp;lt;ffffffffa058fdd0&amp;gt;] ? lustre_swab_ldlm_intent+0x0/0x20 [ptlrpc]
[  850.067065]  [&amp;lt;ffffffffa0c533b6&amp;gt;] mdt_intent_policy+0x1a6/0x360 [mdt]
[  850.067786]  [&amp;lt;ffffffffa053ed63&amp;gt;] ldlm_lock_enqueue+0x363/0xa40 [ptlrpc]
[  850.068160]  [&amp;lt;ffffffffa01bcb05&amp;gt;] ? cfs_hash_rw_unlock+0x15/0x20 [libcfs]
[  850.068554]  [&amp;lt;ffffffffa01bfe96&amp;gt;] ? cfs_hash_add+0xa6/0x180 [libcfs]
[  850.068958]  [&amp;lt;ffffffffa05671a3&amp;gt;] ldlm_handle_enqueue0+0x933/0x1540 [ptlrpc]
[  850.069354]  [&amp;lt;ffffffffa058fe50&amp;gt;] ? lustre_swab_ldlm_request+0x0/0x30 [ptlrpc]
[  850.070049]  [&amp;lt;ffffffffa05edd72&amp;gt;] tgt_enqueue+0x62/0x210 [ptlrpc]
[  850.070493]  [&amp;lt;ffffffffa05f424b&amp;gt;] tgt_request_handle+0xb1b/0x15c0 [ptlrpc]
[  850.070889]  [&amp;lt;ffffffffa01b76a7&amp;gt;] ? libcfs_debug_msg+0x57/0x80 [libcfs]
[  850.071272]  [&amp;lt;ffffffffa05995b1&amp;gt;] ptlrpc_server_handle_request+0x261/0xaf0 [ptlrpc]
[  850.071964]  [&amp;lt;ffffffffa059d3ce&amp;gt;] ptlrpc_main+0xabe/0x1fd0 [ptlrpc]
[  850.072373]  [&amp;lt;ffffffff810af904&amp;gt;] ? finish_task_switch+0x44/0x180
[  850.072758]  [&amp;lt;ffffffff81703c00&amp;gt;] ? __schedule+0x240/0x950
[  850.073150]  [&amp;lt;ffffffffa059c910&amp;gt;] ? ptlrpc_main+0x0/0x1fd0 [ptlrpc]
[  850.073545]  [&amp;lt;ffffffff810a2eda&amp;gt;] kthread+0xea/0xf0
[  850.074636]  [&amp;lt;ffffffff810a2df0&amp;gt;] ? kthread+0x0/0xf0
[  850.074997]  [&amp;lt;ffffffff8170fbd8&amp;gt;] ret_from_fork+0x58/0x90
[  850.075354]  [&amp;lt;ffffffff810a2df0&amp;gt;] ? kthread+0x0/0xf0
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This actually highlights even bigger problem with this assertion, I think since it does allow various ill-formed requests to cause crashes too.&lt;/p&gt;

&lt;p&gt;Anyway, the specific problem here is lack of &quot;RMF_EADATA&quot; component in the pill selected which is RQF_MDS_REINT_CREATE_ACL, but in reality that&apos;s only valid for a regular reint RPC, the intent RPCs already get their capsules extended as part of ldlm processing (and obviously they are not happy we are changing the format) so we can totally skip this step for intents.&lt;/p&gt;

&lt;p&gt;The other problem once we overcome this one is mdt_reint_create unconditionally assumes that any request with ldlm handle in it (determined by info-&amp;gt;mti_dlm_req set) is ELC cancel&lt;br/&gt;
request and calls ldlm_request_cancel right away. Which is great for normal reint requests, but crashes for intent requests because the lock handle provided is not yet granted or not properly referenced or some such.&lt;/p&gt;

&lt;p&gt;As such we really need to rework the current intent-create logic not to crash right away.&lt;/p&gt;</description>
                <environment></environment>
        <key id="52075">LU-10985</key>
            <summary>Attempting to send a mkdir create intents crashes server</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>Wed, 2 May 2018 04:36:43 +0000</created>
                <updated>Mon, 21 Jan 2019 15:24:57 +0000</updated>
                            <resolved>Sun, 6 May 2018 04:32:18 +0000</resolved>
                                    <version>Lustre 2.11.0</version>
                                    <fixVersion>Lustre 2.12.0</fixVersion>
                    <fixVersion>Lustre 2.10.7</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>2</watches>
                                                                            <comments>
                            <comment id="227068" author="gerrit" created="Wed, 2 May 2018 04:50:27 +0000"  >&lt;p&gt;Oleg Drokin (oleg.drokin@intel.com) uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/32237&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/32237&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-10985&quot; title=&quot;Attempting to send a mkdir create intents crashes server&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-10985&quot;&gt;&lt;del&gt;LU-10985&lt;/del&gt;&lt;/a&gt; mdt: properly handle unknown intent requests&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: edec9a5693ca0c749009ff94c5f75abf2bf00679&lt;/p&gt;</comment>
                            <comment id="227387" author="gerrit" created="Sun, 6 May 2018 03:43:28 +0000"  >&lt;p&gt;Oleg Drokin (oleg.drokin@intel.com) merged in patch &lt;a href=&quot;https://review.whamcloud.com/32237/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/32237/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-10985&quot; title=&quot;Attempting to send a mkdir create intents crashes server&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-10985&quot;&gt;&lt;del&gt;LU-10985&lt;/del&gt;&lt;/a&gt; mdt: properly handle unknown intent requests&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: 6a39600f641cc3e179b0149af5ff17ba44d2319f&lt;/p&gt;</comment>
                            <comment id="227402" author="pjones" created="Sun, 6 May 2018 04:32:18 +0000"  >&lt;p&gt;Landed for 2.12&lt;/p&gt;</comment>
                            <comment id="228445" author="gerrit" created="Wed, 23 May 2018 16:10:40 +0000"  >&lt;p&gt;Minh Diep (minh.diep@intel.com) uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/32521&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/32521&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-10985&quot; title=&quot;Attempting to send a mkdir create intents crashes server&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-10985&quot;&gt;&lt;del&gt;LU-10985&lt;/del&gt;&lt;/a&gt; mdt: properly handle unknown intent requests&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: b2_10&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: ac535c47902875ac6c7ec7312f9f1ef7526614a0&lt;/p&gt;</comment>
                            <comment id="240373" author="gerrit" created="Sat, 19 Jan 2019 06:28:31 +0000"  >&lt;p&gt;Oleg Drokin (green@whamcloud.com) merged in patch &lt;a href=&quot;https://review.whamcloud.com/32521/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/32521/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-10985&quot; title=&quot;Attempting to send a mkdir create intents crashes server&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-10985&quot;&gt;&lt;del&gt;LU-10985&lt;/del&gt;&lt;/a&gt; mdt: properly handle unknown intent requests&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: b2_10&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: 179bf9a009cd27b0055e23c1478d7b298833ce35&lt;/p&gt;</comment>
                    </comments>
                    <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|hzzwo7:</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>