<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 02:01:54 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-6634] (osd_handler.c:901:osd_trans_start()) ASSERTION( get_current()-&gt;journal_info == ((void *)0) ) failed: when reaching Catalog full condition</title>
                <link>https://jira.whamcloud.com/browse/LU-6634</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;I found this problem during my testing of my patch for &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-6556&quot; title=&quot;changelog catalog corruption if all possible records is define &quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-6556&quot;&gt;&lt;del&gt;LU-6556&lt;/del&gt;&lt;/a&gt;, when also trying verify a Catalog full condition ends up with ENOSPC.&lt;/p&gt;

&lt;p&gt;Having a look to the code, this happens because in the error path for llog_cat_new_log(), llog_destroy() is called to destroy the new plain LLOG for which the reference can&apos;t be recorded into Catalog because there is no slot available to do so.&lt;br/&gt;
Doing so triggers the Assertion because there is already a started transaction from llog_cat_add(), when llog_destroy() wants to start its own transaction.&lt;/p&gt;</description>
                <environment></environment>
        <key id="30350">LU-6634</key>
            <summary>(osd_handler.c:901:osd_trans_start()) ASSERTION( get_current()-&gt;journal_info == ((void *)0) ) failed: when reaching Catalog full condition</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="bzzz">Alex Zhuravlev</assignee>
                                    <reporter username="bfaccini">Bruno Faccini</reporter>
                        <labels>
                    </labels>
                <created>Sat, 23 May 2015 21:49:32 +0000</created>
                <updated>Fri, 18 Dec 2015 19:40:15 +0000</updated>
                            <resolved>Wed, 4 Nov 2015 14:38:09 +0000</resolved>
                                    <version>Lustre 2.7.0</version>
                    <version>Lustre 2.8.0</version>
                                    <fixVersion>Lustre 2.8.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>10</watches>
                                                                            <comments>
                            <comment id="116281" author="bfaccini" created="Sat, 23 May 2015 22:06:25 +0000"  >&lt;p&gt;The full LBUG/Assert signature is :&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;LustreError: 11337:0:(llog_osd.c:530:llog_osd_write_rec()) no free catalog slots for log...
LustreError: 11337:0:(osd_handler.c:901:osd_trans_start()) ASSERTION( get_current()-&amp;gt;journal_info == ((void *)0) ) failed:
LustreError: 11337:0:(osd_handler.c:901:osd_trans_start()) LBUG
Pid: 11337, comm: lctl

Call Trace:
 [&amp;lt;ffffffffa042f875&amp;gt;] libcfs_debug_dumpstack+0x55/0x80 [libcfs]
 [&amp;lt;ffffffffa042fe77&amp;gt;] lbug_with_loc+0x47/0xb0 [libcfs]
 [&amp;lt;ffffffffa12616cc&amp;gt;] osd_trans_start+0x25c/0x660 [osd_ldiskfs]
 [&amp;lt;ffffffffa054ef0a&amp;gt;] llog_osd_destroy+0x42a/0xd40 [obdclass]
 [&amp;lt;ffffffffa0548e6c&amp;gt;] llog_cat_new_log+0x1ec/0x710 [obdclass]
 [&amp;lt;ffffffffa054949a&amp;gt;] llog_cat_add_rec+0x10a/0x450 [obdclass]
 [&amp;lt;ffffffffa05499f5&amp;gt;] llog_cat_add+0x215/0x380 [obdclass]
 [&amp;lt;ffffffffa16c8905&amp;gt;] llog_test_9+0xf15/0x11a0 [llog_test]
 [&amp;lt;ffffffffa054a200&amp;gt;] ? llog_ctxt_destroy+0x160/0x1f0 [obdclass]
 [&amp;lt;ffffffffa16c55ff&amp;gt;] ? verify_handle+0x1f/0x240 [llog_test]
 [&amp;lt;ffffffffa16cde2a&amp;gt;] llog_run_tests+0x165a/0x1a00 [llog_test]
 [&amp;lt;ffffffffa16ce979&amp;gt;] llog_test_setup+0x7a9/0x8f0 [llog_test]
 [&amp;lt;ffffffffa05749cb&amp;gt;] obd_setup+0x19b/0x290 [obdclass]
 [&amp;lt;ffffffff8116fb23&amp;gt;] ? kmem_cache_alloc_trace+0x1a3/0x1b0
 [&amp;lt;ffffffffa055f9db&amp;gt;] ? class_new_export+0x78b/0x9a0 [obdclass]
 [&amp;lt;ffffffffa0574cc8&amp;gt;] class_setup+0x208/0x870 [obdclass]
 [&amp;lt;ffffffffa057c59c&amp;gt;] class_process_config+0x113c/0x27c0 [obdclass]
 [&amp;lt;ffffffff8117008c&amp;gt;] ? __kmalloc+0x20c/0x220
 [&amp;lt;ffffffff8117008c&amp;gt;] ? __kmalloc+0x20c/0x220
 [&amp;lt;ffffffffa0556a65&amp;gt;] class_handle_ioctl+0xbc5/0x21b0 [obdclass]
 [&amp;lt;ffffffffa053e2ab&amp;gt;] obd_class_ioctl+0x4b/0x190 [obdclass]
 [&amp;lt;ffffffff8119dfc2&amp;gt;] vfs_ioctl+0x22/0xa0
 [&amp;lt;ffffffff8119e164&amp;gt;] do_vfs_ioctl+0x84/0x580
 [&amp;lt;ffffffff8119e6e1&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;
&lt;p&gt;and if required, I can provide a test to be added in llog_test to create the catalog full situation.&lt;/p&gt;</comment>
                            <comment id="116293" author="tappro" created="Sun, 24 May 2015 14:09:06 +0000"  >&lt;p&gt;this is obvious bug, log_destroy() shouldn&apos;t be called in error path in this function because it starts new transaction while in context of another one.&lt;/p&gt;</comment>
                            <comment id="117724" author="tappro" created="Mon, 8 Jun 2015 12:55:57 +0000"  >&lt;p&gt;Since this llog cannot be deleted inside current transaction, I propose to mark it as &apos;invalid&apos; or &apos;orphaned&apos; and delete outside this call, probably in llog processing. It can be also deleted by lfsck in case of server reboot also by checking such flag.&lt;/p&gt;</comment>
                            <comment id="127074" author="tappro" created="Fri, 11 Sep 2015 13:28:43 +0000"  >&lt;p&gt;This can be fixed now with simple fix after commit made by Wang Di for llog changes related to DNE. We have to use just llog_trans_destroy() there.&lt;/p&gt;</comment>
                            <comment id="127285" author="di.wang" created="Mon, 14 Sep 2015 20:42:49 +0000"  >&lt;p&gt;Actually the patch on &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-6846&quot; title=&quot;dt_record_write()) ASSERTION( dt-&amp;gt;do_body_ops-&amp;gt;dbo_write ) failed: &quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-6846&quot;&gt;&lt;del&gt;LU-6846&lt;/del&gt;&lt;/a&gt; will fix this issue.&lt;a href=&quot;http://review.whamcloud.com/16333&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/16333&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The idea is that we do not need take care of the created llog object, because if llog_cat_new_log() fails, and the log handle has been added to phd_entry, so llog_cat_close() will take care of the created object anyway.&lt;/p&gt;</comment>
                            <comment id="127321" author="bzzz" created="Tue, 15 Sep 2015 09:33:51 +0000"  >&lt;p&gt;Di, llog_cat_close() is called at mount. meaning llog_cat_new_log() leaves an orphan?&lt;/p&gt;</comment>
                            <comment id="127322" author="gerrit" created="Tue, 15 Sep 2015 09:43:35 +0000"  >&lt;p&gt;Alex Zhuravlev (alexey.zhuravlev@intel.com) uploaded a new patch: &lt;a href=&quot;http://review.whamcloud.com/16427&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/16427&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-6634&quot; title=&quot;(osd_handler.c:901:osd_trans_start()) ASSERTION( get_current()-&amp;gt;journal_info == ((void *)0) ) failed: when reaching Catalog full condition&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-6634&quot;&gt;&lt;del&gt;LU-6634&lt;/del&gt;&lt;/a&gt; llog: destroy plain llog if init fails&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 7edf0a47546b03ac886500d1b78f1cb01084850e&lt;/p&gt;</comment>
                            <comment id="127340" author="di.wang" created="Tue, 15 Sep 2015 14:46:16 +0000"  >&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;Di, llog_cat_close() is called at mount. meaning llog_cat_new_log() leaves an orphan?
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;hmm, not sure I follow, you mean called at umount? why can not this code take care of this?&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;        list_for_each_entry_safe(loghandle, n, &amp;amp;cathandle-&amp;gt;u.chd.chd_head,
                                 u.phd.phd_entry) {
                struct llog_log_hdr     *llh = loghandle-&amp;gt;lgh_hdr;
                int                      index;

                /* unlink open-not-created llogs */
                list_del_init(&amp;amp;loghandle-&amp;gt;u.phd.phd_entry);
                llh = loghandle-&amp;gt;lgh_hdr;
                if (loghandle-&amp;gt;lgh_obj != NULL &amp;amp;&amp;amp; llh != NULL &amp;amp;&amp;amp;
                    (llh-&amp;gt;llh_flags &amp;amp; LLOG_F_ZAP_WHEN_EMPTY) &amp;amp;&amp;amp;
                    (llh-&amp;gt;llh_count == 1)) {
                        rc = llog_destroy(env, loghandle);

&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                            <comment id="127341" author="bzzz" created="Tue, 15 Sep 2015 14:49:01 +0000"  >&lt;p&gt;because this code is called at umount (when we close the llog). and of course, this is very different transaction.&lt;/p&gt;</comment>
                            <comment id="127380" author="di.wang" created="Tue, 15 Sep 2015 19:12:23 +0000"  >&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;because this code is called at umount (when we close the llog). and of course, this is very different transaction.
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Well, it is not an orphan, and will be destroyed during umount. TBH, I do not think it is a big deal. The reason I am a bit reluctant  is that if you do destroy here, you have to reserve the credit for this destroy here? Btw: I did not see it declare the destroy in llog_cat_decalre_add_rec()? &lt;/p&gt;</comment>
                            <comment id="127385" author="bzzz" created="Tue, 15 Sep 2015 19:23:33 +0000"  >&lt;p&gt;there is no need to declare that as it&apos;s a reverse operation and it doesn&apos;t consume additional credits. it&apos;s an orphan because it isn&apos;t referenced by some on-disk structure. so if we crash before umount this object is leaked. I agree this isn&apos;t a very big deal, but if this can be fixed easily, why not?&lt;/p&gt;</comment>
                            <comment id="132539" author="gerrit" created="Tue, 3 Nov 2015 19:53:26 +0000"  >&lt;p&gt;Oleg Drokin (oleg.drokin@intel.com) merged in patch &lt;a href=&quot;http://review.whamcloud.com/16427/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/16427/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-6634&quot; title=&quot;(osd_handler.c:901:osd_trans_start()) ASSERTION( get_current()-&amp;gt;journal_info == ((void *)0) ) failed: when reaching Catalog full condition&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-6634&quot;&gt;&lt;del&gt;LU-6634&lt;/del&gt;&lt;/a&gt; llog: destroy plain llog if init fails&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: 9126d8159d5d5b61a600e7427d0c173084a710e6&lt;/p&gt;</comment>
                            <comment id="132620" author="pjones" created="Wed, 4 Nov 2015 14:38:09 +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="29826">LU-6556</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="32056">LU-7138</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="31350">LU-6954</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|hzxe3b:</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>