<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 01:33:04 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-3338] IOC_MDC_GETFILESTRIPE can abuse vmalloc()</title>
                <link>https://jira.whamcloud.com/browse/LU-3338</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;We&apos;ve observed that when using Robinhood to scan the Sequoia filesystem the Lustre 2.3.65 (and earlier) clients will thrash in vmalloc().  The issue is caused by Robinhood repeatedly calling IOC_MDC_GETFILESTRIPE to get the striping information for the files which it is scanning.&lt;/p&gt;

&lt;p&gt;Normally this wouldn&apos;t be an issue but because Sequoia&apos;s filesystem has a large number of OSTs (768).  And because we always allocate space in the reply buffer for the maximum numbers of OSTs.  All of the reply buffers end up getting vmalloc()&apos;ed instead of kmalloc()&apos;ed by OBD_ALLOC_LARGE().&lt;/p&gt;

&lt;p&gt;It&apos;s worth noting that we see this behavior even though we&apos;re running with the fix for the recent kernel vmalloc() regression.  Going forward we should keep this in mind and never ever use vmalloc() if we can at all avoid it.  It&apos;s not just slow, it&apos;s downright dangerous to use in any concurrent context.&lt;/p&gt;

&lt;p&gt;I&apos;ll push a fix for this issue shortly for review.&lt;/p&gt;</description>
                <environment>x86_64 client</environment>
        <key id="19008">LU-3338</key>
            <summary>IOC_MDC_GETFILESTRIPE can abuse vmalloc()</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="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="laisiyao">Lai Siyao</assignee>
                                    <reporter username="behlendorf">Brian Behlendorf</reporter>
                        <labels>
                            <label>patch</label>
                    </labels>
                <created>Tue, 14 May 2013 22:56:41 +0000</created>
                <updated>Mon, 31 Aug 2015 15:59:15 +0000</updated>
                            <resolved>Wed, 19 Mar 2014 13:29:54 +0000</resolved>
                                    <version>Lustre 2.4.0</version>
                                    <fixVersion>Lustre 2.6.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>18</watches>
                                                                            <comments>
                            <comment id="58522" author="behlendorf" created="Tue, 14 May 2013 23:45:56 +0000"  >&lt;p&gt;&lt;a href=&quot;http://review.whamcloud.com/6339&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/6339&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="58628" author="behlendorf" created="Thu, 16 May 2013 00:02:19 +0000"  >&lt;p&gt;This whole issue goes deeper than I first thought.  It seems many of the mdc requests (unlink, getattr, rename, close, ...) proactively allocate a reply buffer of cl_max_mds_easize which may or may not end up being used.  As described above when the size of this reply buffer forces it to be vmalloc() you basically end up with a non-functional very slow client which spins.&lt;/p&gt;

&lt;p&gt;Can someone explain to me why we need to add this reply buffer for all of these request types?  For the moment I&apos;ve updated the existing proposed patch to use the cl_default_mds_easize for all these cases to avoid the issue.&lt;/p&gt;</comment>
                            <comment id="58790" author="adilger" created="Fri, 17 May 2013 17:30:48 +0000"  >&lt;p&gt;With MDSes before 2.4 the unlink, rename, and close replies can result in the MDS inode dropping the last link on a file and the OST objects being destroyed.  In pre-2.4 days, the clients would do the OST object destroys, so they would be sent the LOV EA in order to do this.&lt;/p&gt;

&lt;p&gt;With 2.4, the MDS will do the OST object destroys, but only after the name unlink has committed locally.  Without that, there is a chance that the just-unlinked name will survive an MDS crash, but the OST objects will have been destroyed.  While that isn&apos;t technically data loss (the user had already deleted the file), it can be confusing if they later find the partially-deleted file and it returns an error when accessed.&lt;/p&gt;</comment>
                            <comment id="58792" author="adilger" created="Fri, 17 May 2013 17:38:53 +0000"  >&lt;p&gt;To clarify, it is fine to start with the default LOV EA reply buffer for 2.4 clients, so long as the RPC layer will handle the larger reply if it is sent.  This is needed for client compatibility with pre-2.4 MDSes.&lt;/p&gt;

&lt;p&gt;It would be possible to always allocate a minimum-sized reply buffer (e.g. 56 bytes == 1 stripe) for these RPCs on the assumption that the MDS will not send anything.  If the MDS ever &lt;em&gt;does&lt;/em&gt; send something in this buffer it can save a flag that means future RPCs will get the default-sized reply buffer.&lt;/p&gt;</comment>
                            <comment id="58989" author="behlendorf" created="Tue, 21 May 2013 16:51:54 +0000"  >&lt;p&gt;Thanks for the clarification Andreas.&lt;/p&gt;

&lt;p&gt;Testing of the proposed patch on Friday showed there are still some cases triggered by the Robinhood scan which are resulting in large allocations.  I&apos;m going to run those remaining cases down this week and I&apos;ll refresh that patch with those additions.  I&apos;m not sure it&apos;s worth the extra complexity to send a minimum sized buffer and add another flag to track it.  I think we get &lt;em&gt;most&lt;/em&gt; of what we need just by using the default as long as we cap the default value at less than a page.  But I&apos;ll play around with it a bit and propose another patch.&lt;/p&gt;</comment>
                            <comment id="68013" author="adilger" created="Mon, 30 Sep 2013 23:36:30 +0000"  >&lt;p&gt;Move this off to 2.5.1 because the patch is consistently failing, and this is not a new problem but rather optimizing some code.&lt;/p&gt;</comment>
                            <comment id="73592" author="pjones" created="Mon, 16 Dec 2013 17:18:47 +0000"  >&lt;p&gt;Mike&lt;/p&gt;

&lt;p&gt;Could you please look into this one?&lt;/p&gt;

&lt;p&gt;Thanks&lt;/p&gt;

&lt;p&gt;Peter&lt;/p&gt;</comment>
                            <comment id="74887" author="pjones" created="Tue, 14 Jan 2014 02:06:21 +0000"  >&lt;p&gt;Lai&lt;/p&gt;

&lt;p&gt;Could you please look at Andreas&apos;s review feedback on this patch and see about revising it so that we can land it?&lt;/p&gt;

&lt;p&gt;Thanks&lt;/p&gt;

&lt;p&gt;Peter&lt;/p&gt;</comment>
                            <comment id="79656" author="pjones" created="Wed, 19 Mar 2014 13:29:54 +0000"  >&lt;p&gt;Landed for 2.6&lt;/p&gt;</comment>
                            <comment id="83942" author="bogl" created="Mon, 12 May 2014 22:43:58 +0000"  >&lt;p&gt;backport to b2_4:&lt;br/&gt;
&lt;a href=&quot;http://review.whamcloud.com/10303&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/10303&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                                        </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="23858">LU-4811</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="26191">LU-5549</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_10040" key="com.atlassian.jira.plugin.system.customfieldtypes:labels">
                        <customfieldname>Epic</customfieldname>
                        <customfieldvalues>
                                        <label>client</label>
    
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10030" key="com.atlassian.jira.plugin.system.customfieldtypes:labels">
                        <customfieldname>Epic/Theme</customfieldname>
                        <customfieldvalues>
                                        <label>Performance</label>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_10390" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hzvqyv:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10090" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>8255</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>
                                                                                                                                                    <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:float">
                        <customfieldname>Story Points</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        </customfields>
    </item>
</channel>
</rss>