<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 03:15:50 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-15143] journal_dirty_metadata failed: handle type 0 started at line 1926, credits 9/0, errcode -28</title>
                <link>https://jira.whamcloud.com/browse/LU-15143</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&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;
[17750.028365] LDISKFS-fs: ldiskfs_getblk:896: aborting transaction: error 28 in __ldiskfs_handle_dirty_metadata
[17750.028367] LDISKFS-fs error (device md66): ldiskfs_getblk:896: inode #85: block 3107684352: comm mdt06_007: journal_dirty_metadata failed: handle type 0 started at line 1926, credits 9/0, errcode -28
[17750.640480] Aborting journal on device md66-8.
[17750.640508] Kernel panic - not syncing: LDISKFS-fs (device md66): panic forced after error 
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Lustre crashes with the following stack trace:&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;
[17750.640510] Call Trace:

[17750.640512]  [&amp;lt;ffffffffb4164e41&amp;gt;] dump_stack+0x19/0x1b
[17750.640514]  [&amp;lt;ffffffffb415e550&amp;gt;] panic+0xe8/0x21f
[17750.640524]  [&amp;lt;ffffffffc14b3c86&amp;gt;] ldiskfs_handle_error.part.191+0xa6/0xb0 [ldiskfs]
[17750.640530]  [&amp;lt;ffffffffc14b3ffa&amp;gt;] __ldiskfs_error_inode+0xaa/0x180 [ldiskfs]
[17750.640535]  [&amp;lt;ffffffffc1475f9a&amp;gt;] ? ldiskfs_journal_abort_handle.isra.5+0xaa/0xc0 [ldiskfs]
[17750.640539]  [&amp;lt;ffffffffc1476627&amp;gt;] __ldiskfs_handle_dirty_metadata+0x137/0x220 [ldiskfs]
[17750.640545]  [&amp;lt;ffffffffc149a891&amp;gt;] ldiskfs_getblk+0x131/0x200 [ldiskfs]
[17750.640550]  [&amp;lt;ffffffffc149a987&amp;gt;] ldiskfs_bread+0x27/0xc0 [ldiskfs]
[17750.640558]  [&amp;lt;ffffffffc153c370&amp;gt;] osd_write+0x4c0/0xc30 [osd_ldiskfs]
[17750.640564]  [&amp;lt;ffffffffc1493dcf&amp;gt;] ? ldiskfs_xattr_find_entry+0x3f/0x130 [ldiskfs]
[17750.640582]  [&amp;lt;ffffffffc0c1f3b6&amp;gt;] dt_record_write+0x36/0x120 [obdclass]
[17750.640614]  [&amp;lt;ffffffffc0f04cbe&amp;gt;] tgt_mk_reply_data+0x49e/0xaa0 [ptlrpc]
[17750.640630]  [&amp;lt;ffffffffc0bfc919&amp;gt;] ? lprocfs_counter_add+0xf9/0x160 [obdclass]
[17750.640658]  [&amp;lt;ffffffffc0f05fa2&amp;gt;] tgt_last_rcvd_update+0x7d2/0xa00 [ptlrpc]
[17750.640659]  [&amp;lt;ffffffffb3c1c412&amp;gt;] ? kmem_cache_alloc+0x1c2/0x1f0
[17750.640662]  [&amp;lt;ffffffffc07037ec&amp;gt;] ? start_this_handle+0x3ac/0x430 [jbd2]
[17750.640689]  [&amp;lt;ffffffffc0f0a9c0&amp;gt;] tgt_txn_stop_cb+0x1a0/0x490 [ptlrpc]
[17750.640706]  [&amp;lt;ffffffffc0c20621&amp;gt;] dt_txn_hook_stop+0x81/0xd0 [obdclass]
[17750.640712]  [&amp;lt;ffffffffc152429d&amp;gt;] osd_trans_stop+0x18d/0x920 [osd_ldiskfs]
[17750.640718]  [&amp;lt;ffffffffc151db00&amp;gt;] ? osd_trans_start+0x130/0x4e0 [osd_ldiskfs]
[17750.640729]  [&amp;lt;ffffffffc12c3e8e&amp;gt;] mdt_empty_transno+0x11e/0x850 [mdt]
[17750.640738]  [&amp;lt;ffffffffc12c90be&amp;gt;] mdt_mfd_open+0x8de/0xe70 [mdt]
[17750.640747]  [&amp;lt;ffffffffc12c9d33&amp;gt;] mdt_finish_open+0x6e3/0x880 [mdt]
[17750.640756]  [&amp;lt;ffffffffc12ca1c3&amp;gt;] mdt_open_by_fid+0x2f3/0x4b0 [mdt]
[17750.640765]  [&amp;lt;ffffffffc12cb738&amp;gt;] mdt_reint_open+0x928/0x2630 [mdt]
[17750.640782]  [&amp;lt;ffffffffc0c334b8&amp;gt;] ? upcall_cache_get_entry+0x218/0x8b0 [obdclass]
[17750.640797]  [&amp;lt;ffffffffc0c384fe&amp;gt;] ? lu_ucred+0x1e/0x30 [obdclass]
[17750.640806]  [&amp;lt;ffffffffc12a9db5&amp;gt;] ? mdt_ucred+0x15/0x20 [mdt]
[17750.640814]  [&amp;lt;ffffffffc12aa651&amp;gt;] ? mdt_root_squash+0x21/0x430 [mdt]
[17750.640823]  [&amp;lt;ffffffffc12bef43&amp;gt;] mdt_reint_rec+0x83/0x210 [mdt]
[17750.640831]  [&amp;lt;ffffffffc12984b3&amp;gt;] mdt_reint_internal+0x703/0xae0 [mdt]
[17750.640840]  [&amp;lt;ffffffffc12a4f26&amp;gt;] ? mdt_intent_fixup_resent+0x36/0x220 [mdt]
[17750.640848]  [&amp;lt;ffffffffc12a51a3&amp;gt;] mdt_intent_open+0x93/0x430 [mdt]
[17750.640876]  [&amp;lt;ffffffffc0ea9437&amp;gt;] ? lustre_msg_buf+0x17/0x60 [ptlrpc]
[17750.640884]  [&amp;lt;ffffffffc129b6ba&amp;gt;] mdt_intent_opc+0x1ba/0xb50 [mdt]
[17750.640911]  [&amp;lt;ffffffffc0ead900&amp;gt;] ? lustre_swab_ldlm_policy_data+0x30/0x30 [ptlrpc]
[17750.640919]  [&amp;lt;ffffffffc12a5110&amp;gt;] ? mdt_intent_fixup_resent+0x220/0x220 [mdt]
[17750.640928]  [&amp;lt;ffffffffc12a37f4&amp;gt;] mdt_intent_policy+0x1a4/0x360 [mdt]
[17750.640949]  [&amp;lt;ffffffffc0e5b52a&amp;gt;] ldlm_lock_enqueue+0x3da/0xae0 [ptlrpc]
[17750.640955]  [&amp;lt;ffffffffc095d6c3&amp;gt;] ? cfs_hash_bd_add_locked+0x63/0x80 [libcfs]
[17750.640961]  [&amp;lt;ffffffffc0960e4e&amp;gt;] ? cfs_hash_add+0xbe/0x1a0 [libcfs]
[17750.640985]  [&amp;lt;ffffffffc0e83d57&amp;gt;] ldlm_handle_enqueue0+0xa87/0x1660 [ptlrpc]
[17750.641010]  [&amp;lt;ffffffffc0ead980&amp;gt;] ? lustre_swab_ldlm_lock_desc+0x30/0x30 [ptlrpc]
[17750.641039]  [&amp;lt;ffffffffc0f0de52&amp;gt;] tgt_enqueue+0x62/0x210 [ptlrpc]
[17750.641067]  [&amp;lt;ffffffffc0f12c6a&amp;gt;] tgt_request_handle+0x96a/0x1680 [ptlrpc]
[17750.641095]  [&amp;lt;ffffffffc0eede71&amp;gt;] ? ptlrpc_nrs_req_get_nolock0+0xd1/0x170 [ptlrpc]
[17750.641100]  [&amp;lt;ffffffffc0951c0e&amp;gt;] ? ktime_get_real_seconds+0xe/0x10 [libcfs]
[17750.641126]  [&amp;lt;ffffffffc0eb87b6&amp;gt;] ptlrpc_server_handle_request+0x256/0xb10 [ptlrpc]
[17750.641150]  [&amp;lt;ffffffffc0eb91fe&amp;gt;] ? ptlrpc_wait_event+0xae/0x380 [ptlrpc]
[17750.641151]  [&amp;lt;ffffffffb3ad6b22&amp;gt;] ? default_wake_function+0x12/0x20
[17750.641152]  [&amp;lt;ffffffffb3acbdeb&amp;gt;] ? __wake_up_common+0x5b/0x90
[17750.641176]  [&amp;lt;ffffffffc0ebc895&amp;gt;] ptlrpc_main+0xc75/0x1c50 [ptlrpc]
[17750.641200]  [&amp;lt;ffffffffc0ebbc20&amp;gt;] ? ptlrpc_register_service+0x1010/0x1010 [ptlrpc]
[17750.641201]  [&amp;lt;ffffffffb3ac1f81&amp;gt;] kthread+0xd1/0xe0
[17750.641202]  [&amp;lt;ffffffffb3ac1eb0&amp;gt;] ? insert_kthread_work+0x40/0x40
[17750.641204]  [&amp;lt;ffffffffb4177c1d&amp;gt;] ret_from_fork_nospec_begin+0x7/0x21
[17750.641204]  [&amp;lt;ffffffffb3ac1eb0&amp;gt;] ? insert_kthread_work+0x40/0x40 
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;It seems that osd_declare_write() incorrectly calculates the necessary journal credits for /reply_data (32-byte append write) when extents are moved from the inode body to an external block:&lt;/p&gt;

&lt;p&gt;1.    user quota (properly accounted)&lt;br/&gt;
2.    group quota (properly accounted)&lt;br/&gt;
3.    project quota (properly accounted)&lt;br/&gt;
4.    inode update (accounted via inode != NULL check)&lt;br/&gt;
5.    bitmap update for the new block (properly accounted)&lt;br/&gt;
6.    gd update for the new block (properly accounted)&lt;br/&gt;
7.    new block update (properly accounted)&lt;br/&gt;
8.    bitmap update for the new extent map block&lt;br/&gt;
9.    gd update for the new extent map block&lt;br/&gt;
10.    extent map update&lt;/p&gt;

&lt;p&gt;The last three blocks are not properly accounted, only two blocks are in fact calculated via:&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;
                depth = inode != NULL ? ext_depth(inode) : 0;
                depth = max(depth, 1) + 1; &lt;span class=&quot;code-comment&quot;&gt;// we only get 2 here
&lt;/span&gt;                credits = depth; 
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Eventually, only 9 credits are reserved but 10 credits are used.&lt;/p&gt;

&lt;p&gt;A patch will be uploaded shortly.&lt;/p&gt;</description>
                <environment></environment>
        <key id="66782">LU-15143</key>
            <summary>journal_dirty_metadata failed: handle type 0 started at line 1926, credits 9/0, errcode -28</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="panda">Andrew Perepechko</assignee>
                                    <reporter username="panda">Andrew Perepechko</reporter>
                        <labels>
                            <label>patch</label>
                    </labels>
                <created>Thu, 21 Oct 2021 19:36:20 +0000</created>
                <updated>Sat, 20 Nov 2021 14:35:54 +0000</updated>
                            <resolved>Sat, 20 Nov 2021 14:35:54 +0000</resolved>
                                                    <fixVersion>Lustre 2.15.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>3</watches>
                                                                            <comments>
                            <comment id="316245" author="gerrit" created="Thu, 21 Oct 2021 19:42:07 +0000"  >&lt;p&gt;&quot;Andrew Perepechko &amp;lt;andrew.perepechko@hpe.com&amp;gt;&quot; uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/45328&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/45328&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-15143&quot; title=&quot;journal_dirty_metadata failed: handle type 0 started at line 1926, credits 9/0, errcode -28&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-15143&quot;&gt;&lt;del&gt;LU-15143&lt;/del&gt;&lt;/a&gt; osd-ldiskfs: osd_declare_write() underestimates  credits&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 384581eaba1cfd536a4dd7761a294523a6612d46&lt;/p&gt;</comment>
                            <comment id="318729" author="gerrit" created="Sat, 20 Nov 2021 06:24:36 +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/45328/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/45328/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-15143&quot; title=&quot;journal_dirty_metadata failed: handle type 0 started at line 1926, credits 9/0, errcode -28&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-15143&quot;&gt;&lt;del&gt;LU-15143&lt;/del&gt;&lt;/a&gt; osd-ldiskfs: osd_declare_write() underestimates credits&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: 0844727c55d52ec24f6cfb7fa043755a6635949c&lt;/p&gt;</comment>
                            <comment id="318771" author="pjones" created="Sat, 20 Nov 2021 14:35:54 +0000"  >&lt;p&gt;Landed for 2.15&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                                                <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|i0281z:</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>