<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 03:21:24 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-15800] Fallocate causes transaction deadlock</title>
                <link>https://jira.whamcloud.com/browse/LU-15800</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&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;PID: 74368  TASK: ffff9600eaeac740  CPU: 9   COMMAND: &quot;ll_ost_io02_069&quot;
 #0 [ffffa3f1a7a57830] __schedule at ffffffff9034e1d4
 #1 [ffffa3f1a7a578c8] schedule at ffffffff9034e648
 #2 [ffffa3f1a7a578d8] rwsem_down_read_slowpath at ffffffff903511d0
 #3 [ffffa3f1a7a57978] osd_read_lock at ffffffffc1a3379d [osd_ldiskfs]
                                &amp;lt;--     rc = dt_trans_start_local(env, ofd-&amp;gt;ofd_osd , th);
                                        ofd_read_lock(env, ofd_obj);
 #4 [ffffa3f1a7a57998] ofd_write_attr_set at ffffffffc186b6cc [ofd]
 #5 [ffffa3f1a7a57a00] ofd_commitrw_write at ffffffffc186c812 [ofd]
 #6 [ffffa3f1a7a57aa0] ofd_commitrw at ffffffffc18721f1 [ofd]
 #7 [ffffa3f1a7a57b60] finish_wait at ffffffff8fb2e5ac
 #8 [ffffa3f1a7a57bd8] tgt_brw_write at ffffffffc1255544 [ptlrpc]
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&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;PID: 73559  TASK: ffff9601653a97c0  CPU: 11  COMMAND: &quot;ll_ost02_046&quot;
 #0 [ffffa3f1a0817970] __schedule at ffffffff9034e1d4
 #1 [ffffa3f1a0817a08] schedule at ffffffff9034e648
 #2 [ffffa3f1a0817a18] wait_transaction_locked at ffffffffc0ad2089 [jbd2]
 #3 [ffffa3f1a0817a68] add_transaction_credits at ffffffffc0ad21c4 [jbd2]
 #4 [ffffa3f1a0817ac0] start_this_handle at ffffffffc0ad250a [jbd2]
 #5 [ffffa3f1a0817b40] jbd2__journal_restart at ffffffffc0ad2ad0 [jbd2]
 #6 [ffffa3f1a0817b80] osd_fallocate_preallocate at ffffffffc1a5b6d2 [osd_ldiskfs]
 #7 [ffffa3f1a0817c18] osd_fallocate at ffffffffc1a5b98d [osd_ldiskfs]
                        &amp;lt;--     ofd_trans_start(env, ofd, fo, th);
                                ofd_write_lock(env, fo);
 #8 [ffffa3f1a0817c50] ofd_object_fallocate at ffffffffc18682f9 [ofd]
 #9 [ffffa3f1a0817cb8] ofd_fallocate_hdl at ffffffffc185912f [ofd]
#10 [ffffa3f1a0817d50] tgt_request_handle at ffffffffc1256a53 [ptlrpc]&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;The deadlock was added by :&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; Commit:         93f700ca241a98630fc5ff19a041e35fbdbf0385
 Author:         Arshad Hussain &amp;lt;arshad.super@gmail.com&amp;gt;
 Committer:      Oleg Drokin &amp;lt;green@whamcloud.com&amp;gt;
 Author Date:    Thu 10 Sep 2020 02:18:13 AM EEST
 Committer Date: Thu 29 Oct 2020 06:28:42 AM EET

 LU-13765 osd-ldiskfs: Extend credit correctly for fallocate
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
        <key id="70058">LU-15800</key>
            <summary>Fallocate causes transaction deadlock</summary>
                <type id="1" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="2" iconUrl="https://jira.whamcloud.com/images/icons/priorities/critical.svg">Critical</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="arshad512">Arshad Hussain</assignee>
                                    <reporter username="askulysh">Andriy Skulysh</reporter>
                        <labels>
                            <label>ost</label>
                    </labels>
                <created>Thu, 28 Apr 2022 09:24:10 +0000</created>
                <updated>Wed, 2 Aug 2023 13:08:24 +0000</updated>
                            <resolved>Mon, 6 Jun 2022 13:27:21 +0000</resolved>
                                                    <fixVersion>Lustre 2.16.0</fixVersion>
                    <fixVersion>Lustre 2.15.4</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>7</watches>
                                                                            <comments>
                            <comment id="333431" author="askulysh" created="Fri, 29 Apr 2022 16:07:56 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.whamcloud.com/secure/ViewProfile.jspa?name=jhammond&quot; class=&quot;user-hover&quot; rel=&quot;jhammond&quot;&gt;jhammond&lt;/a&gt;, it isn&apos;t a duplicate of &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-14214&quot; title=&quot;incorrect locking in ofd_object_fallocate()&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-14214&quot;&gt;&lt;del&gt;LU-14214&lt;/del&gt;&lt;/a&gt;, the locking is correct in the code but it is violated&#160; by&#160;jbd2__journal_restart(). It shouldn&apos;t be called under ofd_write_lock()&lt;/p&gt;</comment>
                            <comment id="333648" author="pjones" created="Tue, 3 May 2022 14:22:58 +0000"  >&lt;p&gt;Arshad&lt;/p&gt;

&lt;p&gt;Is this something that you are able to look into?&lt;/p&gt;

&lt;p&gt;Peter&lt;/p&gt;</comment>
                            <comment id="333655" author="arshad512" created="Tue, 3 May 2022 15:07:10 +0000"  >&lt;p&gt;Hi Peter, I am looking into it.&lt;/p&gt;

&lt;p&gt;Thanks&lt;/p&gt;</comment>
                            <comment id="333746" author="arshad512" created="Wed, 4 May 2022 09:48:41 +0000"  >&lt;p&gt;Andriy,&lt;/p&gt;

&lt;p&gt;Is there a test case(or manual steps) that can trigger this issue? Environment details would also help. (how large was the fallocate?) At least in my case, It would greatly help to have such details/reproducer. I tried to reproduce the bug running standard sanity/sanityn test-case over loop but failed to reproduce the deadlock. At-least the standard test-case does not catch/trigger this.&#160;With the stack trace you provided, it looks like there are two threads one doing fallocate(standard prealloc) other doing a write(eg dd). ?&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;&amp;gt;...in the code but it is violated &#160;by jbd2__journal_restart(). It shouldn&apos;t be called under ofd_write_lock()&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Sorry, I thought this is fine under ofd lock. Can you please explain in more details?&#160;&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;osd_extend_restart_trans()
&#160; &#160; -&amp;gt;ldiskfs_journal_restart()
&#160; &#160; &#160; &#160; -&amp;gt; jbd2_journal_restart()
&#160; &#160; &#160; &#160; &#160; &#160; -&amp;gt; jbd2__journal_restart()&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;Thanks&lt;/p&gt;</comment>
                            <comment id="333935" author="pjones" created="Thu, 5 May 2022 18:45:12 +0000"  >&lt;p&gt;Given that this issue existed in 2.14, I think that it should be ok to descope it from 2.15.0 and include in a future 2.15.x maintenance release.&lt;/p&gt;</comment>
                            <comment id="334235" author="gerrit" created="Tue, 10 May 2022 07:51:07 +0000"  >&lt;p&gt;&quot;Alex Zhuravlev &amp;lt;bzzz@whamcloud.com&amp;gt;&quot; uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/47268&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/47268&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-15800&quot; title=&quot;Fallocate causes transaction deadlock&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-15800&quot;&gt;&lt;del&gt;LU-15800&lt;/del&gt;&lt;/a&gt; ofd: take a read lock for fallocate&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: ce637a38fd863f07c1e9a35f9a7c0731d858c23e&lt;/p&gt;</comment>
                            <comment id="336782" author="gerrit" created="Mon, 6 Jun 2022 06:27:07 +0000"  >&lt;p&gt;&quot;Oleg Drokin &amp;lt;green@whamcloud.com&amp;gt;&quot; merged in patch &lt;a href=&quot;https://review.whamcloud.com/47268/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/47268/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-15800&quot; title=&quot;Fallocate causes transaction deadlock&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-15800&quot;&gt;&lt;del&gt;LU-15800&lt;/del&gt;&lt;/a&gt; ofd: take a read lock for fallocate&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: 5fae80066162ea637c8649f6439fc14e1d9a7cf8&lt;/p&gt;</comment>
                            <comment id="336818" author="pjones" created="Mon, 6 Jun 2022 13:27:21 +0000"  >&lt;p&gt;Landed for 2.16&lt;/p&gt;</comment>
                            <comment id="379052" author="gerrit" created="Tue, 18 Jul 2023 02:45:52 +0000"  >&lt;p&gt;&quot;Xing Huang &amp;lt;hxing@ddn.com&amp;gt;&quot; uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/c/fs/lustre-release/+/51702&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/c/fs/lustre-release/+/51702&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-15800&quot; title=&quot;Fallocate causes transaction deadlock&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-15800&quot;&gt;&lt;del&gt;LU-15800&lt;/del&gt;&lt;/a&gt; ofd: take a read lock for fallocate&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: b2_15&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: a29082fa9985ce97d3e02b8c1009161e54f11f9a&lt;/p&gt;</comment>
                            <comment id="380926" author="sthiell" created="Tue, 1 Aug 2023 15:12:47 +0000"  >&lt;p&gt;We also hit this OSS deadlock with Lustre 2.15.3 yesterday. The backtraces seem to match:&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;PID: 61557  TASK: ffff919ef006a100  CPU: 39  COMMAND: &quot;ll_ost_io00_078&quot;
 #0 [ffff919cea263778] __schedule at ffffffff92db78d8
 #1 [ffff919cea2637e0] schedule at ffffffff92db7ca9
 #2 [ffff919cea2637f0] rwsem_down_read_failed at ffffffff92db9705
 #3 [ffff919cea263878] call_rwsem_down_read_failed at ffffffff929ae568
 #4 [ffff919cea2638c8] down_read at ffffffff92db7120
 #5 [ffff919cea2638e0] osd_read_lock at ffffffffc16d4e7c [osd_ldiskfs]
 #6 [ffff919cea263908] ofd_write_attr_set at ffffffffc1863129 [ofd]
 #7 [ffff919cea263978] ofd_commitrw_write at ffffffffc1863fd2 [ofd]
 #8 [ffff919cea263a30] ofd_commitrw at ffffffffc18698e0 [ofd]
 #9 [ffff919cea263ac0] tgt_brw_write at ffffffffc140c695 [ptlrpc]
#10 [ffff919cea263ca8] tgt_request_handle at ffffffffc140f25f [ptlrpc]
#11 [ffff919cea263d38] ptlrpc_server_handle_request at ffffffffc13b8aa3 [ptlrpc]
#12 [ffff919cea263df0] ptlrpc_main at ffffffffc13ba734 [ptlrpc]
#13 [ffff919cea263ec8] kthread at ffffffff926cb621
#14 [ffff919cea263f50] ret_from_fork_nospec_begin at ffffffff92dc51dd


PID: 40363  TASK: ffff915f2d945280  CPU: 10  COMMAND: &quot;ll_ost00_123&quot;
 #0 [ffff9159d062f8f0] __schedule at ffffffff92db78d8
 #1 [ffff9159d062f958] schedule at ffffffff92db7ca9
 #2 [ffff9159d062f968] wait_transaction_locked at ffffffffc03ca085 [jbd2]
 #3 [ffff9159d062f9c0] add_transaction_credits at ffffffffc03ca378 [jbd2]
 #4 [ffff9159d062fa20] start_this_handle at ffffffffc03ca601 [jbd2]
 #5 [ffff9159d062fab8] jbd2__journal_restart at ffffffffc03cacf2 [jbd2]
 #6 [ffff9159d062faf8] jbd2_journal_restart at ffffffffc03cad63 [jbd2]
 #7 [ffff9159d062fb08] osd_extend_restart_trans at ffffffffc1700d8c [osd_ldiskfs]
 #8 [ffff9159d062fb28] osd_fallocate at ffffffffc1702dc4 [osd_ldiskfs]
 #9 [ffff9159d062fbb0] ofd_object_fallocate at ffffffffc185fb4f [ofd]
#10 [ffff9159d062fc18] ofd_fallocate_hdl at ffffffffc1848835 [ofd]
#11 [ffff9159d062fca8] tgt_request_handle at ffffffffc140f25f [ptlrpc]
#12 [ffff9159d062fd38] ptlrpc_server_handle_request at ffffffffc13b8aa3 [ptlrpc]
#13 [ffff9159d062fdf0] ptlrpc_main at ffffffffc13ba734 [ptlrpc]
#14 [ffff9159d062fec8] kthread at ffffffff926cb621
#15 [ffff9159d062ff50] ret_from_fork_nospec_begin at ffffffff92dc51dd
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;We will try the proposed patch (thanks!).&lt;/p&gt;</comment>
                            <comment id="381031" author="gerrit" created="Wed, 2 Aug 2023 06:22:08 +0000"  >&lt;p&gt;&quot;Oleg Drokin &amp;lt;green@whamcloud.com&amp;gt;&quot; merged in patch &lt;a href=&quot;https://review.whamcloud.com/c/fs/lustre-release/+/51702/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/c/fs/lustre-release/+/51702/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-15800&quot; title=&quot;Fallocate causes transaction deadlock&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-15800&quot;&gt;&lt;del&gt;LU-15800&lt;/del&gt;&lt;/a&gt; ofd: take a read lock for fallocate&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: b2_15&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: 8299b3fd77ebcc372b5d929eaa08231fc703c431&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="77015">LU-16966</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                        <issuelink>
            <issuekey id="59894">LU-13765</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="61986">LU-14214</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                                        </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|i02ogn:</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>