<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 02:02:29 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-6701] possible lock inversion during mkfs</title>
                <link>https://jira.whamcloud.com/browse/LU-6701</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;Got this while testing with a debug kernel:&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;Jun  8 11:35:52 mds kernel: [ INFO: possible circular locking dependency detected ]
Jun  8 11:35:52 mds kernel: 3.10.0-229.4.2.el7.centos.x86_64.debug #1 Tainted: GF          O--------------  
Jun  8 11:35:52 mds kernel: -------------------------------------------------------
Jun  8 11:35:52 mds kernel: mkfs.lustre/31035 is trying to acquire lock:
Jun  8 11:35:52 mds kernel: (&amp;amp;s-&amp;gt;s_dquot.dqio_mutex){+.+...}, at: [&amp;lt;ffffffff812807eb&amp;gt;] dquot_commit+0x2b/0xc0
Jun  8 11:35:52 mds kernel: 
but task is already holding lock:
Jun  8 11:35:52 mds kernel: (&amp;amp;ei-&amp;gt;i_data_sem){++++..}, at: [&amp;lt;ffffffffa056f0a4&amp;gt;] ldiskfs_map_blocks+0x144/0x590 [ldiskfs]
Jun  8 11:35:52 mds kernel: 
which lock already depends on the &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; lock.

Jun  8 11:35:52 mds kernel: 
the existing dependency chain (in reverse order) is:
Jun  8 11:35:52 mds kernel: 
-&amp;gt; #1 (&amp;amp;ei-&amp;gt;i_data_sem){++++..}:
Jun  8 11:35:52 mds kernel:       [&amp;lt;ffffffff810fd91f&amp;gt;] validate_chain.isra.43+0x49f/0x910
Jun  8 11:35:52 mds kernel:       [&amp;lt;ffffffff810fec26&amp;gt;] __lock_acquire+0x3c6/0xb60
Jun  8 11:35:52 mds kernel:       [&amp;lt;ffffffff810ffb99&amp;gt;] lock_acquire+0x99/0x1e0
Jun  8 11:35:52 mds kernel:       [&amp;lt;ffffffff816cd691&amp;gt;] down_read+0x51/0xa0
Jun  8 11:35:52 mds kernel:       [&amp;lt;ffffffffa056f2a4&amp;gt;] ldiskfs_map_blocks+0x344/0x590 [ldiskfs]
Jun  8 11:35:52 mds kernel:       [&amp;lt;ffffffffa056f555&amp;gt;] ldiskfs_getblk+0x65/0x210 [ldiskfs]
Jun  8 11:35:52 mds kernel:       [&amp;lt;ffffffffa056f727&amp;gt;] ldiskfs_bread+0x27/0xe0 [ldiskfs]
Jun  8 11:35:52 mds kernel:       [&amp;lt;ffffffffa058114e&amp;gt;] ldiskfs_quota_read+0xee/0x150 [ldiskfs]
Jun  8 11:35:52 mds kernel:       [&amp;lt;ffffffff812848dc&amp;gt;] read_blk+0x4c/0x60
Jun  8 11:35:52 mds kernel:       [&amp;lt;ffffffff81285767&amp;gt;] find_tree_dqentry+0x47/0x240
Jun  8 11:35:52 mds kernel:       [&amp;lt;ffffffff812858ca&amp;gt;] find_tree_dqentry+0x1aa/0x240
Jun  8 11:35:52 mds kernel:       [&amp;lt;ffffffff812858ca&amp;gt;] find_tree_dqentry+0x1aa/0x240
Jun  8 11:35:52 mds kernel:       [&amp;lt;ffffffff812858ca&amp;gt;] find_tree_dqentry+0x1aa/0x240
Jun  8 11:35:52 mds kernel:       [&amp;lt;ffffffff81285aac&amp;gt;] qtree_read_dquot+0x14c/0x380
Jun  8 11:35:52 mds kernel:       [&amp;lt;ffffffff81283f0b&amp;gt;] v2_read_dquot+0x2b/0x30
Jun  8 11:35:52 mds kernel:       [&amp;lt;ffffffff8127f9b4&amp;gt;] dquot_acquire+0xf4/0x140
Jun  8 11:35:52 mds kernel:       [&amp;lt;ffffffffa0580656&amp;gt;] ldiskfs_acquire_dquot+0x66/0xb0 [ldiskfs]
Jun  8 11:35:52 mds kernel:       [&amp;lt;ffffffff81280fff&amp;gt;] dqget+0x3ef/0x450
Jun  8 11:35:52 mds kernel:       [&amp;lt;ffffffff8128110d&amp;gt;] __dquot_initialize+0xad/0x1c0
Jun  8 11:35:52 mds kernel:       [&amp;lt;ffffffff81281233&amp;gt;] dquot_initialize+0x13/0x20
Jun  8 11:35:52 mds kernel:       [&amp;lt;ffffffffa0567b5c&amp;gt;] ldiskfs_mkdir+0x6c/0x280 [ldiskfs]
Jun  8 11:35:52 mds kernel:       [&amp;lt;ffffffff81222d47&amp;gt;] vfs_mkdir+0xb7/0x160
Jun  8 11:35:52 mds kernel:       [&amp;lt;ffffffff8122965f&amp;gt;] SyS_mkdirat+0x6f/0xe0
Jun  8 11:35:52 mds kernel:       [&amp;lt;ffffffff812296e9&amp;gt;] SyS_mkdir+0x19/0x20
Jun  8 11:35:52 mds kernel:       [&amp;lt;ffffffff816dace9&amp;gt;] system_call_fastpath+0x16/0x1b
Jun  8 11:35:52 mds kernel: 
-&amp;gt; #0 (&amp;amp;s-&amp;gt;s_dquot.dqio_mutex){+.+...}:
Jun  8 11:35:52 mds kernel:       [&amp;lt;ffffffff810fd477&amp;gt;] check_prevs_add+0x987/0x990
Jun  8 11:35:52 mds kernel:       [&amp;lt;ffffffff810fd91f&amp;gt;] validate_chain.isra.43+0x49f/0x910
Jun  8 11:35:52 mds kernel:       [&amp;lt;ffffffff810fec26&amp;gt;] __lock_acquire+0x3c6/0xb60
Jun  8 11:35:52 mds kernel:       [&amp;lt;ffffffff810ffb99&amp;gt;] lock_acquire+0x99/0x1e0
Jun  8 11:35:52 mds kernel:       [&amp;lt;ffffffff816ccb29&amp;gt;] mutex_lock_nested+0x99/0x520
Jun  8 11:35:52 mds kernel:       [&amp;lt;ffffffff812807eb&amp;gt;] dquot_commit+0x2b/0xc0
Jun  8 11:35:52 mds kernel:       [&amp;lt;ffffffffa058070c&amp;gt;] ldiskfs_write_dquot+0x6c/0x90 [ldiskfs]
Jun  8 11:35:52 mds kernel:       [&amp;lt;ffffffffa058076f&amp;gt;] ldiskfs_mark_dquot_dirty+0x3f/0x60 [ldiskfs]
Jun  8 11:35:52 mds kernel:       [&amp;lt;ffffffff81283c11&amp;gt;] __dquot_alloc_space+0x191/0x260
Jun  8 11:35:52 mds kernel:       [&amp;lt;ffffffffa05a13f1&amp;gt;] ldiskfs_mb_new_blocks+0x101/0x8c0 [ldiskfs]
Jun  8 11:35:52 mds kernel:       [&amp;lt;ffffffffa0554b59&amp;gt;] ldiskfs_alloc_branch+0x3c9/0x440 [ldiskfs]
Jun  8 11:35:52 mds kernel:       [&amp;lt;ffffffffa0555837&amp;gt;] ldiskfs_ind_map_blocks+0x207/0x920 [ldiskfs]
Jun  8 11:35:52 mds kernel:       [&amp;lt;ffffffffa056f1e5&amp;gt;] ldiskfs_map_blocks+0x285/0x590 [ldiskfs]
Jun  8 11:35:52 mds kernel:       [&amp;lt;ffffffffa056f555&amp;gt;] ldiskfs_getblk+0x65/0x210 [ldiskfs]
Jun  8 11:35:52 mds kernel:       [&amp;lt;ffffffffa056f727&amp;gt;] ldiskfs_bread+0x27/0xe0 [ldiskfs]
Jun  8 11:35:52 mds kernel:       [&amp;lt;ffffffffa0560b61&amp;gt;] ldiskfs_append+0x81/0x150 [ldiskfs]
Jun  8 11:35:52 mds kernel:       [&amp;lt;ffffffffa056792f&amp;gt;] ldiskfs_init_new_dir+0xcf/0x230 [ldiskfs]
Jun  8 11:35:52 mds kernel:       [&amp;lt;ffffffffa0567c74&amp;gt;] ldiskfs_mkdir+0x184/0x280 [ldiskfs]
Jun  8 11:35:52 mds kernel:       [&amp;lt;ffffffff81222d47&amp;gt;] vfs_mkdir+0xb7/0x160
Jun  8 11:35:52 mds kernel:       [&amp;lt;ffffffff8122965f&amp;gt;] SyS_mkdirat+0x6f/0xe0
Jun  8 11:35:52 mds kernel:       [&amp;lt;ffffffff812296e9&amp;gt;] SyS_mkdir+0x19/0x20
Jun  8 11:35:52 mds kernel:       [&amp;lt;ffffffff816dace9&amp;gt;] system_call_fastpath+0x16/0x1b
Jun  8 11:35:52 mds kernel: 
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;In the first trace, dquot_acquire takes s-&amp;gt;s_dquot.dqio_mutex, and later ldiskfs_map_blocks is called, which takes ei-&amp;gt;i_data_sem.&lt;/p&gt;

&lt;p&gt;In the second trace, it looks like ldiskfs_map_blocks takes ei-&amp;gt;i_data_sem and later calls dquot_commit, which takes s-&amp;gt;s_dquot.dqio_mutex.&lt;/p&gt;

&lt;p&gt;I&apos;m not sure if this is a real problem, but I thought I&apos;d report it in case anyone else ever sees these traces. It&apos;s possibly related to this false positive?:&lt;br/&gt;
&lt;a href=&quot;http://permalink.gmane.org/gmane.comp.file-systems.ext4/16995&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://permalink.gmane.org/gmane.comp.file-systems.ext4/16995&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
        <key id="30569">LU-6701</key>
            <summary>possible lock inversion during mkfs</summary>
                <type id="1" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="5" iconUrl="https://jira.whamcloud.com/images/icons/priorities/trivial.svg">Trivial</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="wc-triage">WC Triage</assignee>
                                    <reporter username="kit.westneat">Kit Westneat</reporter>
                        <labels>
                    </labels>
                <created>Tue, 9 Jun 2015 17:42:40 +0000</created>
                <updated>Tue, 9 Jun 2015 18:05:10 +0000</updated>
                            <resolved>Tue, 9 Jun 2015 18:05:10 +0000</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>2</watches>
                                                                            <comments>
                            <comment id="117953" author="adilger" created="Tue, 9 Jun 2015 18:05:10 +0000"  >&lt;p&gt;Duplicate bug filed as &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-6700&quot; title=&quot;possible lock inversion during mkfs&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-6700&quot;&gt;&lt;del&gt;LU-6700&lt;/del&gt;&lt;/a&gt; also.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                            <outwardlinks description="duplicates">
                                        <issuelink>
            <issuekey id="30568">LU-6700</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|hzxfan:</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>