<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 02:53:13 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-12509] lockdep warning in ofd_precreate_objects()</title>
                <link>https://jira.whamcloud.com/browse/LU-12509</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;[  141.023079]&lt;br/&gt;
============================================&lt;br/&gt;
[  141.023750] WARNING: possible recursive locking detected&lt;br/&gt;
[  141.024443] 4.18.0-debug #8 Tainted: G           O     --------- -  -&lt;br/&gt;
[  141.025226] --------------------------------------------&lt;br/&gt;
[  141.025967] ll_ost00_002/7298 is trying to acquire lock:&lt;br/&gt;
[  141.030372] 000000001989e622 (&amp;amp;mo-&amp;gt;oo_sem){++++}, at: osd_write_lock+0x8a/0xb0 &lt;span class=&quot;error&quot;&gt;&amp;#91;osd_zfs&amp;#93;&lt;/span&gt;&lt;br/&gt;
[  141.031190] &lt;br/&gt;
[  141.031190] but task is already holding lock:&lt;br/&gt;
[  141.032872] 0000000086a83aaf (&amp;amp;mo-&amp;gt;oo_sem){++++}, at: osd_write_lock+0x8a/0xb0 &lt;span class=&quot;error&quot;&gt;&amp;#91;osd_zfs&amp;#93;&lt;/span&gt;&lt;br/&gt;
[  141.033676] &lt;br/&gt;
[  141.033676] other info that might help us debug this:&lt;br/&gt;
[  141.034304]  Possible unsafe locking scenario:&lt;br/&gt;
[  141.034304] &lt;br/&gt;
[  141.034875]        CPU0&lt;br/&gt;
[  141.035121]        ----&lt;br/&gt;
[  141.035366]   lock(&amp;amp;mo-&amp;gt;oo_sem);&lt;br/&gt;
[  141.035678]   lock(&amp;amp;mo-&amp;gt;oo_sem);&lt;br/&gt;
[  141.035993] &lt;br/&gt;
[  141.035993]  *** DEADLOCK ***&lt;br/&gt;
[  141.035993] &lt;br/&gt;
[  141.037086]  May be due to missing lock nesting notation&lt;br/&gt;
[  141.037086] &lt;br/&gt;
[  141.037727] 3 locks held by ll_ost00_002/7298:&lt;br/&gt;
[  141.038186]  #0: 000000003540612a (&amp;amp;m-&amp;gt;ofd_lastid_rwsem)&lt;/p&gt;
{.+.+}
&lt;p&gt;, at: ofd_create_hdl+0x1a9/0x2270 &lt;span class=&quot;error&quot;&gt;&amp;#91;ofd&amp;#93;&lt;/span&gt;&lt;br/&gt;
[  141.039081]  #1: 00000000ee55375f (&amp;amp;oseq-&amp;gt;os_create_lock){&lt;ins&gt;.&lt;/ins&gt;.}, at: ofd_create_hdl+0x364/0x2270 &lt;span class=&quot;error&quot;&gt;&amp;#91;ofd&amp;#93;&lt;/span&gt;&lt;br/&gt;
[  141.039969]  #2: 0000000086a83aaf (&amp;amp;mo-&amp;gt;oo_sem){++++}, at: osd_write_lock+0x8a/0xb0 &lt;span class=&quot;error&quot;&gt;&amp;#91;osd_zfs&amp;#93;&lt;/span&gt;&lt;br/&gt;
[  141.041147] &lt;br/&gt;
[  141.041147] stack backtrace:&lt;br/&gt;
[  141.041568] CPU: 0 PID: 7298 Comm: ll_ost00_002 Tainted: G           O     --------- -  - 4.18.0-debug #8&lt;br/&gt;
[  141.042465] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011&lt;br/&gt;
[  141.043004] Call Trace:&lt;br/&gt;
[  141.043256]  dump_stack+0x106/0x175&lt;br/&gt;
[  141.043600]  validate_chain.isra.26.cold.44+0x224/0x2da&lt;br/&gt;
[  141.044103]  __lock_acquire+0x3df/0xa70&lt;br/&gt;
[  141.044535]  lock_acquire+0x13a/0x370&lt;br/&gt;
[  141.044908]  ? osd_write_lock+0x8a/0xb0 &lt;span class=&quot;error&quot;&gt;&amp;#91;osd_zfs&amp;#93;&lt;/span&gt;&lt;br/&gt;
[  141.045372]  down_write_nested+0x6f/0x120&lt;br/&gt;
[  141.045770]  ? osd_write_lock+0x8a/0xb0 &lt;span class=&quot;error&quot;&gt;&amp;#91;osd_zfs&amp;#93;&lt;/span&gt;&lt;br/&gt;
[  141.046236]  osd_write_lock+0x8a/0xb0 &lt;span class=&quot;error&quot;&gt;&amp;#91;osd_zfs&amp;#93;&lt;/span&gt;&lt;br/&gt;
[  141.046694]  ofd_precreate_objects+0x1764/0x2480 &lt;span class=&quot;error&quot;&gt;&amp;#91;ofd&amp;#93;&lt;/span&gt;&lt;br/&gt;
[  141.047201]  ofd_create_hdl+0xbec/0x2270 &lt;span class=&quot;error&quot;&gt;&amp;#91;ofd&amp;#93;&lt;/span&gt;&lt;br/&gt;
[  141.047722]  tgt_handle_request0+0xdf/0x890 &lt;span class=&quot;error&quot;&gt;&amp;#91;ptlrpc&amp;#93;&lt;/span&gt;&lt;br/&gt;
[  141.048274]  tgt_request_handle+0x3ca/0x1aa0 &lt;span class=&quot;error&quot;&gt;&amp;#91;ptlrpc&amp;#93;&lt;/span&gt;&lt;br/&gt;
[  141.048789]  ? libcfs_nid2str_r+0x12e/0x160 &lt;span class=&quot;error&quot;&gt;&amp;#91;lnet&amp;#93;&lt;/span&gt;&lt;br/&gt;
[  141.049332]  ptlrpc_server_handle_request+0x634/0x1180 &lt;span class=&quot;error&quot;&gt;&amp;#91;ptlrpc&amp;#93;&lt;/span&gt;&lt;br/&gt;
[  141.049898]  ? __wake_up+0x17/0x20&lt;br/&gt;
[  141.050299]  ptlrpc_main+0xd7f/0x1470 &lt;span class=&quot;error&quot;&gt;&amp;#91;ptlrpc&amp;#93;&lt;/span&gt;&lt;br/&gt;
[  141.050794]  ? ptlrpc_register_service+0x14c0/0x14c0 &lt;span class=&quot;error&quot;&gt;&amp;#91;ptlrpc&amp;#93;&lt;/span&gt;&lt;br/&gt;
[  141.051353]  kthread+0x190/0x1c0&lt;br/&gt;
[  141.051668]  ? kthread_create_worker+0x90/0x90&lt;br/&gt;
[  141.052102]  ret_from_fork+0x3a/0x50&lt;/p&gt;

&lt;p&gt;we should use different subclass to silent the lockdep false warning.&lt;/p&gt;</description>
                <environment></environment>
        <key id="56272">LU-12509</key>
            <summary>lockdep warning in ofd_precreate_objects()</summary>
                <type id="4" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11310&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="4" iconUrl="https://jira.whamcloud.com/images/icons/priorities/minor.svg">Minor</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="dongyang">Dongyang Li</assignee>
                                    <reporter username="dongyang">Dongyang Li</reporter>
                        <labels>
                    </labels>
                <created>Fri, 5 Jul 2019 07:14:03 +0000</created>
                <updated>Fri, 9 Aug 2019 15:14:38 +0000</updated>
                            <resolved>Fri, 9 Aug 2019 15:14:38 +0000</resolved>
                                                    <fixVersion>Lustre 2.13.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>5</watches>
                                                                            <comments>
                            <comment id="250707" author="gerrit" created="Fri, 5 Jul 2019 07:41:25 +0000"  >&lt;p&gt;Li Dongyang (dongyangli@ddn.com) uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/35420&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/35420&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-12509&quot; title=&quot;lockdep warning in ofd_precreate_objects()&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-12509&quot;&gt;&lt;del&gt;LU-12509&lt;/del&gt;&lt;/a&gt; ofd: ofd_precreate_objects lockdep warning&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: eb02aa76b5a91d5e1f0e0fb5e472ca6cf14e9a75&lt;/p&gt;</comment>
                            <comment id="251380" author="lixi_wc" created="Mon, 15 Jul 2019 03:58:02 +0000"  >&lt;p&gt;With the patch , still got error:&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;[  282.413781] ======================================================
[  282.414728] WARNING: possible circular locking dependency detected
[  282.415585] 4.18.0-debug #8 Tainted: G           O     --------- -  -
[  282.416258] ------------------------------------------------------
[  282.416893] ll_ost00_002/11461 is trying to acquire lock:
[  282.417510] 000000002a45f69d (&amp;amp;mo-&amp;gt;oo_sem/1){+.+.}, at: osd_write_lock+0x8a/0xb0 [osd_zfs]
[  282.418461] 
[  282.418461] but task is already holding lock:
[  282.419094] 000000004fe6dea8 (&amp;amp;mo-&amp;gt;oo_sem){++++}, at: osd_write_lock+0x8a/0xb0 [osd_zfs]
[  282.420475] 
[  282.420475] which lock already depends on the new lock.
[  282.420475] 
[  282.421953] 
[  282.421953] the existing dependency chain (in reverse order) is:
[  282.423119] 
[  282.423119] -&amp;gt; #1 (&amp;amp;mo-&amp;gt;oo_sem){++++}:
[  282.423898]        __lock_acquire+0x3df/0xa70
[  282.424291]        lock_acquire+0x13a/0x370
[  282.424820]        down_write_nested+0x6f/0x120
[  282.425497]        osd_write_lock+0x8a/0xb0 [osd_zfs]
[  282.426504]        __local_file_create+0xb37/0x2360 [obdclass]
[  282.427635]        local_file_find_or_create+0x17a/0x190 [obdclass]
[  282.429418]        lquota_disk_dir_find_create+0x18a/0x840 [lquota]
[  282.432498]        qmt_device_prepare+0xd0/0x280 [lquota]
[  282.433505]        mdt_quota_init+0x18ba/0x1c60 [mdt]
[  282.434509]        mdt_init0+0x1239/0x1490 [mdt]
[  282.435114]        mdt_device_alloc+0x115/0x170 [mdt]
[  282.435944]        obd_setup+0x150/0x300 [obdclass]
[  282.436867]        class_setup+0x4cd/0xa40 [obdclass]
[  282.437786]        class_process_config+0x194c/0x2ea0 [obdclass]
[  282.438892]        class_config_llog_handler+0xafa/0x1bd0 [obdclass]
[  282.440104]        llog_process_thread+0xc82/0x1f80 [obdclass]
[  282.441045]        llog_process_thread_daemonize+0xe4/0x140 [obdclass]
[  282.441787]        kthread+0x190/0x1c0
[  282.442178]        ret_from_fork+0x3a/0x50
[  282.442667] 
[  282.442667] -&amp;gt; #0 (&amp;amp;mo-&amp;gt;oo_sem/1){+.+.}:
[  282.443508]        validate_chain.isra.26+0x9a5/0xce0
[  282.444331]        __lock_acquire+0x3df/0xa70
[  282.445106]        lock_acquire+0x13a/0x370
[  282.445775]        down_write_nested+0x6f/0x120
[  282.446536]        osd_write_lock+0x8a/0xb0 [osd_zfs]
[  282.447515]        ofd_precreate_objects+0x1767/0x2480 [ofd]
[  282.448677]        ofd_create_hdl+0x952/0x2150 [ofd]
[  282.449838]        tgt_handle_request0+0xdf/0x890 [ptlrpc]
[  282.450870]        tgt_request_handle+0x3ca/0x1aa0 [ptlrpc]
[  282.452084]        ptlrpc_server_handle_request+0x634/0x1180 [ptlrpc]
[  282.453411]        ptlrpc_main+0xd7f/0x1470 [ptlrpc]
[  282.454434]        kthread+0x190/0x1c0
[  282.455099]        ret_from_fork+0x3a/0x50
[  282.455816] 
[  282.455816] other info that might help us debug this:
[  282.455816] 
[  282.457096]  Possible unsafe locking scenario:
[  282.457096] 
[  282.458055]        CPU0                    CPU1
[  282.458836]        ----                    ----
[  282.459634]   lock(&amp;amp;mo-&amp;gt;oo_sem);
[  282.460271]                                lock(&amp;amp;mo-&amp;gt;oo_sem/1);
[  282.461337]                                lock(&amp;amp;mo-&amp;gt;oo_sem);
[  282.462291]   lock(&amp;amp;mo-&amp;gt;oo_sem/1);
[  282.462910] 
[  282.462910]  *** DEADLOCK ***
[  282.462910] 
[  282.463974] 3 locks held by ll_ost00_002/11461:
[  282.464726]  #0: 00000000e1797232 (&amp;amp;m-&amp;gt;ofd_lastid_rwsem){.+.+}, at: ofd_create_hdl+0x1a9/0x2150 [ofd]
[  282.466266]  #1: 00000000f9816a9f (&amp;amp;oseq-&amp;gt;os_create_lock){+.+.}, at: ofd_create_hdl+0x364/0x2150 [ofd]
[  282.467782]  #2: 000000004fe6dea8 (&amp;amp;mo-&amp;gt;oo_sem){++++}, at: osd_write_lock+0x8a/0xb0 [osd_zfs]
[  282.469186] 
[  282.469186] stack backtrace:
[  282.470030] CPU: 2 PID: 11461 Comm: ll_ost00_002 Kdump: loaded Tainted: G           O     --------- -  - 4.18.0-debug #8
[  282.471895] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
[  282.473009] Call Trace:
[  282.473563]  dump_stack+0x106/0x175
[  282.474224]  print_circular_bug.isra.25.cold.36+0x238/0x252
[  282.475345]  check_prev_add.constprop.28+0x607/0x6f0
[  282.476472]  ? __lock_acquire+0x410/0xa70
[  282.477316]  validate_chain.isra.26+0x9a5/0xce0
[  282.478188]  __lock_acquire+0x3df/0xa70
[  282.478922]  lock_acquire+0x13a/0x370
[  282.479711]  ? osd_write_lock+0x8a/0xb0 [osd_zfs]
[  282.480625]  down_write_nested+0x6f/0x120
[  282.481385]  ? osd_write_lock+0x8a/0xb0 [osd_zfs]
[  282.482245]  osd_write_lock+0x8a/0xb0 [osd_zfs]
[  282.483065]  ofd_precreate_objects+0x1767/0x2480 [ofd]
[  282.484082]  ofd_create_hdl+0x952/0x2150 [ofd]
[  282.485115]  tgt_handle_request0+0xdf/0x890 [ptlrpc]
[  282.486177]  tgt_request_handle+0x3ca/0x1aa0 [ptlrpc]
[  282.487285]  ptlrpc_server_handle_request+0x634/0x1180 [ptlrpc]
[  282.488390]  ? __wake_up+0x17/0x20
[  282.489200]  ptlrpc_main+0xd7f/0x1470 [ptlrpc]
[  282.490286]  ? ptlrpc_register_service+0x14c0/0x14c0 [ptlrpc]
[  282.491460]  kthread+0x190/0x1c0
[  282.492007]  ? kthread_create_worker+0x90/0x90
[  282.492805]  ret_from_fork+0x3a/0x50
[  288.692309] LustreError: 137-5: lustre-OST0001_UUID: not available for connect from 192.168.200.130@tcp (no target). If you are running an HA pair check that the target is mounted on the other server.
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;a href=&quot;http://testing.linuxhacker.ru:3333/lustre-reports/1076/testresults/runtests-zfs-rhel8.0_x86_64-rhel8.0_x86_64/oleg30-server-console.txt&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://testing.linuxhacker.ru:3333/lustre-reports/1076/testresults/runtests-zfs-rhel8.0_x86_64-rhel8.0_x86_64/oleg30-server-console.txt&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="251687" author="adilger" created="Fri, 19 Jul 2019 03:42:28 +0000"  >&lt;p&gt;Alex, does this relate to your patch &lt;a href=&quot;https://review.whamcloud.com/31293&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/31293&lt;/a&gt; &quot;&lt;tt&gt;&lt;a href=&quot;https://jira.whamcloud.com/browse/LU-10048&quot; title=&quot;osd-ldiskfs to truncate outside of main transaction&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-10048&quot;&gt;&lt;del&gt;LU-10048&lt;/del&gt;&lt;/a&gt; ofd: take local locks within transaction&lt;/tt&gt;&quot;?&lt;/p&gt;</comment>
                            <comment id="251692" author="dongyang" created="Fri, 19 Jul 2019 06:37:36 +0000"  >&lt;p&gt;Looks like 31293 changed the dt_write_lock order, so if we have 31293 landed, we don&apos;t need this patch anymore.&lt;/p&gt;</comment>
                            <comment id="251787" author="bzzz" created="Mon, 22 Jul 2019 05:16:36 +0000"  >&lt;p&gt;what exact kernel options do you use to cause the warning?&lt;br/&gt;
I&apos;m using linux-4.18.0-32.el8 with the following options:&lt;br/&gt;
CONFIG_LOCKDEP_SUPPORT=y&lt;br/&gt;
CONFIG_LOCKDEP=y&lt;br/&gt;
CONFIG_DEBUG_LOCKDEP=y&lt;br/&gt;
but can&apos;t reproduce the warning.&lt;/p&gt;</comment>
                            <comment id="251788" author="dongyang" created="Mon, 22 Jul 2019 05:52:51 +0000"  >&lt;p&gt;This is actually found by Oleg, see here:&lt;br/&gt;
&lt;a href=&quot;http://testing.linuxhacker.ru:3333/lustre-reports/dev/7/testresults/racer-zfs-rhel8.0_x86_64-rhel8.0_x86_64/oleg103-server-console.txt&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://testing.linuxhacker.ru:3333/lustre-reports/dev/7/testresults/racer-zfs-rhel8.0_x86_64-rhel8.0_x86_64/oleg103-server-console.txt&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;and here:&lt;br/&gt;
&lt;a href=&quot;http://testing.linuxhacker.ru:3333/lustre-reports/dev/7/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://testing.linuxhacker.ru:3333/lustre-reports/dev/7/&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="251790" author="bzzz" created="Mon, 22 Jul 2019 06:45:25 +0000"  >&lt;p&gt;hmm, took Oleg&apos;s .config for rhel8, but still can&apos;t get the warning.. keep trying.&lt;/p&gt;</comment>
                            <comment id="252836" author="gerrit" created="Fri, 9 Aug 2019 04:40:28 +0000"  >&lt;p&gt;Oleg Drokin (green@whamcloud.com) merged in patch &lt;a href=&quot;https://review.whamcloud.com/35420/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/35420/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-12509&quot; title=&quot;lockdep warning in ofd_precreate_objects()&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-12509&quot;&gt;&lt;del&gt;LU-12509&lt;/del&gt;&lt;/a&gt; ofd: ofd_precreate_objects lockdep warning&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: 697dcf4e87f2dbebe57f3ccb9c0b0962b89cf1b4&lt;/p&gt;</comment>
                            <comment id="252883" author="pjones" created="Fri, 9 Aug 2019 15:14:38 +0000"  >&lt;p&gt;Landed for 2.13&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="55582">LU-12269</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|i00j7r:</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>
                                                                                                                                                                                                                                                                                                                                                                                                                </customfields>
    </item>
</channel>
</rss>