<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 02:02:18 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-6679] ASSERTION( !ext-&gt;oe_hp ) failed with group lock</title>
                <link>https://jira.whamcloud.com/browse/LU-6679</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;We can crash the lustre client using the simple code below: &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;#include &amp;lt;sys/types.h&amp;gt;
#include &amp;lt;sys/stat.h&amp;gt;
#include &amp;lt;fcntl.h&amp;gt;
#include &amp;lt;sys/ioctl.h&amp;gt;
#include &amp;lt;stdlib.h&amp;gt;
#include &amp;lt;string.h&amp;gt;
#include &amp;lt;unistd.h&amp;gt;
#include &amp;lt;stdio.h&amp;gt;

#include &amp;lt;lustre/lustre_user.h&amp;gt;

int main(int argc, char *argv[])
{
        int fd;
        int rc;
        int gid;
        char *buf;

        fd = open(&quot;/mnt/testfile.00000000&quot;, O_RDWR);
        gid = atoi(argv[1]);
        rc = ioctl(fd, LL_IOC_GROUP_LOCK, gid);
        if (rc) {
                printf(&quot;ioctl %d\n&quot;, rc);
                return rc;
        }
        buf = malloc(1&amp;lt;&amp;lt;20);
        memset(buf, 1, 1&amp;lt;&amp;lt;20);
        while (1)
                write(fd, buf, 1&amp;lt;&amp;lt;20);
        return 0;
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;demo purpose only, no error handling.&lt;/p&gt;

&lt;p&gt;Run the program with a gid and then run another instance of the program with a different gid, the client will crash right after.&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;crash&amp;gt; bt
PID: 1989   TASK: ffff88013ca86ae0  CPU: 1   COMMAND: &quot;ldlm_bl_02&quot;
 #0 [ffff88011fe0d8c8] machine_kexec at ffffffff8103b5bb
 #1 [ffff88011fe0d928] crash_kexec at ffffffff810c9852
 #2 [ffff88011fe0d9f8] panic at ffffffff81529343
 #3 [ffff88011fe0da78] lbug_with_loc at ffffffffa0251ecb [libcfs]
 #4 [ffff88011fe0da98] osc_cache_writeback_range at ffffffffa0958e35 [osc]
 #5 [ffff88011fe0dc28] osc_lock_flush at ffffffffa0941495 [osc]
 #6 [ffff88011fe0dca8] osc_ldlm_blocking_ast at ffffffffa0941828 [osc]
 #7 [ffff88011fe0dd18] ldlm_cancel_callback at ffffffffa05404cc [ptlrpc]
 #8 [ffff88011fe0dd38] ldlm_cli_cancel_local at ffffffffa05525da [ptlrpc]
 #9 [ffff88011fe0dd68] ldlm_cli_cancel at ffffffffa0557200 [ptlrpc]
#10 [ffff88011fe0dda8] osc_ldlm_blocking_ast at ffffffffa094165b [osc]
#11 [ffff88011fe0de18] ldlm_handle_bl_callback at ffffffffa055ac40 [ptlrpc]
#12 [ffff88011fe0de48] ldlm_bl_thread_main at ffffffffa055b1a1 [ptlrpc]
#13 [ffff88011fe0dee8] kthread at ffffffff8109e66e
#14 [ffff88011fe0df48] kernel_thread at ffffffff8100c20a
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment>CentOS 6 + Lustre master tree 2.7+</environment>
        <key id="30480">LU-6679</key>
            <summary>ASSERTION( !ext-&gt;oe_hp ) failed with group lock</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="jay">Jinshan Xiong</assignee>
                                    <reporter username="lidongyang">Li Dongyang</reporter>
                        <labels>
                            <label>patch</label>
                    </labels>
                <created>Wed, 3 Jun 2015 06:31:29 +0000</created>
                <updated>Fri, 13 Jan 2017 00:52:18 +0000</updated>
                            <resolved>Sat, 25 Jul 2015 15:21:23 +0000</resolved>
                                    <version>Lustre 2.7.0</version>
                    <version>Lustre 2.8.0</version>
                                    <fixVersion>Lustre 2.8.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>7</watches>
                                                                            <comments>
                            <comment id="117249" author="gerrit" created="Wed, 3 Jun 2015 06:33:43 +0000"  >&lt;p&gt;Li Dongyang (dongyang.li@anu.edu.au) uploaded a new patch: &lt;a href=&quot;http://review.whamcloud.com/15119&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/15119&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-6679&quot; title=&quot;ASSERTION( !ext-&amp;gt;oe_hp ) failed with group lock&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-6679&quot;&gt;&lt;del&gt;LU-6679&lt;/del&gt;&lt;/a&gt; ldlm: do not set cbpending for group locks&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 2c02927b9858c4e7858f569a304d6b2024a186a5&lt;/p&gt;</comment>
                            <comment id="117294" author="jay" created="Wed, 3 Jun 2015 15:55:44 +0000"  >&lt;p&gt;will patch &lt;a href=&quot;http://review.whamcloud.com/13934&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/13934&lt;/a&gt; help this case?&lt;/p&gt;</comment>
                            <comment id="117369" author="lidongyang" created="Thu, 4 Jun 2015 00:17:19 +0000"  >&lt;p&gt;I can still reproduce the problem with patch 13934, besides, do we really need 13934? mode is passed in from osc_dlm_blocking_ast0 and&lt;br/&gt;
it will be set to CLM_WRITE from there for the group locks as well.&lt;/p&gt;</comment>
                            <comment id="117371" author="jay" created="Thu, 4 Jun 2015 00:35:41 +0000"  >&lt;p&gt;You probably need this patch &lt;a href=&quot;http://review.whamcloud.com/14093&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/14093&lt;/a&gt; from master.&lt;/p&gt;

&lt;p&gt;Can you reproduce it on master?&lt;/p&gt;</comment>
                            <comment id="117372" author="lidongyang" created="Thu, 4 Jun 2015 00:43:31 +0000"  >&lt;p&gt;Hi Jinshan,&lt;br/&gt;
Yes I have &lt;a href=&quot;http://review.whamcloud.com/#/c/14093/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/#/c/14093/&lt;/a&gt; and I&apos;m using master.&lt;br/&gt;
Like I said in &lt;a href=&quot;http://review.whamcloud.com/#/c/15119/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/#/c/15119/&lt;/a&gt; the patch is a missed case of 14093&lt;/p&gt;</comment>
                            <comment id="117399" author="jay" created="Thu, 4 Jun 2015 05:48:40 +0000"  >&lt;p&gt;After checking the code, now I understand the problem. I agree that your patch will fix the problem but I would like to enhance the patch by not trying to revoke group lock on the server side. How do you think?&lt;/p&gt;</comment>
                            <comment id="117400" author="lidongyang" created="Thu, 4 Jun 2015 06:04:25 +0000"  >&lt;p&gt;I don&apos;t think server has anything to do with it.&lt;br/&gt;
Say we have process A which holds a group lock with a gid,&lt;br/&gt;
process B from the same client requests the group lock on the same file but with a different gid.&lt;/p&gt;

&lt;p&gt;The server sends blocking ast which is all right, so when process A releases the lock, process B can get it.&lt;br/&gt;
The problem is on the client, when we get blocking ast for the original group lock, cbpending got set on the lock which shouldn&apos;t happen.&lt;br/&gt;
I reckon this is a problem on the client and this patch really should be a part of &lt;a href=&quot;http://review.whamcloud.com/14093&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/14093&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="117403" author="jay" created="Thu, 4 Jun 2015 06:21:07 +0000"  >&lt;p&gt;My point is now that clients won&apos;t cache group lock, why do servers bother sending blocking AST? It&apos;s simply wasting RPCs.&lt;/p&gt;

&lt;p&gt;Therefore a proper fix is your patch + corresponding fix on server side.&lt;/p&gt;</comment>
                            <comment id="117407" author="lidongyang" created="Thu, 4 Jun 2015 06:55:14 +0000"  >&lt;p&gt;ok do you mean server won&apos;t send blocking ast to the client, it will only issue ast to the client when it&apos;s possible to grant the lock(previous lock got released)?&lt;br/&gt;
If so, do we still need patch &lt;a href=&quot;http://review.whamcloud.com/15119&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/15119&lt;/a&gt; as we won&apos;t handle blocking ast for the group lock on the client anyway?&lt;/p&gt;</comment>
                            <comment id="117467" author="jay" created="Thu, 4 Jun 2015 17:39:46 +0000"  >&lt;p&gt;At present we still need patch 15119 to handle the case that the client is talking w/ old servers. But in the long run, we won&apos;t need patch 15119.&lt;/p&gt;</comment>
                            <comment id="122195" author="gerrit" created="Sat, 25 Jul 2015 03:07:08 +0000"  >&lt;p&gt;Oleg Drokin (oleg.drokin@intel.com) merged in patch &lt;a href=&quot;http://review.whamcloud.com/15119/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/15119/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-6679&quot; title=&quot;ASSERTION( !ext-&amp;gt;oe_hp ) failed with group lock&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-6679&quot;&gt;&lt;del&gt;LU-6679&lt;/del&gt;&lt;/a&gt; ldlm: do not send blocking ast for group locks&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: 3016d3eba34f1718278e40d16d1e7e62e7c7abfa&lt;/p&gt;</comment>
                            <comment id="122216" author="pjones" created="Sat, 25 Jul 2015 15:21:23 +0000"  >&lt;p&gt;landed for 2.8&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="29105">LU-6368</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|hzxesn:</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>