<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 01:50: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-5291] Failure to clear ft_flags leads to mmap_sem deadlocks</title>
                <link>https://jira.whamcloud.com/browse/LU-5291</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;After adding the patch for &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-5108&quot; title=&quot;osc: Performance tune for LRU&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-5108&quot;&gt;&lt;del&gt;LU-5108&lt;/del&gt;&lt;/a&gt; to Cray&apos;s tree, we continued to see mmap_sem deadlocks.&lt;/p&gt;

&lt;p&gt;We believe we&apos;ve identified the reason:&lt;br/&gt;
vvp: Clear vio-&amp;gt;u.fault.fault.ft_flags in ll_fault0&lt;/p&gt;

&lt;p&gt;In ll_fault0, the &apos;fault&apos; struct is mostly cleared before the call to&lt;br/&gt;
cl_io_loop, but ft_flags is not reset.  It is ordinarily set by&lt;br/&gt;
the call to filemap_fault in vvp_io_kernel_fault, but if Lustre returns&lt;br/&gt;
before calling filemap_fault, it still has the old value of ft_flags.&lt;/p&gt;

&lt;p&gt;ll_fault0 will then consume the ft_flags field.  If it has the&lt;br/&gt;
VM_FAULT_RETRY bit set, it will be used as ll_fault0() and&lt;br/&gt;
ll_fault()&apos;s return value.&lt;/p&gt;

&lt;p&gt;This is a problem when VM_FAULT_RETRY is in ft_flags:&lt;br/&gt;
When fault/filemap_fault return with that flag set, they have already&lt;br/&gt;
released the mmap semaphore, and do_page_fault does not need to release it.&lt;/p&gt;

&lt;p&gt;Incorrectly returning this flag from ll_fault means the mmap semaphore&lt;br/&gt;
is not upped in the kernel&apos;s do_page_fault().&lt;/p&gt;

&lt;p&gt;Sample debug output...  This is the VM_FAULT_RETRY flag returned with EAGAIN, which is fine and expected, but then the same flags are returned with ERESTARTSYS &lt;span class=&quot;error&quot;&gt;&amp;#91;which came from earlier than filemap_fault&amp;#93;&lt;/span&gt;, and so the semaphore is not upped in do_page_fault:&lt;br/&gt;
00000080:00800000:24.0:1404292452.550624:0:23550:0:(llite_mmap.c:341:ll_fault0()) fsx-linux-aio fault 1028/-11&lt;br/&gt;
00000080:00800000:24.0:1404292452.554058:0:23550:0:(llite_mmap.c:341:ll_fault0()) fsx-linux-aio fault 1028/-512&lt;/p&gt;

&lt;p&gt;Credit, as for &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-5221&quot; title=&quot;Missed up_read on mmap_sem in vvp_mmap_locks&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-5221&quot;&gt;&lt;del&gt;LU-5221&lt;/del&gt;&lt;/a&gt;, to Cray&apos;s Paul Cassella.&lt;/p&gt;</description>
                <environment></environment>
        <key id="25418">LU-5291</key>
            <summary>Failure to clear ft_flags leads to mmap_sem deadlocks</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="jay">Jinshan Xiong</assignee>
                                    <reporter username="paf">Patrick Farrell</reporter>
                        <labels>
                            <label>patch</label>
                    </labels>
                <created>Thu, 3 Jul 2014 03:50:18 +0000</created>
                <updated>Mon, 13 Jul 2015 13:17:44 +0000</updated>
                            <resolved>Fri, 5 Dec 2014 18:25:54 +0000</resolved>
                                    <version>Lustre 2.6.0</version>
                                    <fixVersion>Lustre 2.7.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>4</watches>
                                                                            <comments>
                            <comment id="88065" author="paf" created="Thu, 3 Jul 2014 03:54:15 +0000"  >&lt;p&gt;&lt;a href=&quot;http://review.whamcloud.com/10956&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/10956&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="91097" author="paf" created="Thu, 7 Aug 2014 20:12:39 +0000"  >&lt;p&gt;Patch is landed, this should be closed.&lt;/p&gt;</comment>
                            <comment id="100851" author="jlevi" created="Fri, 5 Dec 2014 18:25:54 +0000"  >&lt;p&gt;Patch landed to Master.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                        <issuelink>
            <issuekey id="24834">LU-5108</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|hzwqif:</customfieldvalue>

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