<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 01:47:12 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-4945]  req_capsule_get: Wrong buffer for field `name&apos; (5 of 6) in format `LDLM_INTENT_GETATTR&apos;: 3 vs. 0 (client)</title>
                <link>https://jira.whamcloud.com/browse/LU-4945</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;I found this problem when I tried to run racer with MDSCOUNT=4&lt;/p&gt;

&lt;p&gt;LustreError: 8391:0:(pack_generic.c:815:lustre_msg_string()) can&apos;t unpack short string in msg ffffc90017980658 buffer&lt;span class=&quot;error&quot;&gt;&amp;#91;5&amp;#93;&lt;/span&gt; len 3: strlen 0&lt;br/&gt;
LustreError: 8391:0:(layout.c:2060:__req_capsule_get()) @@@ Wrong buffer for field `name&apos; (5 of 6) in format `LDLM_INTENT_GETATTR&apos;: 3 vs. 0 (client)&lt;br/&gt;
  req@ffff8802055e9800 x1466142079352512/t0(0) o101-&amp;gt;203a5d79-0163-0009-b60a-805a18baffe6@0@lo:0/0 lens 576/3384 e 0 to 0 dl 1398222210 ref 1 fl Interpret:/0/0 rc 0/0&lt;/p&gt;</description>
                <environment></environment>
        <key id="24356">LU-4945</key>
            <summary> req_capsule_get: Wrong buffer for field `name&apos; (5 of 6) in format `LDLM_INTENT_GETATTR&apos;: 3 vs. 0 (client)</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="6" iconUrl="https://jira.whamcloud.com/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="1">Fixed</resolution>
                                        <assignee username="di.wang">Di Wang</assignee>
                                    <reporter username="di.wang">Di Wang</reporter>
                        <labels>
                    </labels>
                <created>Wed, 23 Apr 2014 19:40:45 +0000</created>
                <updated>Thu, 1 May 2014 22:31:07 +0000</updated>
                            <resolved>Thu, 1 May 2014 22:31:07 +0000</resolved>
                                    <version>Lustre 2.6.0</version>
                                    <fixVersion>Lustre 2.6.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>5</watches>
                                                                            <comments>
                            <comment id="82409" author="adilger" created="Thu, 24 Apr 2014 17:08:39 +0000"  >&lt;p&gt;Di, how serious is this bug, and what problem would be visible to the client?&lt;/p&gt;

&lt;p&gt;Is the source of this bug obvious, and could Lai create the patch?&lt;/p&gt;</comment>
                            <comment id="82411" author="di.wang" created="Thu, 24 Apr 2014 17:18:08 +0000"  >&lt;p&gt;Andreas: this bug is pretty serious to me, which seems related with the new readdir change. I am investigating it right now, no obvious clue yet. Thanks. &lt;/p&gt;</comment>
                            <comment id="82439" author="di.wang" created="Thu, 24 Apr 2014 21:53:18 +0000"  >&lt;p&gt;Hmm, it turns out using the dir_ent pointer to locate next entry is not very safe without holding ldlm lock. &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;mdc_read_entry()
{
....
       /* If op_data-&amp;gt;op_ent != NULL(see ll_dir_entry_next), try to get
         * next ent directly */
        if (likely(op_data-&amp;gt;op_ent != NULL)) {
                ent = lu_dirent_next(op_data-&amp;gt;op_ent);
                if (likely(ent != NULL))
                        GOTO(out, rc);
        } else {

.....
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; 

&lt;p&gt;So we either find a new way to resolve the hash conflict or hold the ldlm lock during iteration. I will cook a patch.&lt;/p&gt;</comment>
                            <comment id="82458" author="jhammond" created="Fri, 25 Apr 2014 11:18:06 +0000"  >&lt;p&gt;This is a good excuse/opportunity to kill all the uses of LOGL0() to pack names:&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;+static void mdc_pack_name(struct ptlrpc_request *req,
+		   const struct req_msg_field *field,
+		   const char *name, size_t name_len)
+{
+	char *buf;
+	size_t buf_size;
+
+	buf = req_capsule_client_get(&amp;amp;req-&amp;gt;rq_pill, field);
+	buf_size = req_capsule_get_size(&amp;amp;req-&amp;gt;rq_pill, field, RCL_CLIENT);
+
+	LASSERT(buf != NULL &amp;amp;&amp;amp;
+		buf_size == name_len + 1 &amp;amp;&amp;amp;
+		name != NULL &amp;amp;&amp;amp;
+		name_len != 0 &amp;amp;&amp;amp;
+		strnlen(name, name_len) == name_len &amp;amp;&amp;amp;
+		name[name_len] == &apos;\0&apos;);
+
+	strlcpy(buf, name, buf_size);
+
+       LASSERT(strlen(buf) == name_len);
+}
+
...
-	tmp = req_capsule_client_get(&amp;amp;req-&amp;gt;rq_pill, &amp;amp;RMF_NAME);
-	LOGL0(op_data-&amp;gt;op_name, op_data-&amp;gt;op_namelen, tmp);
+	mdc_pack_name(req, &amp;amp;RMF_NAME, op_data-&amp;gt;op_name, op_data-&amp;gt;op_namelen);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                            <comment id="82547" author="di.wang" created="Fri, 25 Apr 2014 21:05:50 +0000"  >&lt;p&gt;&lt;a href=&quot;http://review.whamcloud.com/#/c/10109/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/#/c/10109/&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="82549" author="di.wang" created="Fri, 25 Apr 2014 21:24:17 +0000"  >&lt;p&gt;Sorry, John, I did not include your changes into this patch. I will try to add it later.&lt;/p&gt;</comment>
                            <comment id="82884" author="jlevi" created="Wed, 30 Apr 2014 17:35:10 +0000"  >&lt;p&gt;Changes merged into &lt;a href=&quot;http://review.whamcloud.com/#/c/9191/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/#/c/9191/&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="82885" author="adilger" created="Wed, 30 Apr 2014 17:35:29 +0000"  >&lt;p&gt;Fix was merged into &lt;a href=&quot;http://review.whamcloud.com/9191&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/9191&lt;/a&gt; under &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-4603&quot; title=&quot;NFS reexport leads to problems of &amp;quot;ls&amp;quot;&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-4603&quot;&gt;&lt;del&gt;LU-4603&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;</comment>
                            <comment id="82969" author="di.wang" created="Thu, 1 May 2014 05:53:30 +0000"  >&lt;p&gt;The patch is already merged to the fix of &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-4603&quot; title=&quot;NFS reexport leads to problems of &amp;quot;ls&amp;quot;&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-4603&quot;&gt;&lt;del&gt;LU-4603&lt;/del&gt;&lt;/a&gt;. I will close this for now.&lt;/p&gt;</comment>
                            <comment id="82970" author="di.wang" created="Thu, 1 May 2014 05:54:26 +0000"  >&lt;p&gt;John: Sorry, Could you please create a new ticket for your suggestion? Thanks.&lt;/p&gt;</comment>
                            <comment id="82976" author="jhammond" created="Thu, 1 May 2014 10:42:53 +0000"  >&lt;p&gt;Done.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                        <issuelink>
            <issuekey id="23071">LU-4603</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="19627">LU-3531</issuekey>
        </issuelink>
                            </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_10030" key="com.atlassian.jira.plugin.system.customfieldtypes:labels">
                        <customfieldname>Epic/Theme</customfieldname>
                        <customfieldvalues>
                                        <label>dne</label>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_10390" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hzwkuv:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10090" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>13685</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>