<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 01:51:45 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-5468] (mdc_locks.c:130:mdc_set_lock_data()) ASSERTION( old_i node-&gt;i_state &amp; I_FREEING ) failed</title>
                <link>https://jira.whamcloud.com/browse/LU-5468</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;Running racer with MDSCOUNT=2 and fault injection I see this often:&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;[  156.683517] LustreError: 6471:0:(ldlm_resource.c:1150:ldlm_resource_get()) lustre-OST0001: lvbo_init failed for resource 0x240000400:0x1fa: rc = -14
[  156.709334] LustreError: 25560:0:(mdc_locks.c:130:mdc_set_lock_data()) ASSERTION( old_inode-&amp;gt;i_state &amp;amp; I_FREEING ) failed: Found existing inode ffff8801c82f3180/198158400800950378/46137348 state 1 in lock: setting data to ffff8801d3c01180/198158400800950378/46137348
[  156.714833] LustreError: 25560:0:(mdc_locks.c:130:mdc_set_lock_data()) LBUG
[  156.716560] Pid: 25560, comm: chmod
[  156.717391] 
[  156.717393] Call Trace:
[  156.718410]  [&amp;lt;ffffffffa02be8c5&amp;gt;] libcfs_debug_dumpstack+0x55/0x80 [libcfs]
[  156.720233]  [&amp;lt;ffffffffa02beec7&amp;gt;] lbug_with_loc+0x47/0xb0 [libcfs]
[  156.721706]  [&amp;lt;ffffffffa0918c40&amp;gt;] mdc_set_lock_data+0x200/0x240 [mdc]
[  156.723274]  [&amp;lt;ffffffffa08ba838&amp;gt;] lmv_set_lock_data+0x108/0x3a0 [lmv]
[  156.724811]  [&amp;lt;ffffffffa0ec4b7c&amp;gt;] ll_lookup_it_finish+0x93c/0x11b0 [lustre]
[  156.726507]  [&amp;lt;ffffffff810b777d&amp;gt;] ? trace_hardirqs_on+0xd/0x10
[  156.727900]  [&amp;lt;ffffffffa0ec3a40&amp;gt;] ? ll_md_blocking_ast+0x0/0x800 [lustre]
[  156.729682]  [&amp;lt;ffffffffa0ec56a7&amp;gt;] ll_lookup_it+0x2b7/0xad0 [lustre]
[  156.731340]  [&amp;lt;ffffffffa0ec5f4c&amp;gt;] ll_lookup_nd+0x8c/0x560 [lustre]
[  156.733089]  [&amp;lt;ffffffff811b29b5&amp;gt;] do_lookup+0x1a5/0x230
[  156.734536]  [&amp;lt;ffffffff811b2fc4&amp;gt;] __link_path_walk+0x584/0x840
[  156.736240]  [&amp;lt;ffffffff811b398a&amp;gt;] path_walk+0x6a/0xe0
[  156.737622]  [&amp;lt;ffffffff811b3b9b&amp;gt;] filename_lookup+0x6b/0xc0
[  156.738941]  [&amp;lt;ffffffff811b4cc7&amp;gt;] user_path_at+0x57/0xa0
[  156.740201]  [&amp;lt;ffffffff8104bc84&amp;gt;] ? __do_page_fault+0x244/0x4b0
[  156.741611]  [&amp;lt;ffffffff81162d60&amp;gt;] ? __vma_link_rb+0x30/0x40
[  156.742939]  [&amp;lt;ffffffff811a8790&amp;gt;] vfs_fstatat+0x50/0xa0
[  156.744174]  [&amp;lt;ffffffff811a890b&amp;gt;] vfs_stat+0x1b/0x20
[  156.745475]  [&amp;lt;ffffffff811a8934&amp;gt;] sys_newstat+0x24/0x50
[  156.746467]  [&amp;lt;ffffffff81554298&amp;gt;] ? lockdep_sys_exit_thunk+0x35/0x67
[  156.748806]  [&amp;lt;ffffffff810f08f7&amp;gt;] ? audit_syscall_entry+0x1d7/0x200
[  156.750032]  [&amp;lt;ffffffff81554222&amp;gt;] ? trace_hardirqs_on_thunk+0x3a/0x3f
[  156.751193]  [&amp;lt;ffffffff8100b072&amp;gt;] system_call_fastpath+0x16/0x1b
[  156.752279] 
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Instrumenting mdc_set_lock_data() shows that in each case that fails the assertion we have &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;is_bad_inode(old_inode) || is_bad_inode(new_inode)&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;.&lt;/p&gt;

&lt;p&gt;We should not call make_bad_inode() from the ll_update_inode() branch of ll_iget() since it unhashes (and modifies) an inode that may already associated with a lock:&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;void make_bad_inode(struct inode *inode)
{
        remove_inode_hash(inode);

        inode-&amp;gt;i_mode = S_IFREG;
        inode-&amp;gt;i_atime = inode-&amp;gt;i_mtime = inode-&amp;gt;i_ctime =
                       current_fs_time(inode-&amp;gt;i_sb);
        inode-&amp;gt;i_op = &amp;amp;bad_inode_ops;
        inode-&amp;gt;i_fop = &amp;amp;bad_file_ops;
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;This is only observed with MDSCOUNT &amp;gt; 1 because (currently) ll_update_inode() will succeed otherwise.&lt;/p&gt;</description>
                <environment></environment>
        <key id="25937">LU-5468</key>
            <summary>(mdc_locks.c:130:mdc_set_lock_data()) ASSERTION( old_i node-&gt;i_state &amp; I_FREEING ) failed</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="6" iconUrl="https://jira.whamcloud.com/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="1">Fixed</resolution>
                                        <assignee username="jhammond">John Hammond</assignee>
                                    <reporter username="jhammond">John Hammond</reporter>
                        <labels>
                            <label>fault</label>
                            <label>llite</label>
                    </labels>
                <created>Sat, 9 Aug 2014 00:53:17 +0000</created>
                <updated>Fri, 29 May 2015 18:24:57 +0000</updated>
                            <resolved>Mon, 27 Apr 2015 20:44:20 +0000</resolved>
                                    <version>Lustre 2.7.0</version>
                                    <fixVersion>Lustre 2.7.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>1</watches>
                                                                            <comments>
                            <comment id="92538" author="jhammond" created="Tue, 26 Aug 2014 21:41:00 +0000"  >&lt;p&gt;Please see &lt;a href=&quot;http://review.whamcloud.com/#/c/11609/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/#/c/11609/&lt;/a&gt;.&lt;/p&gt;</comment>
                            <comment id="94839" author="jhammond" created="Wed, 24 Sep 2014 15:38:55 +0000"  >&lt;p&gt;Patch landed to master.&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|hzwtav:</customfieldvalue>

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