<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 03:31:13 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-16935] deadlock between ll_filemap_fault and ll_imp_inval</title>
                <link>https://jira.whamcloud.com/browse/LU-16935</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;Thee following loop in ll_filemap_fault&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;
&lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt; ll_filemap_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
..
&#160; &#160; &#160; &#160; &lt;span class=&quot;code-keyword&quot;&gt;do&lt;/span&gt; {
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; seq = read_seqbegin(&amp;amp;ll_i2info(inode)-&amp;gt;lli_page_inv_lock);
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; ret = __ll_filemap_fault(vma, vmf);
&#160; &#160; &#160; &#160; } &lt;span class=&quot;code-keyword&quot;&gt;while&lt;/span&gt; (read_seqretry(&amp;amp;ll_i2info(inode)-&amp;gt;lli_page_inv_lock, seq) &amp;amp;&amp;amp;
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;(ret &amp;amp; VM_FAULT_SIGBUS));
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;may become endless:&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;
ll_filemap_fault()
&#160; filemap_fault()
&#160; ...
&#160; &#160; ll_readpage()
&#160; &#160; &#160; ll_io_read_page()
&#160; &#160; &#160; &#160; rc = cl_sync_io_wait(env, anchor, 0);
&#160; &#160; &#160; &#160; &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (!PageUptodate(cl_page_vmpage(page)))
&#160; &#160; &#160; &#160; &#160; cl_page_discard()
&#160; &#160; &#160; &#160; &#160; &#160; vvp_page_discard()
&#160; &#160; &#160; &#160; &#160; &#160; &#160; generic_error_remove_page()
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; truncate_complete_page()
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; ...
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; vvp_page_delete()
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; write_seqlock(&amp;amp;ll_i2info(inode)-&amp;gt;lli_page_inv_lock);
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; ClearPageUptodate(vmpage);
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; write_sequnlock(&amp;amp;ll_i2info(inode)-&amp;gt;lli_page_inv_lock);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;If page is not uptodate after cl_sync_io_wait() - vvp_page_delete() called deep inside cl_page_discard() increases lli_page_inv_lock seqlock.&lt;/p&gt;

&lt;p&gt;filemap_fault() (true for 4.12.14_122.147 and probably few other kernels of SLES12 SP5) returns VM_FAULT_SIGBUS if readpage fails:&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;
&lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt; filemap_fault(struct vm_fault *vmf)
..
&#160; &#160; &#160; &#160; error = mapping-&amp;gt;a_ops-&amp;gt;readpage(file, page);
&#160; &#160; &#160; &#160; &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (!error) {
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; wait_on_page_locked(page);
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (!PageUptodate(page))
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; error = -EIO;
&#160; &#160; &#160; &#160; }
&#160; &#160; &#160; &#160; put_page(page);

&#160; &#160; &#160; &#160; &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (!error || error == AOP_TRUNCATED_PAGE)
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &lt;span class=&quot;code-keyword&quot;&gt;goto&lt;/span&gt; retry_find;

&#160; &#160; &#160; &#160; &lt;span class=&quot;code-comment&quot;&gt;/* Things didn&apos;t work out. Return zero to tell the mm layer so. */&lt;/span&gt;
&#160; &#160; &#160; &#160; shrink_readahead_size_eio(file, ra);
&#160; &#160; &#160; &#160; &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; VM_FAULT_SIGBUS;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;When readpage fails as result of eviction from server side the following deadlock gets formed:&lt;/p&gt;

&lt;p&gt;ll_imp_inval stucks in&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;
ptlrpc_invalidate_import_thread
&#160; obd_import_event(IMP_EVENT_INVALIDATE)
&#160; &#160; ..
&#160; &#160; &#160; osc_object_invalidate
&#160; &#160; &#160; &#160; l_wait_event(osc-&amp;gt;oo_io_waitq, atomic_read(&amp;amp;osc-&amp;gt;oo_nr_ios) == 0, &amp;amp;lwi);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;and can not proceed to recovery.&lt;/p&gt;

&lt;p&gt;ll_filemap_fault() spins and keeps osc-&amp;gt;oo_nr_ios != 0, as readpage()&apos;s read rpc fails with -108 because import is invalid:&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;
&lt;span class=&quot;code-keyword&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt; ptlrpc_import_delay_req(struct obd_import *imp,
..
&#160; &#160; &#160; &#160; } &lt;span class=&quot;code-keyword&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (imp-&amp;gt;imp_invalid || imp-&amp;gt;imp_obd-&amp;gt;obd_no_recov) {
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (!imp-&amp;gt;imp_deactive)
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; DEBUG_REQ(D_NET, req, &lt;span class=&quot;code-quote&quot;&gt;&quot;IMP_INVALID&quot;&lt;/span&gt;);
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; *status = -ESHUTDOWN; &lt;span class=&quot;code-comment&quot;&gt;/* b=12940 */&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
        <key id="76779">LU-16935</key>
            <summary>deadlock between ll_filemap_fault and ll_imp_inval</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="1" iconUrl="https://jira.whamcloud.com/images/icons/statuses/open.png" description="The issue is open and ready for the assignee to start work on it.">Open</status>
                    <statusCategory id="2" key="new" colorName="default"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="vsaveliev">Vladimir Saveliev</assignee>
                                    <reporter username="vsaveliev">Vladimir Saveliev</reporter>
                        <labels>
                    </labels>
                <created>Thu, 29 Jun 2023 16:25:52 +0000</created>
                <updated>Thu, 29 Jun 2023 18:08:17 +0000</updated>
                                                                                <due></due>
                            <votes>0</votes>
                                    <watches>4</watches>
                                                                            <comments>
                            <comment id="376933" author="gerrit" created="Thu, 29 Jun 2023 16:27:16 +0000"  >&lt;p&gt;&quot;Vladimir Saveliev &amp;lt;vladimir.saveliev@hpe.com&amp;gt;&quot; uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/c/fs/lustre-release/+/51505&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/c/fs/lustre-release/+/51505&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-16935&quot; title=&quot;deadlock between ll_filemap_fault and ll_imp_inval&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-16935&quot;&gt;LU-16935&lt;/a&gt; llite: do not discard page after readpage failure&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: ad4208e16bd537bdc93dc52b4e381b5148e6f880&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|i03p9j:</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>