<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 01:36:19 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-3717] Kernel panic in ll_encode_fh() while testing file handle syscalls on FC18 client</title>
                <link>https://jira.whamcloud.com/browse/LU-3717</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;Hit a kernel panic while trying to test the new file handle syscalls (name_to_handle_at()/open_by_handle_at())&lt;/p&gt;

&lt;p&gt;To reproduce follow the following steps:&lt;br/&gt;
1) Apply patch (&lt;a href=&quot;http://review.whamcloud.com/#/c/7247/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/#/c/7247/&lt;/a&gt;). This patch adds a new file lustre/tests/check_fhandle_syscalls.c&lt;br/&gt;
2) Compile lustre client&lt;br/&gt;
3) Setup lustre (sh lustre/tests/llmount.sh)&lt;br/&gt;
4) Create a temporary file in FS (echo &quot;testing new syscalls&quot; &amp;gt; /mnt/lustre/temp_file)&lt;br/&gt;
5) Run the test utility as follows:&lt;br/&gt;
cd lustre/tests;&lt;br/&gt;
./check_fhandle_syscalls temp_file /mnt/lustre&lt;/p&gt;

&lt;p&gt;The following is the stack trace of the panic:&lt;/p&gt;

&lt;p&gt;crash&amp;gt; bt -l&lt;br/&gt;
PID: 2139   TASK: ffff880011495c40  CPU: 0   COMMAND: &quot;check_fhandle_s&quot;&lt;br/&gt;
 #0 &lt;span class=&quot;error&quot;&gt;&amp;#91;ffff8800115cbc90&amp;#93;&lt;/span&gt; machine_kexec at ffffffff8103e9a5&lt;br/&gt;
    /usr/src/debug/kernel-3.6.fc18/linux-3.6.10-4.fc18.x86_64/arch/x86/kernel/machine_kexec_64.c: 339&lt;br/&gt;
 #1 &lt;span class=&quot;error&quot;&gt;&amp;#91;ffff8800115cbd00&amp;#93;&lt;/span&gt; crash_kexec at ffffffff810c4118&lt;br/&gt;
    /usr/src/debug/kernel-3.6.fc18/linux-3.6.10-4.fc18.x86_64/kernel/kexec.c: 1100&lt;br/&gt;
 #2 &lt;span class=&quot;error&quot;&gt;&amp;#91;ffff8800115cbdd0&amp;#93;&lt;/span&gt; panic at ffffffff816198e2&lt;br/&gt;
    /usr/src/debug/kernel-3.6.fc18/linux-3.6.10-4.fc18.x86_64/arch/x86/include/asm/smp.h: 95&lt;br/&gt;
 #3 &lt;span class=&quot;error&quot;&gt;&amp;#91;ffff8800115cbe50&amp;#93;&lt;/span&gt; lbug_with_loc at ffffffffa0418e5b &lt;span class=&quot;error&quot;&gt;&amp;#91;libcfs&amp;#93;&lt;/span&gt;&lt;br/&gt;
 #4 &lt;span class=&quot;error&quot;&gt;&amp;#91;ffff8800115cbe90&amp;#93;&lt;/span&gt; ll_encode_fh at ffffffffa0961b75 &lt;span class=&quot;error&quot;&gt;&amp;#91;lustre&amp;#93;&lt;/span&gt;&lt;br/&gt;
 #5 &lt;span class=&quot;error&quot;&gt;&amp;#91;ffff8800115cbed0&amp;#93;&lt;/span&gt; exportfs_encode_fh at ffffffff81264ce4&lt;br/&gt;
    /usr/src/debug/kernel-3.6.fc18/linux-3.6.10-4.fc18.x86_64/fs/exportfs/expfs.c: 361&lt;br/&gt;
 #6 &lt;span class=&quot;error&quot;&gt;&amp;#91;ffff8800115cbf10&amp;#93;&lt;/span&gt; sys_name_to_handle_at at ffffffff811e8f36&lt;br/&gt;
    /usr/src/debug/kernel-3.6.fc18/linux-3.6.10-4.fc18.x86_64/fs/fhandle.c: 52&lt;br/&gt;
 #7 &lt;span class=&quot;error&quot;&gt;&amp;#91;ffff8800115cbf80&amp;#93;&lt;/span&gt; system_call_fastpath at ffffffff8162bae9&lt;br/&gt;
    /usr/src/debug/kernel-3.6.fc18/linux-3.6.10-4.fc18.x86_64/arch/x86/kernel/entry_64.S: 532&lt;br/&gt;
    RIP: 00000030828f309a  RSP: 00007fff2f0d94c8  RFLAGS: 00010202&lt;br/&gt;
    RAX: 000000000000012f  RBX: ffffffff8162bae9  RCX: 00007fff2f0d9578&lt;br/&gt;
    RDX: 0000000000720010  RSI: 00007fff2f0da853  RDI: 0000000000000003&lt;br/&gt;
    RBP: 00007fff2f0d95b0   R8: 0000000000000400   R9: 616e20676e696c6c&lt;br/&gt;
    R10: 00007fff2f0d9578  R11: 0000000000000202  R12: 0000000000000000&lt;br/&gt;
    R13: 0000000000000000  R14: 00007fff2f0d9690  R15: 00000000004008f0&lt;br/&gt;
    ORIG_RAX: 000000000000012f  CS: 0033  SS: 002b&lt;/p&gt;</description>
                <environment></environment>
        <key id="20221">LU-3717</key>
            <summary>Kernel panic in ll_encode_fh() while testing file handle syscalls on FC18 client</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="3">Duplicate</resolution>
                                        <assignee username="yujian">Jian Yu</assignee>
                                    <reporter username="spimpale">Swapnil Pimpale</reporter>
                        <labels>
                    </labels>
                <created>Wed, 7 Aug 2013 08:35:42 +0000</created>
                <updated>Wed, 4 Dec 2013 01:24:08 +0000</updated>
                            <resolved>Wed, 4 Dec 2013 01:22:39 +0000</resolved>
                                    <version>Lustre 2.4.1</version>
                    <version>Lustre 2.5.0</version>
                                                        <due></due>
                            <votes>0</votes>
                                    <watches>9</watches>
                                                                            <comments>
                            <comment id="63887" author="green" created="Thu, 8 Aug 2013 16:21:13 +0000"  >&lt;p&gt;The LBUG is due to ll_inode2fid() wishing that the inode is not NULL, and it&apos;s somehow passed in as NULL to ll_encode_fh()&lt;br/&gt;
So we need to check for that and take some appropriate action.&lt;/p&gt;</comment>
                            <comment id="69737" author="yujian" created="Thu, 24 Oct 2013 12:42:59 +0000"  >&lt;p&gt;On FC18 client node, I set panic_on_lbug=0 and got the lctl debug log as follows:&lt;/p&gt;
&lt;div class=&quot;panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;panelContent&quot;&gt;
&lt;p&gt;00000080:00000001:2.0:1382612125.266070:0:21111:0:(llite_nfs.c:187:ll_encode_fh()) Process entered&lt;br/&gt;
00000080:00000040:2.0:1382612125.266071:0:21111:0:(llite_nfs.c:191:ll_encode_fh()) &lt;font color=&quot;green&quot;&gt;encoding for (144115205255725059,&lt;span class=&quot;error&quot;&gt;&amp;#91;0x200000400:0x3:0x0&amp;#93;&lt;/span&gt;) maxlen=32 minlen=32&lt;/font&gt;&lt;br/&gt;
00000080:00040000:2.0:1382612125.266073:0:21111:0:(llite_internal.h:1166:ll_inode2fid()) ASSERTION( inode != ((void *)0) ) failed:&lt;br/&gt;
00000080:00040000:2.0:1382612125.277251:0:21111:0:(llite_internal.h:1166:ll_inode2fid()) LBUG&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;In ll_encode_fh():&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; ll_encode_fh(struct inode *inode, __u32 *fh, &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt; *plen,
                        struct inode *parent)
{
        &lt;span class=&quot;code-comment&quot;&gt;//......
&lt;/span&gt;        CDEBUG(D_INFO, &lt;span class=&quot;code-quote&quot;&gt;&quot;encoding &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; (%lu,&quot;&lt;/span&gt;DFID&lt;span class=&quot;code-quote&quot;&gt;&quot;) maxlen=%d minlen=%d\n&quot;&lt;/span&gt;,
               inode-&amp;gt;i_ino, PFID(ll_inode2fid(inode)), *plen,
               (&lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;)sizeof(struct lustre_nfs_fid));

        &lt;span class=&quot;code-comment&quot;&gt;//......
&lt;/span&gt;        nfs_fid-&amp;gt;lnf_child = *ll_inode2fid(inode);
        nfs_fid-&amp;gt;lnf_parent = *ll_inode2fid(parent); &amp;lt;------ parent was NULL, which caused the ASSERTION failure
        &lt;span class=&quot;code-comment&quot;&gt;//......
&lt;/span&gt;}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Need to dig out why &quot;parent&quot; passed from exportfs_encode_fh() to ll_encode_fh() was NULL.&lt;/p&gt;</comment>
                            <comment id="69873" author="yujian" created="Fri, 25 Oct 2013 10:20:26 +0000"  >&lt;p&gt;In Linux kernel 3.6.10-4 used by FC18, exportfs_encode_fh() was called from do_sys_name_to_handle() as follows:&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;long&lt;/span&gt; do_sys_name_to_handle(struct path *path,
                                  struct file_handle __user *ufh,
                                  &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt; __user *mnt_id)
{
        &lt;span class=&quot;code-comment&quot;&gt;//......
&lt;/span&gt;        &lt;span class=&quot;code-comment&quot;&gt;/* we ask &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; a non connected handle */&lt;/span&gt;
        retval = exportfs_encode_fh(path-&amp;gt;dentry,
                                    (struct fid *)handle-&amp;gt;f_handle,
                                    &amp;amp;handle_dwords,  0); &amp;lt;------ Here, 0 was passed to exportfs_encode_fh().
        &lt;span class=&quot;code-comment&quot;&gt;//......
&lt;/span&gt;}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;While in exportfs_encode_fh(), the codes are:&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; exportfs_encode_fh(struct dentry *dentry, struct fid *fid, &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt; *max_len,
                       &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt; connectable)
{
        &lt;span class=&quot;code-comment&quot;&gt;//......
&lt;/span&gt;        struct inode *inode = dentry-&amp;gt;d_inode, *parent = NULL;

        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (connectable &amp;amp;&amp;amp; !S_ISDIR(inode-&amp;gt;i_mode)) { &amp;lt;------ Here, connectable was 0.
                p = dget_parent(dentry);
                &lt;span class=&quot;code-comment&quot;&gt;//......
&lt;/span&gt;                parent = p-&amp;gt;d_inode;
        }
        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (nop-&amp;gt;encode_fh)
                error = nop-&amp;gt;encode_fh(inode, fid-&amp;gt;raw, max_len, parent); &amp;lt;------ Here, parent was NULL.
        &lt;span class=&quot;code-comment&quot;&gt;//......
&lt;/span&gt;}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;So, exportfs_encode_fh() finally passed &quot;parent&quot; parameter as NULL to ll_encode_fh().&lt;br/&gt;
The ll_encode_fh() should check the &quot;parent&quot; value before running ll_inode2fid(). I&apos;ll upload a patch.&lt;/p&gt;</comment>
                            <comment id="69881" author="yujian" created="Fri, 25 Oct 2013 11:57:27 +0000"  >&lt;p&gt;Patch for master branch is in &lt;a href=&quot;http://review.whamcloud.com/8072&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/8072&lt;/a&gt;.&lt;/p&gt;</comment>
                            <comment id="72293" author="dmiter" created="Tue, 26 Nov 2013 09:51:53 +0000"  >&lt;p&gt;It&apos;s a similar issue to &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-4231&quot; title=&quot;NFS reexport leads to LBUG in mainline 3.12 client&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-4231&quot;&gt;&lt;del&gt;LU-4231&lt;/del&gt;&lt;/a&gt;. I have provided other patch  &lt;a href=&quot;http://review.whamcloud.com/8347&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/8347&lt;/a&gt; that more accurate distinguish cases where parent is NULL and not.&lt;/p&gt;</comment>
                            <comment id="72720" author="simmonsja" created="Tue, 3 Dec 2013 18:00:35 +0000"  >&lt;p&gt;Just tested the &lt;a href=&quot;http://review.whamcloud.com/8347&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/8347&lt;/a&gt; patch and I get this:&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;root@spoon46 ~&amp;#93;&lt;/span&gt;# /usr/lib64/lustre/tests/check_fhandle_syscalls temp-file /lustre/barry/&lt;br/&gt;
fh_bytes: 32&lt;br/&gt;
fh_type: 151&lt;br/&gt;
fh_data: 0 4 0 0 2 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 &lt;br/&gt;
check_fhandle_syscalls test Passed!&lt;/p&gt;

&lt;p&gt;It appears to work correctly.&lt;/p&gt;</comment>
                            <comment id="72769" author="yujian" created="Wed, 4 Dec 2013 01:22:39 +0000"  >&lt;p&gt;The patch in &lt;a href=&quot;http://review.whamcloud.com/8347&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/8347&lt;/a&gt; resolves the failure. Let&apos;s close this ticket as a duplicate of &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-4231&quot; title=&quot;NFS reexport leads to LBUG in mainline 3.12 client&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-4231&quot;&gt;&lt;del&gt;LU-4231&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                            <outwardlinks description="duplicates">
                                        <issuelink>
            <issuekey id="21939">LU-4231</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                        <issuelink>
            <issuekey id="19021">LU-3344</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|hzvxc7:</customfieldvalue>

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