<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 01:59:58 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-6409] sleeping while atomic in nodemap_destroy</title>
                <link>https://jira.whamcloud.com/browse/LU-6409</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;nodemap_destroy seems to be using mutexes when called under spinlock/rwlock.&lt;/p&gt;

&lt;p&gt;Here&apos;s the relevant error message:&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;[ 6003.169249] Lustre: server umount lustre-OST0001 complete
[ 6007.190173] BUG: sleeping function called from invalid context at kernel/mutex.c:576
[ 6007.190482] in_atomic(): 1, irqs_disabled(): 0, pid: 20641, name: rmmod
[ 6007.190659] 1 lock held by rmmod/20641:
[ 6007.190805]  #0:  (&amp;amp;new_bkts[i]-&amp;gt;hsb_lock.rw){......}, at: [&amp;lt;ffffffffa015151d&amp;gt;] cfs_hash_rw_lock+0xd/0x20 [libcfs]
[ 6007.191177] CPU: 3 PID: 20641 Comm: rmmod Tainted: GF       W  O--------------   3.10.0-debug #5
[ 6007.191480] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
[ 6007.191648]  ffff880083aac540 000000008428f159 ffff8800967e7d50 ffffffff816ccb68
[ 6007.191954]  ffff8800967e7d68 ffffffff810a8fd9 ffff8800a8d2b0c0 ffff8800967e7de8
[ 6007.192275]  ffffffff816d0dd5 0000000000000000 ffff8800967e7de0 0000000000000246
[ 6007.192582] Call Trace:
[ 6007.192716]  [&amp;lt;ffffffff816ccb68&amp;gt;] dump_stack+0x19/0x1b
[ 6007.192879]  [&amp;lt;ffffffff810a8fd9&amp;gt;] __might_sleep+0xe9/0x110
[ 6007.193063]  [&amp;lt;ffffffff816d0dd5&amp;gt;] mutex_lock_nested+0x55/0x490
[ 6007.193281]  [&amp;lt;ffffffffa057cfa4&amp;gt;] ? nodemap_destroy+0x74/0x1f0 [ptlrpc]
[ 6007.193491]  [&amp;lt;ffffffffa05812ab&amp;gt;] nm_member_reclassify_nodemap+0x1b/0x40 [ptlrpc]
[ 6007.193799]  [&amp;lt;ffffffffa057cfbc&amp;gt;] nodemap_destroy+0x8c/0x1f0 [ptlrpc]
[ 6007.193993]  [&amp;lt;ffffffffa057d14d&amp;gt;] nodemap_putref+0x2d/0xa0 [ptlrpc]
[ 6007.194201]  [&amp;lt;ffffffffa057e1f5&amp;gt;] nodemap_hs_put_locked+0x15/0x20 [ptlrpc]
[ 6007.194392]  [&amp;lt;ffffffffa0151f25&amp;gt;] cfs_hash_bd_del_locked+0x75/0xf0 [libcfs]
[ 6007.194578]  [&amp;lt;ffffffffa015579c&amp;gt;] cfs_hash_putref+0x1cc/0x500 [libcfs]
[ 6007.194771]  [&amp;lt;ffffffffa057e22a&amp;gt;] nodemap_cleanup_all+0x2a/0x30 [ptlrpc]
[ 6007.194967]  [&amp;lt;ffffffffa057e23e&amp;gt;] nodemap_mod_exit+0xe/0x20 [ptlrpc]
[ 6007.195177]  [&amp;lt;ffffffffa0583bbd&amp;gt;] ptlrpc_exit+0x9/0x44c [ptlrpc]
[ 6007.195354]  [&amp;lt;ffffffff810e769b&amp;gt;] SyS_delete_module+0x16b/0x2d0
[ 6007.195526]  [&amp;lt;ffffffff816df369&amp;gt;] system_call_fastpath+0x16/0x1b
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
        <key id="29300">LU-6409</key>
            <summary>sleeping while atomic in nodemap_destroy</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="wc-triage">WC Triage</assignee>
                                    <reporter username="green">Oleg Drokin</reporter>
                        <labels>
                            <label>patch</label>
                    </labels>
                <created>Sat, 28 Mar 2015 01:09:30 +0000</created>
                <updated>Thu, 23 Mar 2017 19:33:42 +0000</updated>
                            <resolved>Mon, 29 Jun 2015 22:50:33 +0000</resolved>
                                                    <fixVersion>Lustre 2.8.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>8</watches>
                                                                            <comments>
                            <comment id="111052" author="gerrit" created="Mon, 30 Mar 2015 23:45:13 +0000"  >&lt;p&gt;Kit Westneat (kit.westneat@gmail.com) uploaded a new patch: &lt;a href=&quot;http://review.whamcloud.com/14275&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/14275&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-6409&quot; title=&quot;sleeping while atomic in nodemap_destroy&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-6409&quot;&gt;&lt;del&gt;LU-6409&lt;/del&gt;&lt;/a&gt; nodemap: replace mutex with spinlock&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: c334985339b345fc90128f3d9d55d0779e2dd8ca&lt;/p&gt;</comment>
                            <comment id="111953" author="green" created="Sat, 11 Apr 2015 04:13:42 +0000"  >&lt;p&gt;Please note that with this latest patch I still get this warning:&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;Apr 11 00:01:22 centos6-1 kernel: BUG: sleeping function called from invalid context at /home/green/git/lustre-release/libcfs/libcfs/hash.c:1148
Apr 11 00:01:22 centos6-1 kernel: in_atomic(): 1, irqs_disabled(): 0, pid: 17878, name: rmmod
Apr 11 00:01:22 centos6-1 kernel: 1 lock held by rmmod/17878:
Apr 11 00:01:22 centos6-1 kernel: #0:  (&amp;amp;new_bkts[i]-&amp;gt;hsb_lock.rw){......}, at: [&amp;lt;ffffffffa01c030d&amp;gt;] cfs_hash_rw_lock+0xd/0x20 [libcfs]
Apr 11 00:01:22 centos6-1 kernel: CPU: 7 PID: 17878 Comm: rmmod Tainted: GF       W  O--------------   3.10.0-debug #5
Apr 11 00:01:22 centos6-1 kernel: Hardware name: Red Hat KVM, BIOS 0.5.1 01/01/2011
Apr 11 00:01:22 centos6-1 kernel: ffff880077774740 0000000096882851 ffff880091d93d80 ffffffff816ccb68
Apr 11 00:01:22 centos6-1 kernel: ffff880091d93d98 ffffffff810a8fd9 0000000000000003 ffff880091d93de8
Apr 11 00:01:22 centos6-1 kernel: ffffffffa01c45f3 0000000096882851 ffff88007aeebcc0 ffff880000000008
Apr 11 00:01:22 centos6-1 kernel: Call Trace:
Apr 11 00:01:22 centos6-1 kernel: [&amp;lt;ffffffff816ccb68&amp;gt;] dump_stack+0x19/0x1b
Apr 11 00:01:22 centos6-1 kernel: [&amp;lt;ffffffff810a8fd9&amp;gt;] __might_sleep+0xe9/0x110
Apr 11 00:01:22 centos6-1 kernel: [&amp;lt;ffffffffa01c45f3&amp;gt;] cfs_hash_putref+0x233/0x500 [libcfs]
Apr 11 00:01:22 centos6-1 kernel: [&amp;lt;ffffffffa05ac15f&amp;gt;] nm_member_delete_hash+0x2f/0x40 [ptlrpc]
Apr 11 00:01:22 centos6-1 kernel: [&amp;lt;ffffffffa05a8014&amp;gt;] nodemap_destroy+0xa4/0x1f0 [ptlrpc]
Apr 11 00:01:22 centos6-1 kernel: [&amp;lt;ffffffffa05a818d&amp;gt;] nodemap_putref+0x2d/0xa0 [ptlrpc]
Apr 11 00:01:22 centos6-1 kernel: [&amp;lt;ffffffffa05a9235&amp;gt;] nodemap_hs_put_locked+0x15/0x20 [ptlrpc]
Apr 11 00:01:22 centos6-1 kernel: [&amp;lt;ffffffffa01c0d15&amp;gt;] cfs_hash_bd_del_locked+0x75/0xf0 [libcfs]
Apr 11 00:01:22 centos6-1 kernel: [&amp;lt;ffffffffa01c458c&amp;gt;] cfs_hash_putref+0x1cc/0x500 [libcfs]
Apr 11 00:01:22 centos6-1 kernel: [&amp;lt;ffffffffa05a926a&amp;gt;] nodemap_cleanup_all+0x2a/0x30 [ptlrpc]
Apr 11 00:01:22 centos6-1 kernel: [&amp;lt;ffffffffa05a927e&amp;gt;] nodemap_mod_exit+0xe/0x20 [ptlrpc]
Apr 11 00:01:22 centos6-1 kernel: [&amp;lt;ffffffffa05aebc2&amp;gt;] ptlrpc_exit+0x9/0x447 [ptlrpc]
Apr 11 00:01:22 centos6-1 kernel: [&amp;lt;ffffffff810e769b&amp;gt;] SyS_delete_module+0x16b/0x2d0
Apr 11 00:01:22 centos6-1 kernel: [&amp;lt;ffffffff816df369&amp;gt;] system_call_fastpath+0x16/0x1b
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;This is because cfs_hash_putref might call cfs_hash_destroy if that was the last reference relesed and that might sleep.&lt;/p&gt;</comment>
                            <comment id="111954" author="green" created="Sat, 11 Apr 2015 04:33:53 +0000"  >&lt;p&gt;Aha! so this is also the reason for quite a bunch of spinlock bugs I was having where spinlock debugging code was complaining that a lock was taken on one cpu, but released on another, I guess:&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;Apr 11 00:30:38 centos6-7 kernel: BUG: sleeping function called from invalid context at /home/green/git/lustre-release/libcfs/libcfs/hash.c:1148
Apr 11 00:30:38 centos6-7 kernel: in_atomic(): 1, irqs_disabled(): 0, pid: 3620, name: rmmod
Apr 11 00:30:38 centos6-7 kernel: 1 lock held by rmmod/3620:
Apr 11 00:30:38 centos6-7 kernel: #0:  (&amp;amp;new_bkts[i]-&amp;gt;hsb_lock.rw){......}, at: [&amp;lt;ffffffffa014e30d&amp;gt;] cfs_hash_rw_lock+0xd/0x20 [libcfs]
Apr 11 00:30:38 centos6-7 kernel: CPU: 2 PID: 3620 Comm: rmmod Tainted: GF       W  O--------------   3.10.0-debug #5
Apr 11 00:30:38 centos6-7 kernel: Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
Apr 11 00:30:38 centos6-7 kernel: ffff88003ae74780 00000000d7e1d1ee ffff88008473bd80 ffffffff816ccb68
Apr 11 00:30:38 centos6-7 kernel: ffff88008473bd98 ffffffff810a8fd9 0000000000000003 ffff88008473bde8
Apr 11 00:30:38 centos6-7 kernel: ffffffffa01525f3 00000000d7e1d1ee ffff88008d62bc00 ffff880000000008
Apr 11 00:30:38 centos6-7 kernel: Call Trace:
Apr 11 00:30:38 centos6-7 kernel: [&amp;lt;ffffffff816ccb68&amp;gt;] dump_stack+0x19/0x1b
Apr 11 00:30:38 centos6-7 kernel: [&amp;lt;ffffffff810a8fd9&amp;gt;] __might_sleep+0xe9/0x110
Apr 11 00:30:38 centos6-7 kernel: [&amp;lt;ffffffffa01525f3&amp;gt;] cfs_hash_putref+0x233/0x500 [libcfs]
Apr 11 00:30:38 centos6-7 kernel: [&amp;lt;ffffffffa05cb15f&amp;gt;] nm_member_delete_hash+0x2f/0x40 [ptlrpc]
Apr 11 00:30:38 centos6-7 kernel: [&amp;lt;ffffffffa05c7014&amp;gt;] nodemap_destroy+0xa4/0x1f0 [ptlrpc]
Apr 11 00:30:38 centos6-7 kernel: [&amp;lt;ffffffffa05c718d&amp;gt;] nodemap_putref+0x2d/0xa0 [ptlrpc]
Apr 11 00:30:38 centos6-7 kernel: [&amp;lt;ffffffffa05c8235&amp;gt;] nodemap_hs_put_locked+0x15/0x20 [ptlrpc]
Apr 11 00:30:38 centos6-7 kernel: [&amp;lt;ffffffffa014ed15&amp;gt;] cfs_hash_bd_del_locked+0x75/0xf0 [libcfs]
Apr 11 00:30:38 centos6-7 kernel: [&amp;lt;ffffffffa015258c&amp;gt;] cfs_hash_putref+0x1cc/0x500 [libcfs]
Apr 11 00:30:38 centos6-7 kernel: [&amp;lt;ffffffffa05c826a&amp;gt;] nodemap_cleanup_all+0x2a/0x30 [ptlrpc]
Apr 11 00:30:38 centos6-7 kernel: [&amp;lt;ffffffffa05c827e&amp;gt;] nodemap_mod_exit+0xe/0x20 [ptlrpc]
Apr 11 00:30:38 centos6-7 kernel: [&amp;lt;ffffffffa05cdbc2&amp;gt;] ptlrpc_exit+0x9/0x447 [ptlrpc]
Apr 11 00:30:38 centos6-7 kernel: [&amp;lt;ffffffff810e769b&amp;gt;] SyS_delete_module+0x16b/0x2d0
Apr 11 00:30:38 centos6-7 kernel: [&amp;lt;ffffffff816df369&amp;gt;] system_call_fastpath+0x16/0x1b
Apr 11 00:30:38 centos6-7 kernel: BUG: scheduling while atomic: rmmod/3620/0x10000002
Apr 11 00:30:38 centos6-7 kernel: 1 lock held by rmmod/3620:
Apr 11 00:30:38 centos6-7 kernel: #0:  (&amp;amp;new_bkts[i]-&amp;gt;hsb_lock.rw){......}, at: [&amp;lt;ffffffffa014e30d&amp;gt;] cfs_hash_rw_lock+0xd/0x20 [libcfs]
Apr 11 00:30:38 centos6-7 kernel: Modules linked in: ptlrpc(OF-) obdclass(OF) ksocklnd(OF) lnet(OF) libcfs(OF) loop(F) jbd2(F) sha512_generic(F) mbcache(F) rpcsec_gss_krb5(F) ata_generic(F) pata_acpi(F) ttm(F) drm_kms_helper(F) drm(F) i2c_piix4(F) ata_piix(F) virtio_blk(F) i2c_core(F) virtio_balloon(F) virtio_console(F) floppy(F) libata(F) serio_raw(F) pcspkr(F) [last unloaded: lquota]
Apr 11 00:30:38 centos6-7 kernel: CPU: 2 PID: 3620 Comm: rmmod Tainted: GF       W  O--------------   3.10.0-debug #5
Apr 11 00:30:38 centos6-7 kernel: Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
Apr 11 00:30:38 centos6-7 kernel: ffff88003ae74780 00000000d7e1d1ee ffff88008473bcf8 ffffffff816ccb68
Apr 11 00:30:38 centos6-7 kernel: ffff88008473bd10 ffffffff816c827a ffff88008473bfd8 ffff88008473bd70
Apr 11 00:30:38 centos6-7 kernel: ffffffff816d3d1c ffff88003ae74780 ffff88008473bfd8 ffff88008473bfd8
Apr 11 00:30:38 centos6-7 kernel: Call Trace:
Apr 11 00:30:38 centos6-7 kernel: [&amp;lt;ffffffff816ccb68&amp;gt;] dump_stack+0x19/0x1b
Apr 11 00:30:38 centos6-7 kernel: [&amp;lt;ffffffff816c827a&amp;gt;] __schedule_bug+0x59/0x68
Apr 11 00:30:38 centos6-7 kernel: [&amp;lt;ffffffff816d3d1c&amp;gt;] __schedule+0x75c/0x810
Apr 11 00:30:38 centos6-7 kernel: [&amp;lt;ffffffff810acab6&amp;gt;] __cond_resched+0x26/0x30
Apr 11 00:30:38 centos6-7 kernel: [&amp;lt;ffffffff816d41ea&amp;gt;] _cond_resched+0x3a/0x50
Apr 11 00:30:38 centos6-7 kernel: [&amp;lt;ffffffffa01525f8&amp;gt;] cfs_hash_putref+0x238/0x500 [libcfs]
Apr 11 00:30:38 centos6-7 kernel: [&amp;lt;ffffffffa05cb15f&amp;gt;] nm_member_delete_hash+0x2f/0x40 [ptlrpc]
Apr 11 00:30:38 centos6-7 kernel: [&amp;lt;ffffffffa05c7014&amp;gt;] nodemap_destroy+0xa4/0x1f0 [ptlrpc]
Apr 11 00:30:38 centos6-7 kernel: [&amp;lt;ffffffffa05c718d&amp;gt;] nodemap_putref+0x2d/0xa0 [ptlrpc]
Apr 11 00:30:38 centos6-7 kernel: [&amp;lt;ffffffffa05c8235&amp;gt;] nodemap_hs_put_locked+0x15/0x20 [ptlrpc]
Apr 11 00:30:38 centos6-7 kernel: [&amp;lt;ffffffffa014ed15&amp;gt;] cfs_hash_bd_del_locked+0x75/0xf0 [libcfs]
Apr 11 00:30:38 centos6-7 kernel: [&amp;lt;ffffffffa015258c&amp;gt;] cfs_hash_putref+0x1cc/0x500 [libcfs]
Apr 11 00:30:38 centos6-7 kernel: [&amp;lt;ffffffffa05c826a&amp;gt;] nodemap_cleanup_all+0x2a/0x30 [ptlrpc]
Apr 11 00:30:38 centos6-7 kernel: [&amp;lt;ffffffffa05c827e&amp;gt;] nodemap_mod_exit+0xe/0x20 [ptlrpc]
Apr 11 00:30:38 centos6-7 kernel: [&amp;lt;ffffffffa05cdbc2&amp;gt;] ptlrpc_exit+0x9/0x447 [ptlrpc]
Apr 11 00:30:38 centos6-7 kernel: [&amp;lt;ffffffff810e769b&amp;gt;] SyS_delete_module+0x16b/0x2d0
Apr 11 00:30:38 centos6-7 kernel: [&amp;lt;ffffffff816df369&amp;gt;] system_call_fastpath+0x16/0x1b
Apr 11 00:30:38 centos6-7 kernel: BUG: rwlock wrong CPU on CPU#3, rmmod/3620, ffff88005ca55dc0
Apr 11 00:30:38 centos6-7 kernel: CPU: 3 PID: 3620 Comm: rmmod Tainted: GF       W  O--------------   3.10.0-debug #5
Apr 11 00:30:38 centos6-7 kernel: Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
Apr 11 00:30:38 centos6-7 kernel: ffffffff81a971b4 00000000d7e1d1ee ffff88008473be10 ffffffff816ccb68
Apr 11 00:30:38 centos6-7 kernel: ffff88008473be30 ffffffff816ccc6f ffff88005ca55dc0 ffff88005ca57e00
Apr 11 00:30:38 centos6-7 kernel: ffff88008473be48 ffffffff813707c0 ffff88005ca55dc0 ffff88008473be60
Apr 11 00:30:38 centos6-7 kernel: Call Trace:
Apr 11 00:30:38 centos6-7 kernel: [&amp;lt;ffffffff816ccb68&amp;gt;] dump_stack+0x19/0x1b
Apr 11 00:30:38 centos6-7 kernel: [&amp;lt;ffffffff816ccc6f&amp;gt;] rwlock_bug+0x4e/0x53
Apr 11 00:30:38 centos6-7 kernel: [&amp;lt;ffffffff813707c0&amp;gt;] do_raw_write_unlock+0x60/0x80
Apr 11 00:30:38 centos6-7 kernel: [&amp;lt;ffffffff816d6107&amp;gt;] _raw_write_unlock+0x27/0x40
Apr 11 00:30:38 centos6-7 kernel: [&amp;lt;ffffffffa014e2ed&amp;gt;] cfs_hash_rw_unlock+0xd/0x20 [libcfs]
Apr 11 00:30:38 centos6-7 kernel: [&amp;lt;ffffffffa01525e0&amp;gt;] cfs_hash_putref+0x220/0x500 [libcfs]
Apr 11 00:30:38 centos6-7 kernel: [&amp;lt;ffffffffa05c826a&amp;gt;] nodemap_cleanup_all+0x2a/0x30 [ptlrpc]
Apr 11 00:30:38 centos6-7 kernel: [&amp;lt;ffffffffa05c827e&amp;gt;] nodemap_mod_exit+0xe/0x20 [ptlrpc]
Apr 11 00:30:38 centos6-7 kernel: [&amp;lt;ffffffffa05cdbc2&amp;gt;] ptlrpc_exit+0x9/0x447 [ptlrpc]
Apr 11 00:30:38 centos6-7 kernel: [&amp;lt;ffffffff810e769b&amp;gt;] SyS_delete_module+0x16b/0x2d0
Apr 11 00:30:38 centos6-7 kernel: [&amp;lt;ffffffff816df369&amp;gt;] system_call_fastpath+0x16/0x1b
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                            <comment id="114236" author="simmonsja" created="Tue, 5 May 2015 16:04:08 +0000"  >&lt;p&gt;I rebased the patch from Kit. Oh I see bugs remain.&lt;/p&gt;</comment>
                            <comment id="114436" author="kit.westneat" created="Wed, 6 May 2015 21:52:21 +0000"  >&lt;p&gt;I realized that the patch I submitted was actually making things worse, as you aren&apos;t allowed to call cfs_hash_for_each while holding a spinlock. I instead modified nodemap_cleanup_all to convert the hash to a list and then iterate the list, calling nodemap_putref on each nodemap. Does this sound reasonable?&lt;/p&gt;</comment>
                            <comment id="117248" author="green" created="Wed, 3 Jun 2015 04:13:37 +0000"  >&lt;p&gt;Hm, so I have several patches from you:&lt;br/&gt;
93ccc4a &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-5092&quot; title=&quot;nodemap: transfer idmaps between MGS, MDT, OST&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-5092&quot;&gt;&lt;del&gt;LU-5092&lt;/del&gt;&lt;/a&gt; nodemap: add structure to hold nodemap config&lt;br/&gt;
e4d2197 &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-5092&quot; title=&quot;nodemap: transfer idmaps between MGS, MDT, OST&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-5092&quot;&gt;&lt;del&gt;LU-5092&lt;/del&gt;&lt;/a&gt; nodemap: convert member hash to a list&lt;br/&gt;
3f0bb87 &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-6409&quot; title=&quot;sleeping while atomic in nodemap_destroy&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-6409&quot;&gt;&lt;del&gt;LU-6409&lt;/del&gt;&lt;/a&gt; nodemap: don&apos;t destroy nodemaps in cfs_hash_for_each&lt;/p&gt;

&lt;p&gt;And this is not enough.&lt;/p&gt;

&lt;p&gt;I still get this in the logs:&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;leeping function called from invalid context at kernel/mutex.c:576
May 30 22:19:09 centos6-0 kernel: in_atomic(): 1, irqs_disabled(): 0, pid: 9196,
 name: mdt00_002
May 30 22:19:09 centos6-0 kernel: 2 locks held by mdt00_002/9196:
May 30 22:19:09 centos6-0 kernel: #0:  (active_config_lock){......}, at: [&amp;lt;fffff
fffa05cb147&amp;gt;] nodemap_lock_active_ranges+0x17/0x30 [ptlrpc]
May 30 22:19:09 centos6-0 kernel: #1:  (&amp;amp;config-&amp;gt;nmc_range_tree_lock){......}, a
t: [&amp;lt;ffffffffa05cb157&amp;gt;] nodemap_lock_active_ranges+0x27/0x30 [ptlrpc] PID: 9196 Comm: mdt00_002 Tainted: GF       W  O--------------   3.10.0-debug #
re name: Red Hat KVM, BIOS 0.5.1 01/01/2011
0019366680 00000000b6a08141 ffff88003ac9b9a0 ffffffff816ccb68
003ac9b9b8 ffffffff810a8fd9 ffff8800aa50
0e00 ffff88003ac9ba40
ff816d0dd5 0000000000000000 0000000000000002 0000000000000000
race:
ffff816ccb68&amp;gt;] dump_stack+0x19/0x1b
ffff810a8fd9&amp;gt;] __might_sleep+0xe9/0x110
ffff816d0dd5&amp;gt;] mutex_lock_nested+0x55/0x490
ffffa05cb157&amp;gt;] ? nodemap_lock_active_ranges+0x27/0x30 [ptlrpc]
ffffa05cfbe8&amp;gt;] nm_member_add+0x78/0x180 [ptlrpc]
ffffa05cc80d&amp;gt;] nodemap_add_member+0x2d/0x50 [ptlrpc]
ffffa0b147f3&amp;gt;] mdt_obd_connect+0x3b3/0x760 [mdt]
ffffa01c4a87&amp;gt;] ? libcfs_debug_msg+0x57/0x80 [libcfs]
ffffa051ded3&amp;gt;] target_handle_connect+0x12c3/0x2be0 [ptlrpc]
ffff81363263&amp;gt;] ? number.isra.2+0x323/0x360
ffffa02dbcbd&amp;gt;] ? keys_fill+0x1d/0x130 [obdclass]
ffffa02dbcd2&amp;gt;] ? keys_fill+0x32/0x130 [obdclass]
ffffa05b445f&amp;gt;] tgt_request_handle+0x3ef/0x1070 [ptlrpc]
ffffa0565c01&amp;gt;] ptlrpc_server_handle_request+0x231/0xab0 [ptlrpc]
ffffa0563768&amp;gt;] ? ptlrpc_wait_event+0xb8/0x370 [ptlrpc]
ffffa0569b70&amp;gt;] ptlrpc_main+0xae0/0x1ee0 [ptlrpc]
ffffa0569090&amp;gt;] ? ptlrpc_register_service+0xf30/0xf30 [ptlrpc]
ffff8109c00a&amp;gt;] kthread+0xea/0xf0
ffff8109bf20&amp;gt;] ? kthread_create_on_node+0x140/0x140
ffff816df2bc&amp;gt;] ret_from_fork+0x7c/0xb0
ffff8109bf20&amp;gt;] ? kthread_create_on_node+0x140/0x140
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;seemingly from every target.&lt;/p&gt;</comment>
                            <comment id="117285" author="kit.westneat" created="Wed, 3 Jun 2015 15:13:10 +0000"  >&lt;p&gt;Ah ok, I see what&apos;s going on, I&apos;ll update the patches I have in gerrit.&lt;/p&gt;

&lt;p&gt;Can you describe what tests/config options you are running to get these warnings? I am not getting them on my build and I don&apos;t want to waste your time if I can catch them before I submit. &lt;/p&gt;</comment>
                            <comment id="117376" author="green" created="Thu, 4 Jun 2015 01:10:33 +0000"  >&lt;p&gt;You need to use rhel7 for this, there&apos;s a new kernel option you need to enable:&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;CONFIG_DEBUG_ATOMIC_SLEEP=y
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Turn this on and run something like sanity, you&apos;ll get a bunch of warnings. Also apply patch from &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-6447&quot; title=&quot;mdt_identity_upcall calls sleeping function under rwlock&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-6447&quot;&gt;&lt;del&gt;LU-6447&lt;/del&gt;&lt;/a&gt; (I know it&apos;s imperfect) to quiet down unrelated warnings.&lt;/p&gt;</comment>
                            <comment id="117752" author="kit.westneat" created="Mon, 8 Jun 2015 16:53:12 +0000"  >&lt;p&gt;I finally got the debug kernel working and reproduced the warning you saw. Should I report any other non-nodemap warnings I find? There is a lock inversion warning with s_dquot.dqio_mutex and i_data_sem that I couldn&apos;t find any Jira tickets about, but I&apos;m only getting it during mkfs so far. &lt;/p&gt;</comment>
                            <comment id="117869" author="green" created="Tue, 9 Jun 2015 04:52:58 +0000"  >&lt;p&gt;Sure, feel free to report the other ones you see too.&lt;/p&gt;</comment>
                            <comment id="117956" author="kit.westneat" created="Tue, 9 Jun 2015 18:27:30 +0000"  >&lt;p&gt;Ok, I reported the potential lock inversion 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;.&lt;/p&gt;

&lt;p&gt;I updated the nodemap patches and no longer get the warning messages.&lt;/p&gt;</comment>
                            <comment id="119871" author="green" created="Mon, 29 Jun 2015 20:53:17 +0000"  >&lt;p&gt;I tried the three patches from &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-5092&quot; title=&quot;nodemap: transfer idmaps between MGS, MDT, OST&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-5092&quot;&gt;&lt;del&gt;LU-5092&lt;/del&gt;&lt;/a&gt;plus the one patch from this ticket and hit a deadlock when running sanity 133g:&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;[15921.648643] LustreError: 7937:0:(lproc_fid.c:182:lprocfs_server_fid_width_seq_write()) Skipped 17 previous similar messages
[16080.884140] INFO: task badarea_io:7981 blocked for more than 120 seconds.
[16080.884666]       Tainted: P           ---------------    2.6.32-rhe6.6-debug #1
[16080.885381] &quot;echo 0 &amp;gt; /proc/sys/kernel/hung_task_timeout_secs&quot; disables this message.
[16080.886109] badarea_io    D 0000000000000002  2792  7981   7003 0x00000000
[16080.886582]  ffff880046b5fd78 0000000000000086 0000000000000000 ffffffff8114e4a0
[16080.887360]  0000000000000000 ffffffff8104e658 00000e7b1ce2fe1b ffff880046b5fd58
[16080.888121]  ffffffffa1395a20 00000001003b97ab ffff88005f2708f8 ffff880046b5ffd8
[16080.888904] Call Trace:
[16080.889234]  [&amp;lt;ffffffff8114e4a0&amp;gt;] ? handle_pte_fault+0x90/0xa50
[16080.889663]  [&amp;lt;ffffffff8104e658&amp;gt;] ? __change_page_attr_set_clr+0x808/0xcc0
[16080.890154]  [&amp;lt;ffffffffa1395a20&amp;gt;] ? lprocfs_single_release+0x0/0x10 [obdclass]
[16080.890876]  [&amp;lt;ffffffff8151ff50&amp;gt;] __mutex_lock_slowpath+0x120/0x2e0
[16080.891364]  [&amp;lt;ffffffffa166d8d0&amp;gt;] ? nodemap_del_nodemap_write+0x0/0xc0 [ptlrpc]
[16080.892098]  [&amp;lt;ffffffff81520141&amp;gt;] mutex_lock+0x31/0x50
[16080.892598]  [&amp;lt;ffffffffa16699bc&amp;gt;] nodemap_del+0x3c/0x1c0 [ptlrpc]
[16080.893118]  [&amp;lt;ffffffffa166d8d0&amp;gt;] ? nodemap_del_nodemap_write+0x0/0xc0 [ptlrpc]
[16080.896192]  [&amp;lt;ffffffffa166d975&amp;gt;] nodemap_del_nodemap_write+0xa5/0xc0 [ptlrpc]
[16080.896810]  [&amp;lt;ffffffff811fb8c5&amp;gt;] proc_reg_write+0x85/0xc0
[16080.897094]  [&amp;lt;ffffffff8118f4a8&amp;gt;] vfs_write+0xb8/0x1a0
[16080.897388]  [&amp;lt;ffffffff8118fde1&amp;gt;] sys_write+0x51/0x90
[16080.897719]  [&amp;lt;ffffffff8100b0b2&amp;gt;] system_call_fastpath+0x16/0x1b
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                            <comment id="119874" author="green" created="Mon, 29 Jun 2015 20:59:25 +0000"  >&lt;p&gt;ah, I see it&apos;s likely a bug in &lt;a href=&quot;http://review.whamcloud.com/#/c/11813/8&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/#/c/11813/8&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="119883" author="gerrit" created="Mon, 29 Jun 2015 22:06:39 +0000"  >&lt;p&gt;Oleg Drokin (oleg.drokin@intel.com) merged in patch &lt;a href=&quot;http://review.whamcloud.com/14275/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/14275/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-6409&quot; title=&quot;sleeping while atomic in nodemap_destroy&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-6409&quot;&gt;&lt;del&gt;LU-6409&lt;/del&gt;&lt;/a&gt; nodemap: don&apos;t destroy nodemaps in cfs_hash_for_each&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: 6299d78713ef2b6f69f6dd046256aa91a85147a8&lt;/p&gt;</comment>
                            <comment id="119889" author="pjones" created="Mon, 29 Jun 2015 22:50:33 +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 ">
                                        <issuelink>
            <issuekey id="24776">LU-5092</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="34946">LU-7811</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|hzx9n3:</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>