<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 02:49:56 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-12134] llog_reader (incorrectly?) reports a corrupted changelog</title>
                <link>https://jira.whamcloud.com/browse/LU-12134</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;I have been following &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-11205&quot; title=&quot;Failure to clear the changelog for user 1 on MDT&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-11205&quot;&gt;&lt;del&gt;LU-11205&lt;/del&gt;&lt;/a&gt; and am trying to reproduce it. I experimented with the &lt;tt&gt;llog_reader&lt;/tt&gt;:&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;[root]# lustre/tests/llmount.sh
[root]# mkdir /mnt/ldiskfs-mdt0
[root]# mount -t ldiskfs /dev/mapper/mds1_flakey /mnt/ldiskfs-mdt0
[root]# lctl --device lustre-MDT0000 changelog_register
lustre-MDT0000: Registered changelog userid &apos;cl1&apos;
[root]# lustre/utils/llog_reader /mnt/ldiskfs-mdt0/changelog_users
llog_reader: Error allocating -16 bytes for recs_buf: Cannot allocate memory (12)
llog_reader: Could not pack buffer.: Cannot allocate memory (12)
[root]# lustre/utils/llog_reader /mnt/ldiskfs-mdt0/changelog_catalog
llog_reader: File too small for llog header: need 8192, size 0
: Success (0)
llog_reader: Could not pack buffer.: Input/output error (5)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;... Not ideal, but this is probably because there are not any changelog records yet. So I generate one:&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;[root]# touch /mnt/lustre/file
[root]# lustre/utils/llog_reader /mnt/ldiskfs-mdt0/changelog_users
llog_reader: Error allocating -16 bytes for recs_buf: Cannot allocate memory (12)
llog_reader: Could not pack buffer.: Cannot allocate memory (12)
[root]# lustre/utils/llog_reader /mnt/ldiskfs-mdt0/changelog_catalog
rec #1 type=1064553b len=64 offset 8192
Header size : 8192
Time : Fri Mar 29 14:12:30 2019
Number of records: 1
Target uuid : 
-----------------------
#01 (064)id=[0xa:0x1:0x0]:0 path=O/1/d10/10
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Everything is fine now (well, the users changelog is still broken, but I do not really need it). But what happens if I try and generate a few more?&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;[root]# for _ in {0..15}; do touch /mnt/lustre/file-{0..1023}; rm /mnt/lustre/file-{0..1023}; done
[root]# lustre/utils/llog_reader /mnt/ldiskfs-mdt0/changelog_catalog
rec #1 type=1064553b len=64 offset 8192
off 8256 skip 8128 to next chunk.
The log is corrupt (too big at 0)
llog_reader: Could not pack buffer.: Invalid argument (22)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Back to a broken changelog...&lt;br/&gt;
&lt;tt&gt;lfs changelog&lt;/tt&gt; seems to be doing fine though:&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;[root]# lfs changelog lustre-MDT0000
1 01CREAT 14:14:51.291849812 2019.03.29 0x0 t=[0x200000401:0x12:0x0] j=touch.0 ef=0xf u=0:0 nid=0@lo p=[0x200000007:0x1:0x0] file
2 11CLOSE 14:14:51.293009818 2019.03.29 0x42 t=[0x200000401:0x12:0x0] j=touch.0 ef=0xf u=0:0 nid=0@lo
3 01CREAT 14:23:23.124863776 2019.03.29 0x0 t=[0x200000401:0x13:0x0] j=touch.0 ef=0xf u=0:0 nid=0@lo p=[0x200000007:0x1:0x0] file-0
4 11CLOSE 14:23:23.139933635 2019.03.29 0x42 t=[0x200000401:0x13:0x0] j=touch.0 ef=0xf u=0:0 nid=0@lo
5 01CREAT 14:23:23.140437103 2019.03.29 0x0 t=[0x200000401:0x14:0x0] j=touch.0 ef=0xf u=0:0 nid=0@lo p=[0x200000007:0x1:0x0] file-1
(...)
49153 06UNLNK 14:23:57.498329392 2019.03.29 0x1 t=[0x200000401:0x4011:0x0] j=rm.0 ef=0xf u=0:0 nid=0@lo p=[0x200000007:0x1:0x0] file-1022
49154 06UNLNK 14:23:57.499430628 2019.03.29 0x1 t=[0x200000401:0x4012:0x0] j=rm.0 ef=0xf u=0:0 nid=0@lo p=[0x200000007:0x1:0x0] file-1023
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Which makes me hope the issue is only with the &lt;tt&gt;llog_reader&lt;/tt&gt;.&lt;/p&gt;</description>
                <environment></environment>
        <key id="55302">LU-12134</key>
            <summary>llog_reader (incorrectly?) reports a corrupted changelog</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="6" iconUrl="https://jira.whamcloud.com/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="10000">Done</resolution>
                                        <assignee username="tappro">Mikhail Pershin</assignee>
                                    <reporter username="cealustre">CEA</reporter>
                        <labels>
                            <label>ORNL</label>
                    </labels>
                <created>Fri, 29 Mar 2019 14:30:53 +0000</created>
                <updated>Sun, 16 Jan 2022 08:49:33 +0000</updated>
                            <resolved>Sun, 16 Jan 2022 08:49:33 +0000</resolved>
                                    <version>Upstream</version>
                                                        <due></due>
                            <votes>0</votes>
                                    <watches>6</watches>
                                                                            <comments>
                            <comment id="244915" author="pjones" created="Fri, 29 Mar 2019 17:11:26 +0000"  >&lt;p&gt;Mike&lt;/p&gt;

&lt;p&gt;Can you advise&lt;/p&gt;

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

&lt;p&gt;Peter&lt;/p&gt;</comment>
                            <comment id="244949" author="tappro" created="Sat, 30 Mar 2019 15:36:06 +0000"  >&lt;p&gt;try to remount local fs and check again?&lt;/p&gt;</comment>
                            <comment id="245049" author="bougetq" created="Mon, 1 Apr 2019 17:12:52 +0000"  >&lt;p&gt;&amp;gt; try to remount local fs and check again?&lt;/p&gt;

&lt;p&gt;Yes, thank you, this helped:&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;[root]# lustre/utils/llog_reader /mnt/ldiskfs-mdt0/changelog_catalog
llog_reader: Error allocating -16 bytes for recs_buf: Cannot allocate memory (12)
llog_reader: Could not pack buffer.: Cannot allocate memory (12)
[root]# umount /mnt/ldiskfs-mdt0
[root]# umount /mnt/lustre-mds1
[root]# mount -t lustre /dev/mapper/mds1_flakey /mnt/lustre-mds1/
[root]# mount -t ldiskfs /dev/mapper/mds1_flakey /mnt/ldiskfs-mdt0
[root]# lustre/utils/llog_reader /mnt/ldiskfs-mdt0/changelog_catalog
rec #1 type=1064553b len=64 offset 8192
Header size : 8192
Time : Tue Apr  2 00:10:37 2019
Number of records: 1
Target uuid : 
-----------------------
#01 (064)id=[0x12:0x1:0x0]:0 path=O/1/d18/18
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;It would seem unmounting both the ldiskfs and the lustre fs before remounting them is mandatory, otherwise it doesn&apos;t work.&lt;/p&gt;

&lt;p&gt;Dropping caches seems to work too.&lt;/p&gt;</comment>
                            <comment id="245085" author="degremoa" created="Tue, 2 Apr 2019 08:22:53 +0000"  >&lt;p&gt;Quentin, even if you are mounting the same device, you are using 2 different filesystems and 2 different mount points. Both of them have their own caching mechanisms. You cannot expect data written by Lustre being visible right away in the ldiskfs mount. If ldiskfs has already cached several blocks, data structure, etc. it does not expect somebody else changing them.&lt;/p&gt;

&lt;p&gt;Mounting the lustre device with ldiskfs works if you want to read data already present or if Lustre is unmount.&lt;/p&gt;

&lt;p&gt;As this is mostly a caching issue, dropping cache should definitely help.&lt;/p&gt;</comment>
                            <comment id="245089" author="bougetq" created="Tue, 2 Apr 2019 10:56:45 +0000"  >&lt;p&gt;OK, thank you Aur&#233;lien!&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                        <issuelink>
            <issuekey id="52894">LU-11205</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </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|i00e7b:</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>