<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 01:50:11 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-5289] mdc_enqueue() may leave an invalid lock handle in intent</title>
                <link>https://jira.whamcloud.com/browse/LU-5289</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;I see this running vanilla single node racer with memory allocation fault injection.&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;[  169.793670] LustreError: 8024:0:(ldlm_lock.c:852:ldlm_lock_decref_internal_nolock()) ASSERTION( lock-&amp;gt;l_readers &amp;gt; 0 ) failed: 
[  169.793681] LustreError: 8024:0:(ldlm_lock.c:852:ldlm_lock_decref_internal_nolock()) LBUG
[  169.793687] Pid: 8024, comm: setfattr
[  169.793690] 
[  169.793691] Call Trace:
[  169.793731]  [&amp;lt;ffffffffa02be8c5&amp;gt;] libcfs_debug_dumpstack+0x55/0x80 [libcfs]
[  169.793757]  [&amp;lt;ffffffffa02beec7&amp;gt;] lbug_with_loc+0x47/0xb0 [libcfs]
[  169.793848]  [&amp;lt;ffffffffa0643842&amp;gt;] ldlm_lock_decref_internal_nolock+0xd2/0x180 [ptlrpc]
[  169.793923]  [&amp;lt;ffffffffa0646d40&amp;gt;] ldlm_lock_decref_internal+0x50/0xae0 [ptlrpc]
[  169.793993]  [&amp;lt;ffffffffa0438b7e&amp;gt;] ? class_handle2object+0x3e/0x1d0 [obdclass]
[  169.794052]  [&amp;lt;ffffffffa06481b9&amp;gt;] ldlm_lock_decref+0x39/0x90 [ptlrpc]
[  169.794088]  [&amp;lt;ffffffffa0e31b6f&amp;gt;] ll_intent_drop_lock+0xaf/0x150 [lustre]
[  169.794113]  [&amp;lt;ffffffffa0e31c51&amp;gt;] ll_intent_release+0x41/0x1d0 [lustre]
[  169.794150]  [&amp;lt;ffffffffa0e7e9c8&amp;gt;] ll_lookup_nd+0x108/0x4a0 [lustre]
[  169.794158]  [&amp;lt;ffffffff811b29b5&amp;gt;] do_lookup+0x1a5/0x230
[  169.794163]  [&amp;lt;ffffffff811b2fc4&amp;gt;] __link_path_walk+0x584/0x840
[  169.794168]  [&amp;lt;ffffffff811b398a&amp;gt;] path_walk+0x6a/0xe0
[  169.794172]  [&amp;lt;ffffffff811b3b9b&amp;gt;] filename_lookup+0x6b/0xc0
[  169.794177]  [&amp;lt;ffffffff811b4cc7&amp;gt;] user_path_at+0x57/0xa0
[  169.794182]  [&amp;lt;ffffffff8119f6c3&amp;gt;] ? sys_close+0x43/0x120
[  169.794187]  [&amp;lt;ffffffff8119f6c3&amp;gt;] ? sys_close+0x43/0x120
[  169.794192]  [&amp;lt;ffffffff811cb418&amp;gt;] sys_setxattr+0x48/0xe0
[  169.794200]  [&amp;lt;ffffffff8100b072&amp;gt;] system_call_fastpath+0x16/0x1b
[  169.794203] 
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;This was triggered by a allocation failure in mdc_enqueue_finish(). But the issue is at the bottom of mdc_enqueue():&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;        rc = mdc_finish_enqueue(exp, req, einfo, it, lockh, rc);
	&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (rc &amp;lt; 0) {
                &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (lustre_handle_is_used(lockh)) {
                        ldlm_lock_decref(lockh, einfo-&amp;gt;ei_mode);
                        memset(lockh, 0, sizeof(*lockh));
                }
                ptlrpc_req_finished(req);
        }
        RETURN(rc);
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;We should clean it_lock_handle and it_lock_mode as well.&lt;/p&gt;

&lt;p&gt;More generally mdc_enqueue() should not have a *lockh parameter at all but to fix this we probably need split md_enqueue() into md_enqueue() and md_flock().&lt;/p&gt;</description>
                <environment></environment>
        <key id="25414">LU-5289</key>
            <summary>mdc_enqueue() may leave an invalid lock handle in intent</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="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="jhammond">John Hammond</assignee>
                                    <reporter username="jhammond">John Hammond</reporter>
                        <labels>
                            <label>llite</label>
                            <label>mdc</label>
                    </labels>
                <created>Wed, 2 Jul 2014 20:23:38 +0000</created>
                <updated>Tue, 8 Jul 2014 16:05:33 +0000</updated>
                            <resolved>Tue, 8 Jul 2014 16:05:25 +0000</resolved>
                                    <version>Lustre 2.6.0</version>
                                    <fixVersion>Lustre 2.6.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>1</watches>
                                                                            <comments>
                            <comment id="88109" author="jhammond" created="Thu, 3 Jul 2014 16:19:01 +0000"  >&lt;p&gt;Please see &lt;a href=&quot;http://review.whamcloud.com/#/c/10963/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/#/c/10963/&lt;/a&gt;.&lt;/p&gt;</comment>
                            <comment id="88443" author="jhammond" created="Tue, 8 Jul 2014 16:05:25 +0000"  >&lt;p&gt;Patch landed to master.&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|hzwqhj:</customfieldvalue>

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