<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 01:23:57 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-2288] missing debuginfo for lustre modules </title>
                <link>https://jira.whamcloud.com/browse/LU-2288</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;Lustre RPM builds don&apos;t produce packages containing debuginfo for the Lustre kernel modules.  This is because kernel modules are not marked as executable and so are ignored by find-debuginfo.sh.  Based on the approach taken in the RHEL kernel.spec, I added the following to the end of the %install section:&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;# mark modules executable so that strip-to-file can strip them
find $RPM_BUILD_ROOT/lib/modules/%{kversion}/updates -name &quot;*.ko&quot; -type f | \
  xargs --no-run-if-empty chmod u+x
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This done, debuginfo files for the kernel modules appear in lustre-debuginfo.  I would have liked it if a lustre-modules-debuginfo package was automagically created by rpmbuild.  But alas no.  So can we live with a monolithic debuginfo package?  After much introspection I have decided that I can.&lt;/p&gt;

&lt;p&gt;I wish it were this simple, but there is an obnoxious bug in debugedit (see &lt;a href=&quot;https://bugzilla.redhat.com/show_bug.cgi?id=304121&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://bugzilla.redhat.com/show_bug.cgi?id=304121&lt;/a&gt;) which may cause rpmbuild to fail if configure is given noncanonical paths to the o2ib tree (or others).  In particular,  &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;./configure --with-linux=/usr/src/linux-2.6.32-279.11.1.el6.lm.x86_64/ --with-o2ib=/opt/ofed/src/openib
make rpms
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;will succeed, while&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;./configure --with-linux=/usr/src/linux-2.6.32-279.11.1.el6.lm.x86_64/ --with-o2ib=/opt/ofed/src/openib/
make rpms
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;will fail with something like:&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;...
extracting debug info from /root/rpmbuild/BUILDROOT/lustre-2.3.54-2.6.32_279.11.1.el6.lm.x86_64_g7f57b6a.x86_64/lib/modules/2.6.32-279.11.1.el6.lm.x86_64/updates/kernel/net/lustre/ko2iblnd.ko
/usr/lib/rpm/debugedit: canonicalization unexpectedly shrank by one character
error: Bad exit status from /var/tmp/rpm-tmp.pTyzxn (%install)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;This could be addressed, say, by doing path c14n in lnet/autoconf/lustre-lnet.m4.  I assume that the same would apply to qsnet, portals, rapid array, model railroad, and all of the other LNDs whose names I forget.  &lt;/p&gt;

&lt;p&gt;Similarly lustre-ldiskfs-debuginfo is created but empty.&lt;/p&gt;

&lt;p&gt;I admit that this adds some complexity/fragility to lustre.spec but the benefits are easily seen by anyone who runs &quot;perf top&quot; on a busy lustre client.&lt;/p&gt;

&lt;p&gt;I welcome suggestions as I continue to poke at this.&lt;/p&gt;</description>
                <environment>RHEL 6.3 and others.</environment>
        <key id="16603">LU-2288</key>
            <summary>missing debuginfo for lustre modules </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="keith">Keith Mannthey</assignee>
                                    <reporter username="jhammond">John Hammond</reporter>
                        <labels>
                            <label>build</label>
                            <label>patch</label>
                    </labels>
                <created>Tue, 6 Nov 2012 12:01:26 +0000</created>
                <updated>Fri, 3 Oct 2014 13:51:17 +0000</updated>
                            <resolved>Tue, 8 Jan 2013 10:08:05 +0000</resolved>
                                    <version>Lustre 2.4.0</version>
                                    <fixVersion>Lustre 2.4.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>4</watches>
                                                                            <comments>
                            <comment id="47450" author="green" created="Tue, 6 Nov 2012 12:52:27 +0000"  >&lt;p&gt;Please note that in current scheme of things Lustre modules are already containing necessaary debug info when they sit in /lib/modules, so extra debuginfo rpm is not needed.&lt;br/&gt;
I routinely use module .ko files for my debugging needs with gdb.&lt;/p&gt;</comment>
                            <comment id="47456" author="brian" created="Tue, 6 Nov 2012 13:29:15 +0000"  >&lt;p&gt;The issue of the trailing / needing to be present on paths should be resolvable by configure itself, yes?  i.e. if it&apos;s not there, configure adds it when assigning the path argument to the variable?&lt;/p&gt;</comment>
                            <comment id="47472" author="jhammond" created="Tue, 6 Nov 2012 16:22:29 +0000"  >&lt;p&gt;Hi Brian,&lt;/p&gt;

&lt;p&gt;It&apos;s not that trailing slashes are needed.  It&apos;s that if they are used on args to configure then some paths end up with double slashes and are non canonical which angers debugedit.&lt;/p&gt;</comment>
                            <comment id="47482" author="jhammond" created="Tue, 6 Nov 2012 18:15:08 +0000"  >&lt;p&gt;Hi Oleg,&lt;/p&gt;

&lt;p&gt;Thanks for pointing this out.  I guess the issue then is that perf does not expect to find a kernel module&apos;s debuginfo in the module itself.  Rather it only checks for the symlinks of the form /usr/lib/debug/.build-id/bc/73e36cd1bc59cbf4b73768de0af7b28c47b678.debug.&lt;/p&gt;

&lt;p&gt;To see this, after installing the uncooked RPMs I did:&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;build_id_dir=/usr/lib/debug/.build-id

for file in $(rpm -ql lustre-modules lustre-ldiskfs); do
    if build_id=$(/usr/lib/rpm/debugedit -i $file 2&amp;gt;/dev/null); then
        ln -s ../../../../../$file $build_id_dir/${build_id:0:2}/${build_id:2}
        ln -s ../../../../../$file $build_id_dir/${build_id:0:2}/${build_id:2}.debug
    fi
done
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;and perf resolved the lustre symbols just fine.&lt;/p&gt;

&lt;p&gt;What about adding something morally equivalent to the end of %install in the Lustre and ldiskfs specs?&lt;/p&gt;</comment>
                            <comment id="47495" author="green" created="Tue, 6 Nov 2012 21:24:28 +0000"  >&lt;p&gt;I think it&apos;s a bug in perf then, and it needs to try and fetch symbols from both places and where it is successful in doing so?&lt;br/&gt;
the /usr/lib/debug is probably a redhat-ism anyway (I never heard of it before) and will not work on other distros.&lt;/p&gt;</comment>
                            <comment id="47519" author="brian" created="Wed, 7 Nov 2012 08:05:28 +0000"  >&lt;blockquote&gt;
&lt;p&gt;the /usr/lib/debug is probably a redhat-ism anyway (I never heard of it before) and will not work on other distros&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;It actually exists on Ubuntu also so maybe it&apos;s just a bleeding edge feature rather than a single-distro-ism and other distros will &quot;catch up&quot; eventually.&lt;/p&gt;

&lt;p&gt;It&apos;s a nice feature actually since it allows you to only incur the debug-bloat cost for software you actually need to debug rather than carrying the debug-bloat for everything, &quot;just in case&quot;.&lt;/p&gt;</comment>
                            <comment id="47545" author="jhammond" created="Wed, 7 Nov 2012 17:46:51 +0000"  >&lt;p&gt;&amp;gt; I think it&apos;s a bug in perf then, and it needs to try and fetch symbols from both places and where it is successful in doing so?&lt;/p&gt;

&lt;p&gt;OK, I&apos;ll file a bug upstream: &quot;Hello perf maintainers!  Your utility works with everything except the lustre modules.&quot;&lt;/p&gt;

&lt;p&gt;In the mean time, please see &lt;a href=&quot;http://review.whamcloud.com/4491&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/4491&lt;/a&gt; for a patch.&lt;/p&gt;</comment>
                            <comment id="47683" author="jhammond" created="Mon, 12 Nov 2012 10:01:05 +0000"  >&lt;p&gt;I have updated the patch to use the first, more RHEL-ish, method of marking the modules executable during %install.  This has the added benefit of not being broken on RHEL 5.  &lt;/p&gt;

&lt;p&gt;Note that gdb automagically handles modules with split debuginfo:&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;# gdb /lib/modules/2.6.32-279.11.1.el6.lm.x86_64/updates/kernel/fs/lustre/lustre.ko
GNU gdb (GDB) Red Hat Enterprise Linux (7.2-56.el6)
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later &amp;lt;http://gnu.org/licenses/gpl.html&amp;gt;
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type &quot;show copying&quot;
and &quot;show warranty&quot; for details.
This GDB was configured as &quot;x86_64-redhat-linux-gnu&quot;.
For bug reporting instructions, please see:
&amp;lt;http://www.gnu.org/software/gdb/bugs/&amp;gt;...
Reading symbols from /lib/modules/2.6.32-279.11.1.el6.lm.x86_64/updates/kernel/fs/lustre/lustre.ko...Reading symbols from /usr/lib/debug/lib/modules/2.6.32-279.11.1.el6.lm.x86_64/updates/kernel/fs/lustre/lustre.ko.debug...done.
done.
(gdb) disassemble /m ll_file_open
Dump of assembler code for function ll_file_open:
494  {
   0x000000000001cf50 &amp;lt;+0&amp;gt;:     push   %rbp
   0x000000000001cf51 &amp;lt;+1&amp;gt;:     mov    %rsp,%rbp
   0x000000000001cf54 &amp;lt;+4&amp;gt;:     push   %r15
   0x000000000001cf56 &amp;lt;+6&amp;gt;:     push   %r14
   0x000000000001cf58 &amp;lt;+8&amp;gt;:     push   %r13
   0x000000000001cf5a &amp;lt;+10&amp;gt;:    push   %r12
   0x000000000001cf5c &amp;lt;+12&amp;gt;:    push   %rbx
   0x000000000001cf5d &amp;lt;+13&amp;gt;:    sub    $0xa8,%rsp
   0x000000000001cf64 &amp;lt;+20&amp;gt;:    callq  0x1cf69 &amp;lt;ll_file_open+25&amp;gt;
   0x000000000001cf75 &amp;lt;+37&amp;gt;:    mov    %rdi,-0x80(%rbp)
   0x000000000001cf7f &amp;lt;+47&amp;gt;:    mov    %rsi,%r15

495                           struct ll_inode_info *lli = ll_i2info(inode);
496                                   struct lookup_intent *it, oit = { .it_op = IT_OPEN,
497                                                                             .it_flags = file-&amp;gt;f_flags };
...
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                            <comment id="50129" author="pjones" created="Tue, 8 Jan 2013 10:08:05 +0000"  >&lt;p&gt;Landed for 2.4&lt;/p&gt;</comment>
                    </comments>
                    <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|hzvbtb:</customfieldvalue>

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