<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 01:42:39 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-4429] clients leaking open handles/bad lock matching in ll_md_blocking_ast</title>
                <link>https://jira.whamcloud.com/browse/LU-4429</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;In ll_md_blocking_ast() we try to avoid calling ll_md_real_close() by looking for a same mode OPEN lock on the file.&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;case LDLM_CB_CANCELING: {
    struct inode *inode = ll_inode_from_resource_lock(lock);
    __u64 bits = lock-&amp;gt;l_policy_data.l_inodebits.bits;
    ...

    if (bits &amp;amp; MDS_INODELOCK_XATTR)
                        ll_xattr_cache_destroy(inode);

    /* For OPEN locks we differentiate between lock modes             
     * LCK_CR, LCK_CW, LCK_PR - bug 22891 */
    if (bits &amp;amp; (MDS_INODELOCK_LOOKUP | MDS_INODELOCK_UPDATE |
                MDS_INODELOCK_LAYOUT | MDS_INODELOCK_PERM))
        ll_have_md_lock(inode, &amp;amp;bits, LCK_MINMODE);

    if (bits &amp;amp; MDS_INODELOCK_OPEN)
        ll_have_md_lock(inode, &amp;amp;bits, mode);

    ...
    if (bits &amp;amp; MDS_INODELOCK_OPEN) {
        int flags = 0;
        switch (lock-&amp;gt;l_req_mode) {
        case LCK_CW:
            flags = FMODE_WRITE;
            break;
        case LCK_PR:
            flags = FMODE_EXEC;
            break;
        case LCK_CR:
            flags = FMODE_READ;
            break;
        ...
        ll_md_real_close(inode, flags);
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;However the ll_have_md_lock(inode, &amp;amp;bits, LCK_MINMODE) call may match a lock which happens to include MDS_INODELOCK_OPEN but has an inappropriate mode. This will prevent ll_md_real_close() from being called when it should be and leave a stale obd_client_handle in the lli.&lt;/p&gt;

&lt;p&gt;That handles are really being leaked is easy to see by using the patch &lt;a href=&quot;http://review.whamcloud.com/#/c/6386/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/#/c/6386/&lt;/a&gt; from &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-946&quot; title=&quot;add lprocfs file on MDT to list open files in the filesystem&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-946&quot;&gt;&lt;del&gt;LU-946&lt;/del&gt;&lt;/a&gt;. Then do &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;# llmount.sh
...
# DURATION=10 sh ./lustre/tests/racer.sh
...
# lsof /mnt/lustre
# lctl set_param ldlm.namespaces.*mdc*.lru_size=clear
# lctl get_param ldlm.namespaces.*mdc*.lru_size
# lctl dk &amp;gt; 1.dk
# cat /proc/fs/lustre/mdt/lustre-MDT0000/exports/0\@lo/open_files
[0x200000400:0x9d1:0x0] 04240000001 0xbd7c9c99fdb17cfc
[0x200000401:0x893:0x0] 04240000001 0xbd7c9c99fdad82ad
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Note that I have modified the patch to also print the flags and cookie of the MFD.&lt;/p&gt;</description>
                <environment></environment>
        <key id="22622">LU-4429</key>
            <summary>clients leaking open handles/bad lock matching in ll_md_blocking_ast</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="jhammond">John Hammond</assignee>
                                    <reporter username="jhammond">John Hammond</reporter>
                        <labels>
                            <label>ldlm</label>
                            <label>llite</label>
                    </labels>
                <created>Fri, 3 Jan 2014 16:24:13 +0000</created>
                <updated>Tue, 10 Feb 2015 12:50:37 +0000</updated>
                            <resolved>Fri, 14 Feb 2014 17:40:20 +0000</resolved>
                                    <version>Lustre 2.6.0</version>
                                    <fixVersion>Lustre 2.6.0</fixVersion>
                    <fixVersion>Lustre 2.5.1</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>5</watches>
                                                                            <comments>
                            <comment id="74324" author="jhammond" created="Fri, 3 Jan 2014 23:33:42 +0000"  >&lt;p&gt;Please see &lt;a href=&quot;http://review.whamcloud.com/8718&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/8718&lt;/a&gt;.&lt;/p&gt;</comment>
                            <comment id="74772" author="jhammond" created="Sat, 11 Jan 2014 14:35:24 +0000"  >&lt;p&gt;Patch landed to master.&lt;/p&gt;</comment>
                            <comment id="77038" author="bogl" created="Thu, 13 Feb 2014 22:59:29 +0000"  >&lt;p&gt;backport to b2_5&lt;br/&gt;
&lt;a href=&quot;http://review.whamcloud.com/9260&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/9260&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                        <issuelink>
            <issuekey id="21245">LU-4053</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="12729">LU-946</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="22826">LU-4520</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="28640">LU-6232</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_10390" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hzwc5b:</customfieldvalue>

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