<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 01:57: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-6155] osd_count_not_mapped() calls dbuf_hold_impl() without the lock</title>
                <link>https://jira.whamcloud.com/browse/LU-6155</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;Observed when testing with zfs-0.6.3-179-g3c832b8 with ZFS debugging enabled.  The osd_count_not_mapped() function calls dbuf_hold_impl() without first taking the dn-&amp;gt;dn_struct_rwlock lock.&lt;/p&gt;

&lt;p&gt;Taking the lock around dbuf_hold_impl() would solve the issue.  But actually it would be far better if Lustre didn&apos;t call dbuf_hold_impl() at all.  As the name implies this is an internal function and really never should have been exported in the first place.&lt;/p&gt;

&lt;p&gt;But leaving that issue aside taking a hold on a dbuf has the potential to be very expensive.  If the dbuf isn&apos;t in the dbuf hash then we&apos;re going to be forced to read it from disk to populate the hash.  This will be 100% wasted work in the case where the write is dirtying the entire dbuf.  In effect it&apos;s converting what would just be a write in to a read-modify-write.&lt;/p&gt;

&lt;p&gt;Since this code is only being using to determine if a particular block is sparse for quota checking.  I think it would preferable to make a worst case assumption and assume that it&apos;s always mapped.  The exact accounting can&apos;t be strictly settled anyway until the txg is synced.&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;INFO: task lctl:26256 blocked for more than 120 seconds.
      Tainted: P           ---------------
2.6.32-431.29.2.el6_lustre.gffd1fc2.x86_64 #1
&quot;echo 0 &amp;gt; /proc/sys/kernel/hung_task_timeout_secs&quot; disables this message.
lctl          D 000000000000000a     0 26256  26251 0x00000080
 ffff88170777b5b8 0000000000000086 0000000000000000 ffff88170777b590
 ffffffff817d6e5f 0000000000000000 ffff88170777b558 ffffffff81010eb5
 ffff881ff4aba638 ffff88170777bfd8 000000000000fbc8 ffff881ff4aba638
Call Trace:
 [&amp;lt;ffffffffa019d7ed&amp;gt;] spl_panic+0xdd/0xe0 [spl]
 [&amp;lt;ffffffffa0269800&amp;gt;] __dbuf_hold_impl+0x610/0x9e0 [zfs]
 [&amp;lt;ffffffffa0269c4d&amp;gt;] dbuf_hold_impl+0x7d/0xb0 [zfs]
 [&amp;lt;ffffffffa0f344ad&amp;gt;] osd_count_not_mapped+0x19d/0x370 [osd_zfs]
 [&amp;lt;ffffffffa0f3622f&amp;gt;] osd_declare_write_commit+0x59f/0x710 [osd_zfs]
 [&amp;lt;ffffffffa106f7eb&amp;gt;] ofd_commitrw_write+0x35b/0x1060 [ofd]
 [&amp;lt;ffffffffa1070ab3&amp;gt;] ofd_commitrw+0x5c3/0xae0 [ofd]
 [&amp;lt;ffffffffa1128a83&amp;gt;] echo_client_brw_ioctl+0xd03/0x1470 [obdecho]
 [&amp;lt;ffffffffa112b1db&amp;gt;] echo_client_iocontrol+0x69b/0x2aa0 [obdecho]
 [&amp;lt;ffffffffa08037fc&amp;gt;] class_handle_ioctl+0x15fc/0x2180 [obdclass]
 [&amp;lt;ffffffffa07ea2ab&amp;gt;] obd_class_ioctl+0x4b/0x190 [obdclass]
 [&amp;lt;ffffffff8119e972&amp;gt;] vfs_ioctl+0x22/0xa0
 [&amp;lt;ffffffff8119eb14&amp;gt;] do_vfs_ioctl+0x84/0x580
 [&amp;lt;ffffffff8119f091&amp;gt;] sys_ioctl+0x81/0xa0
 [&amp;lt;ffffffff8100b072&amp;gt;] system_call_fastpath+0x16/0x1b
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
        <key id="28362">LU-6155</key>
            <summary>osd_count_not_mapped() calls dbuf_hold_impl() without the lock</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="utopiabound">Nathaniel Clark</assignee>
                                    <reporter username="behlendorf">Brian Behlendorf</reporter>
                        <labels>
                            <label>llnl</label>
                    </labels>
                <created>Sat, 24 Jan 2015 01:54:52 +0000</created>
                <updated>Mon, 21 Dec 2015 21:24:38 +0000</updated>
                            <resolved>Fri, 16 Oct 2015 12:18:50 +0000</resolved>
                                                    <fixVersion>Lustre 2.8.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>8</watches>
                                                                            <comments>
                            <comment id="104687" author="pjones" created="Mon, 26 Jan 2015 12:51:07 +0000"  >&lt;p&gt;Alex&lt;/p&gt;

&lt;p&gt;Could you please advise?&lt;/p&gt;

&lt;p&gt;Thanks&lt;/p&gt;

&lt;p&gt;Peter&lt;/p&gt;</comment>
                            <comment id="104719" author="jlevi" created="Mon, 26 Jan 2015 18:35:56 +0000"  >&lt;p&gt;Isaac,&lt;br/&gt;
Could you please make a patch for this?&lt;/p&gt;</comment>
                            <comment id="104769" author="isaac" created="Mon, 26 Jan 2015 22:36:39 +0000"  >&lt;p&gt;Was it hit during any particular Lustre test? Any additional debug flag except --enable-debug for SPL/ZFS? From the code it looked like --enable-debug is enough.&lt;/p&gt;

&lt;p&gt;As to whether it&apos;s related to &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-5242&quot; title=&quot;Test hang sanity test_132, test_133: umount ost&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-5242&quot;&gt;&lt;del&gt;LU-5242&lt;/del&gt;&lt;/a&gt;, I&apos;ve been running SPL/ZFS 0.6.3-1.2 with --enable-debug and hit &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-5242&quot; title=&quot;Test hang sanity test_132, test_133: umount ost&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-5242&quot;&gt;&lt;del&gt;LU-5242&lt;/del&gt;&lt;/a&gt; a few times but never hit any assertion in SPL/ZFS.&lt;/p&gt;</comment>
                            <comment id="104773" author="behlendorf" created="Mon, 26 Jan 2015 22:41:23 +0000"  >&lt;p&gt;Isaac when we observed it we were running with zfs-0.6.3-181-gb0cf067 and Lustre v2_6_92_0-86-g897580e.  It looks to me like it should be possible to hit the same thing with the older code but it was fairly easy with the latest bits.  We were just running sanity.sh.&lt;/p&gt;</comment>
                            <comment id="104795" author="isaac" created="Tue, 27 Jan 2015 01:56:26 +0000"  >&lt;p&gt;I guess the reason I never hit it with sanity, despite that the code path is easy to hit, is that the assertion asserts dn-&amp;gt;dn_struct_rwlock is held but it doesn&apos;t assert that it is actually held by the caller, so it could be that someone else just happen to hold the lock. If true, then it&apos;s more often for the code to be actually racing with lock holders than not.&lt;/p&gt;</comment>
                            <comment id="104908" author="gerrit" created="Tue, 27 Jan 2015 21:13:54 +0000"  >&lt;p&gt;Isaac Huang (he.huang@intel.com) uploaded a new patch: &lt;a href=&quot;http://review.whamcloud.com/13541&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/13541&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-6155&quot; title=&quot;osd_count_not_mapped() calls dbuf_hold_impl() without the lock&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-6155&quot;&gt;&lt;del&gt;LU-6155&lt;/del&gt;&lt;/a&gt; osd-zfs: dbuf_hold_impl() called without the lock&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 68be64c7d8273bf081f3b8834e2bb7fd2ad473e3&lt;/p&gt;</comment>
                            <comment id="130607" author="gerrit" created="Fri, 16 Oct 2015 12:17:25 +0000"  >&lt;p&gt;Oleg Drokin (oleg.drokin@intel.com) merged in patch &lt;a href=&quot;http://review.whamcloud.com/13541/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/13541/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-6155&quot; title=&quot;osd_count_not_mapped() calls dbuf_hold_impl() without the lock&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-6155&quot;&gt;&lt;del&gt;LU-6155&lt;/del&gt;&lt;/a&gt; osd-zfs: dbuf_hold_impl() called without the lock&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: 10ebe81e394af356fbae4703ca47586d6b3bc367&lt;/p&gt;</comment>
                            <comment id="130609" author="pjones" created="Fri, 16 Oct 2015 12:18:50 +0000"  >&lt;p&gt;Landed for 2.8&lt;/p&gt;</comment>
                            <comment id="137100" author="gerrit" created="Mon, 21 Dec 2015 21:24:38 +0000"  >&lt;p&gt;Jinshan Xiong (jinshan.xiong@intel.com) uploaded a new patch: &lt;a href=&quot;http://review.whamcloud.com/17698&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/17698&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-6155&quot; title=&quot;osd_count_not_mapped() calls dbuf_hold_impl() without the lock&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-6155&quot;&gt;&lt;del&gt;LU-6155&lt;/del&gt;&lt;/a&gt; osd-zfs: dbuf_hold_impl() called without the lock&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 427ccbb7b457e0f40e9d81fff7aa5b2fae4d59b5&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                        <issuelink>
            <issuekey id="25269">LU-5242</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="28377">LU-6160</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|hzx4sv:</customfieldvalue>

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