<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 01:32:40 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-3294] osp_sync_llog_init(): ASSERTION( lgh != ((void *)0) ) failed</title>
                <link>https://jira.whamcloud.com/browse/LU-3294</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;When starting an MDT on a SPARC MDS, this assertion failure occurred:&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;Lustre: lustre-MDT0000: used disk, loading
Lustre: lustre-OST0000-osc-MDT0000: Init llog for 0 - catid 0x2:0:0
LustreError: 11309:0:(osp_sync.c:963:osp_sync_llog_init()) ASSERTION( lgh != ((void *)0) ) failed:
LustreError: 11309:0:(osp_sync.c:963:osp_sync_llog_init()) LBUG
Pid: 11309, comm: llog_process_th

Call Trace:

Kernel panic - not syncing: LBUG
Call Trace:
 [0000000010181194] lbug_with_loc+0x94/0xc0 [libcfs]
 [0000000010dc28c8] osp_sync_llog_init+0xa28/0xc00 [osp]
 [0000000010dc6d78] osp_sync_init+0x1f8/0xbe0 [osp]
 [0000000010daf51c] osp_device_alloc+0x4d7c/0x5c40 [osp]
 [000000001033a500] class_setup+0x6e0/0xf00 [obdclass]
 [000000001033da58] class_process_config+0x1738/0x5180 [obdclass]
[...]
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;According to the &quot;catid&quot; printed, I guess the FID of the log must be &lt;span class=&quot;error&quot;&gt;&amp;#91;1:2:0&amp;#93;&lt;/span&gt;.  The problem is in the definition of oat_id:&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;struct ost_id { 
        union {
                struct ostid {
                        __u64   oi_id;
                        __u64   oi_seq;
                } oi;
                struct lu_fid oi_fid;
        };      
};
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;When fid_to_logid() assigns a 64-bit sequence number to oi_seq, which 32 bits go to f_oid and f_ver really depends on the endianness of the MDS.  On the SPARC MDS, the FID_SEQ_LLOG goes to f_ver, causing oatid_id() to return 0, while the log ID as a whole is nonzero.  This combined caused osp_sync_llog_init() to neither open nor re-create the log.&lt;/p&gt;</description>
                <environment></environment>
        <key id="18748">LU-3294</key>
            <summary>osp_sync_llog_init(): ASSERTION( lgh != ((void *)0) ) 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="jhammond">John Hammond</assignee>
                                    <reporter username="liwei">Li Wei</reporter>
                        <labels>
                            <label>endianness</label>
                            <label>sparc</label>
                    </labels>
                <created>Wed, 8 May 2013 14:26:32 +0000</created>
                <updated>Tue, 11 Jun 2013 17:09:54 +0000</updated>
                            <resolved>Tue, 11 Jun 2013 17:09:54 +0000</resolved>
                                    <version>Lustre 2.4.0</version>
                                    <fixVersion>Lustre 2.4.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>3</watches>
                                                                            <comments>
                            <comment id="57942" author="jhammond" created="Wed, 8 May 2013 19:54:58 +0000"  >&lt;p&gt;After 725f3f8e it looks like we should use logid_id(&amp;amp;osi-&amp;gt;osi_cid.lci_logid) instead of ostid_id(&amp;amp;osi-&amp;gt;osi_cid.lci_logid.lgl_oi) in osp_sync_llog_init() and similarly elsewhere. Di, can you comment?&lt;/p&gt;</comment>
                            <comment id="58048" author="di.wang" created="Thu, 9 May 2013 18:31:55 +0000"  >&lt;p&gt;John, yes, you are right. it should logid_id(), instead of ostid_id. Sigh, I had thought all of it has been revert to logid_id in &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-2888&quot; title=&quot;After downgrade from 2.4 to 2.1.4, hit (osd_handler.c:2343:osd_index_try()) ASSERTION( dt_object_exists(dt) ) failed&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-2888&quot;&gt;&lt;del&gt;LU-2888&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;</comment>
                            <comment id="58135" author="jhammond" created="Fri, 10 May 2013 14:18:52 +0000"  >&lt;p&gt;The proposed change for ops_syn_llog_init() has been rolled into &lt;a href=&quot;http://review.whamcloud.com/#change,6305&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/#change,6305&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;However, there are still some spots where ostid_id() is being applied to lgl_oi, and similar combinations. This only affects big-endian servers and so is not an issue for common setups (including LLNL&apos;s x86_64 servers with ppc64 clients).&lt;/p&gt;

&lt;p&gt;If I understand this code correctly it may be useful to add some assertions/trace that:&lt;/p&gt;

&lt;p&gt;In logid_id() the seq is FID_SEQ_LLOG or FID_SEQ_LLOG_NAME.&lt;/p&gt;

&lt;p&gt;Same for logid_set_id().&lt;/p&gt;

&lt;p&gt;In ostid_id() the seq is not FID_SEQ_LLOG or FID_SEQ_LLOG_NAME.&lt;/p&gt;

&lt;p&gt;Same for ostid_set_id().&lt;/p&gt;

&lt;p&gt;A double swab of a ost_id/llog_logid for various valid seqs and oids (big and small) is the identity.&lt;/p&gt;

&lt;p&gt;This may require fixing up POSTID, DOSTID, ... or replacing them with PLOGID(), DLOGID(), ...&lt;/p&gt;</comment>
                            <comment id="58274" author="jhammond" created="Mon, 13 May 2013 14:27:32 +0000"  >&lt;p&gt;The proposed change to osp_sync_llog_init() was landed to master as part of &lt;a href=&quot;http://review.whamcloud.com/6305&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/6305&lt;/a&gt;.&lt;/p&gt;</comment>
                            <comment id="60375" author="jhammond" created="Tue, 11 Jun 2013 17:09:54 +0000"  >&lt;p&gt;Patch landed.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="18764">LU-3302</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|hzvqev:</customfieldvalue>

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