<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 01:53:12 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-5635] (llog.c:310:llog_process_thread()) ASSERTION( index &lt;= last_index + 1 ) failed:</title>
                <link>https://jira.whamcloud.com/browse/LU-5635</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;Some hsm operations (lfs hsm_*) were running on a client, and I wanted to check the list of actions:&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;cat /proc/fs/lustre/mdt/tas01-MDT0000/hsm/actions
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This led to an immediate crash of the MDT:&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;lt;0&amp;gt;LustreError: 3773:0:(llog.c:310:llog_process_thread()) ASSERTION( index &amp;lt;= last_index + 1 ) failed: 
&amp;lt;0&amp;gt;LustreError: 3773:0:(llog.c:310:llog_process_thread()) LBUG
&amp;lt;4&amp;gt;Pid: 3773, comm: cat
&amp;lt;4&amp;gt;
&amp;lt;4&amp;gt;Call Trace:
&amp;lt;4&amp;gt; [&amp;lt;ffffffffa02f8895&amp;gt;] libcfs_debug_dumpstack+0x55/0x80 [libcfs]
&amp;lt;4&amp;gt; [&amp;lt;ffffffffa02f8e97&amp;gt;] lbug_with_loc+0x47/0xb0 [libcfs]
&amp;lt;4&amp;gt; [&amp;lt;ffffffffa0413fff&amp;gt;] llog_process_thread+0xd7f/0xdd0 [obdclass]
&amp;lt;4&amp;gt; [&amp;lt;ffffffffa0dd7410&amp;gt;] ? hsm_actions_show_cb+0x0/0x3d0 [mdt]
&amp;lt;4&amp;gt; [&amp;lt;ffffffffa041585f&amp;gt;] llog_process_or_fork+0x13f/0x540 [obdclass]
&amp;lt;4&amp;gt; [&amp;lt;ffffffffa0418612&amp;gt;] llog_cat_process_cb+0x1b2/0x5e0 [obdclass]
&amp;lt;4&amp;gt; [&amp;lt;ffffffffa0413c22&amp;gt;] llog_process_thread+0x9a2/0xdd0 [obdclass]
&amp;lt;4&amp;gt; [&amp;lt;ffffffff810792c7&amp;gt;] ? current_fs_time+0x27/0x30
&amp;lt;4&amp;gt; [&amp;lt;ffffffffa0418460&amp;gt;] ? llog_cat_process_cb+0x0/0x5e0 [obdclass]
&amp;lt;4&amp;gt; [&amp;lt;ffffffffa041585f&amp;gt;] llog_process_or_fork+0x13f/0x540 [obdclass]
&amp;lt;4&amp;gt; [&amp;lt;ffffffffa0416b9d&amp;gt;] llog_cat_process_or_fork+0x1ad/0x300 [obdclass]
&amp;lt;4&amp;gt; [&amp;lt;ffffffffa0dd7410&amp;gt;] ? hsm_actions_show_cb+0x0/0x3d0 [mdt]
&amp;lt;4&amp;gt; [&amp;lt;ffffffffa0416d09&amp;gt;] llog_cat_process+0x19/0x20 [obdclass]
&amp;lt;4&amp;gt; [&amp;lt;ffffffffa0dd7376&amp;gt;] mdt_hsm_actions_proc_show+0x1a6/0x240 [mdt]
&amp;lt;4&amp;gt; [&amp;lt;ffffffffa0dd8b03&amp;gt;] ? mdt_hsm_actions_proc_start+0x63/0x380 [mdt]
&amp;lt;4&amp;gt; [&amp;lt;ffffffff811ade02&amp;gt;] seq_read+0xf2/0x400
&amp;lt;4&amp;gt; [&amp;lt;ffffffff8100b9ce&amp;gt;] ? common_interrupt+0xe/0x13
&amp;lt;4&amp;gt; [&amp;lt;ffffffff811f353e&amp;gt;] proc_reg_read+0x7e/0xc0
&amp;lt;4&amp;gt; [&amp;lt;ffffffff81189695&amp;gt;] vfs_read+0xb5/0x1a0
&amp;lt;4&amp;gt; [&amp;lt;ffffffff811897d1&amp;gt;] sys_read+0x51/0x90
&amp;lt;4&amp;gt; [&amp;lt;ffffffff810e1e4e&amp;gt;] ? __audit_syscall_exit+0x25e/0x290
&amp;lt;4&amp;gt; [&amp;lt;ffffffff8100b072&amp;gt;] system_call_fastpath+0x16/0x1b
&amp;lt;4&amp;gt;
&amp;lt;0&amp;gt;Kernel panic - not syncing: LBUG
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Crash stack 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;crash&amp;gt; bt
PID: 3773   TASK: ffff880130d44ae0  CPU: 3   COMMAND: &quot;cat&quot;
 #0 [ffff8801144bf900] machine_kexec at ffffffff81038f3b
 #1 [ffff8801144bf960] crash_kexec at ffffffff810c5d82
 #2 [ffff8801144bfa30] panic at ffffffff8152798a
 #3 [ffff8801144bfab0] lbug_with_loc at ffffffffa02f8eeb [libcfs]
 #4 [ffff8801144bfad0] llog_process_thread at ffffffffa0413fff [obdclass]
 #5 [ffff8801144bfb80] llog_process_or_fork at ffffffffa041585f [obdclass]
 #6 [ffff8801144bfbd0] llog_cat_process_cb at ffffffffa0418612 [obdclass]
 #7 [ffff8801144bfc30] llog_process_thread at ffffffffa0413c22 [obdclass]
 #8 [ffff8801144bfce0] llog_process_or_fork at ffffffffa041585f [obdclass]
 #9 [ffff8801144bfd30] llog_cat_process_or_fork at ffffffffa0416b9d [obdclass]
#10 [ffff8801144bfdc0] llog_cat_process at ffffffffa0416d09 [obdclass]
#11 [ffff8801144bfde0] mdt_hsm_actions_proc_show at ffffffffa0dd7376 [mdt]
#12 [ffff8801144bfe20] seq_read at ffffffff811ade02
#13 [ffff8801144bfea0] proc_reg_read at ffffffff811f353e
#14 [ffff8801144bfef0] vfs_read at ffffffff81189695
#15 [ffff8801144bff30] sys_read at ffffffff811897d1
#16 [ffff8801144bff80] system_call_fastpath at ffffffff8100b072
    RIP: 00007f6de5e4f730  RSP: 00007fff9aa26d98  RFLAGS: 00000206
    RAX: 0000000000000000  RBX: ffffffff8100b072  RCX: 00007f6de5e4f730
    RDX: 0000000000008000  RSI: 00000000019c7000  RDI: 0000000000000003
    RBP: 00000000019c7000   R8: 00007f6de6103ee8   R9: 0000000000000001
    R10: 00007fff9aa26b20  R11: 0000000000000246  R12: ffffffffffff8000
    R13: 0000000000000003  R14: 0000000000008000  R15: 0000000000000003
    ORIG_RAX: 0000000000000000  CS: 0033  SS: 002b
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment>Centos 6.5 with Lustre head of tree (commit f04237)</environment>
        <key id="26616">LU-5635</key>
            <summary>(llog.c:310:llog_process_thread()) ASSERTION( index &lt;= last_index + 1 ) failed:</summary>
                <type id="1" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="4" iconUrl="https://jira.whamcloud.com/images/icons/priorities/minor.svg">Minor</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="jamesanunez">James Nunez</assignee>
                                    <reporter username="fzago">Frank Zago</reporter>
                        <labels>
                            <label>patch</label>
                    </labels>
                <created>Wed, 17 Sep 2014 19:04:07 +0000</created>
                <updated>Wed, 1 Mar 2017 12:00:07 +0000</updated>
                            <resolved>Thu, 4 Dec 2014 14:14:38 +0000</resolved>
                                    <version>Lustre 2.6.0</version>
                                    <fixVersion>Lustre 2.7.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>7</watches>
                                                                            <comments>
                            <comment id="95427" author="fzago" created="Wed, 1 Oct 2014 16:25:44 +0000"  >&lt;p&gt;I can reproduce quite easily by running &lt;/p&gt;

&lt;p&gt;    while true ; do cat actions &amp;gt; /dev/null ; done&lt;/p&gt;

&lt;p&gt;and the crash happens within minutes.&lt;/p&gt;</comment>
                            <comment id="95476" author="fzago" created="Wed, 1 Oct 2014 20:55:39 +0000"  >&lt;p&gt;I added some traces right before the LASSERT:&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;index=64769, last_index=64767, cd=ffff88012144dbe8, last_called_index=64768, cd-&amp;gt;lpcd_first_idx=64768, cd-&amp;gt;lpcd_last_idx=0
LustreError: 9008:0:(llog.c:316:llog_process_thread()) ASSERTION( index &amp;lt;= last_index + 1 ) failed:
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;So the function is entered with index &amp;gt; last_index. Proposed patch:  &lt;a href=&quot;http://review.whamcloud.com/12161&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/12161&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Although the patch does indeed prevent the crash, I&apos;m unsure whether it is the correct place to do the check. May be that should be done earlier in llog_cat_process_cb(), or even in llog_cat_set_first_idx() as that function appears to push index beyond its range.&lt;/p&gt;
</comment>
                            <comment id="100634" author="gerrit" created="Thu, 4 Dec 2014 02:37:13 +0000"  >&lt;p&gt;Oleg Drokin (oleg.drokin@intel.com) merged in patch &lt;a href=&quot;http://review.whamcloud.com/12161/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/12161/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-5635&quot; title=&quot;(llog.c:310:llog_process_thread()) ASSERTION( index &amp;lt;= last_index + 1 ) failed:&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-5635&quot;&gt;&lt;del&gt;LU-5635&lt;/del&gt;&lt;/a&gt; llog: prevent out-of-bound index&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: 28a963f266a57308ceb6903da238acf008e628bf&lt;/p&gt;</comment>
                            <comment id="100665" author="jamesanunez" created="Thu, 4 Dec 2014 14:14:38 +0000"  >&lt;p&gt;Patch landed to master (pre-2.7).&lt;/p&gt;</comment>
                            <comment id="118480" author="tappro" created="Sun, 14 Jun 2015 09:22:53 +0000"  >&lt;p&gt;The llog_cat_set_first_idx() looks guilty. Consider that there is cancel for last index in bitmap == bitmap_size - 1, i.e. 64767, then cat_idx will be assigned to that value first, then it enters cycle to find first set bit. The problem is that cycle counter &apos;i&apos; is always inside bitmap because of this:&lt;br/&gt;
i = (i + 1) % bitmap_size; but cat_idx is just incremented separately with each iteration, so it will became 64768 and beyond, which is out of range.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                                        </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="30626">LU-6714</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|hzwwif:</customfieldvalue>

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