Fwd: [OpenAFS] Debug symbols for redhat rpm fileserver
Matthew Cocker
cockerm@gmail.com
Thu, 2 Aug 2007 07:23:19 +1200
------=_Part_62771_32945448.1185996199073
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
I had installed those but the package. So I guess the question is now how do
I get a backtrace for the fileserver on redhat. I assume I have to somehow
load the symbols into GDB then the core. I did not find any fileserver debug
files in the rpm so I altered the spec file to include the --enable-debug
flag int he configure for afs and then created the rpms again. The debuginfo
package now has a /usr/lib/debug/usr/afs/bin/fileserver.debug file. I
updated running binaries (may not be required), dumped a core and loaded
this debug into gdb and read in the core. Does this look like what it
should?
(gdb) file /usr/lib/debug/usr/afs/bin/fileserver.debug
Reading symbols from /usr/lib/debug/usr/afs/bin/fileserver.debug...done.
Using host libthread_db library "/lib/tls/libthread_db.so.1".
(gdb) fileserver 18601
Undefined command: "fileserver". Try "help".
(gdb) shell core core.18601
bash: line 1: core: command not found
(gdb) core core.18601
warning: core file may not match specified executable file.
Core was generated by `/usr/afs/bin/fileserver'.
Reading symbols from /lib/tls/libpthread.so.0...done.
Loaded symbols for /lib/tls/libpthread.so.0
Reading symbols from /lib/libresolv.so.2...done.
Loaded symbols for /lib/libresolv.so.2
Reading symbols from /lib/tls/libc.so.6...done.
Loaded symbols for /lib/tls/libc.so.6
Reading symbols from /lib/libnss_files.so.2...done.
Loaded symbols for /lib/libnss_files.so.2
Reading symbols from /lib/libnss_dns.so.2...done.
Loaded symbols for /lib/libnss_dns.so.2
#0 0x001f8c84 in sigwait () from /lib/tls/libpthread.so.0
(gdb) bt
#0 0x001f8c84 in sigwait () from /lib/tls/libpthread.so.0
#1 0x08073a2e in softsig_thread (arg=0x0) at ../util/softsig.c:93
#2 0x001f2dd8 in start_thread () from /lib/tls/libpthread.so.0
#3 0x004e8d1a in clone () from /lib/tls/libc.so.6
(gdb)
Cheers
Matt
On 8/1/07, Derek Atkins <warlord@mit.edu> wrote:
>
> Install the debuginfo package.
>
> -derek
>
> "Matthew Cocker" <cockerm@gmail.com> writes:
>
> > Hi
> >
> > We are having problems with our afs cell at the moment (14 fileserver
> locked
> > up last night). To get the the backtraces I need to not strip the debug
> > symbols. How can I recompile the rpm get a fileserver binary I can get
> back
> > traces with.
> >
> > Cheers
> >
> > Matt
> >
>
> --
> Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
> Member, MIT Student Information Processing Board (SIPB)
> URL: http://web.mit.edu/warlord/ PP-ASEL-IA N1NWH
> warlord@MIT.EDU PGP key available
>
------=_Part_62771_32945448.1185996199073
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
<span class="gmail_quote"></span>I had installed those but the package. So I guess the question is now how do I get a backtrace for the fileserver on redhat. I assume I have to somehow load the symbols into GDB then the core. I did not find any fileserver debug files in the rpm so I altered the spec file to include the --enable-debug flag int he configure for afs and then created the rpms again. The debuginfo package now has a /usr/lib/debug/usr/afs/bin/fileserver.debug file. I updated running binaries (may not be required), dumped a core and loaded this debug into gdb and read in the core. Does this look like what it should?
<br><br>(gdb) file /usr/lib/debug/usr/afs/bin/fileserver.debug<br>Reading symbols from /usr/lib/debug/usr/afs/bin/fileserver.debug...done.<br>Using host libthread_db library "/lib/tls/libthread_db.so.1".<br>(gdb) fileserver 18601
<br>Undefined command: "fileserver". Try "help".<br>(gdb) shell core core.18601 <br>bash: line 1: core: command not found<br>(gdb) core core.18601 <br>warning: core file may not match specified executable file.
<br>Core was generated by `/usr/afs/bin/fileserver'.<br>Reading symbols from /lib/tls/libpthread.so.0...done.<br>Loaded symbols for /lib/tls/libpthread.so.0<br>Reading symbols from /lib/libresolv.so.2...done.<br>Loaded symbols for /lib/libresolv.so.2
<br>Reading symbols from /lib/tls/libc.so.6...done.<br>Loaded symbols for /lib/tls/libc.so.6<br>Reading symbols from /lib/libnss_files.so.2...done.<br>Loaded symbols for /lib/libnss_files.so.2<br>Reading symbols from /lib/libnss_dns.so.2...done.
<br>Loaded symbols for /lib/libnss_dns.so.2<br>#0 0x001f8c84 in sigwait () from /lib/tls/libpthread.so.0<br>(gdb) bt<br>#0 0x001f8c84 in sigwait () from /lib/tls/libpthread.so.0<br>#1 0x08073a2e in softsig_thread (arg=0x0) at ../util/softsig.c:93
<br>#2 0x001f2dd8 in start_thread () from /lib/tls/libpthread.so.0<br>#3 0x004e8d1a in clone () from /lib/tls/libc.so.6<br>(gdb) <br><br><br><br>Cheers<br><br>Matt<div><span class="e" id="q_1141de8362578527_1"><br><br>
<div><span class="gmail_quote">
On 8/1/07, <b class="gmail_sendername">Derek Atkins</b> <<a href="mailto:warlord@mit.edu" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">warlord@mit.edu</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Install the debuginfo package.<br><br>-derek<br><br>"Matthew Cocker" <<a href="mailto:cockerm@gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">cockerm@gmail.com</a>> writes:
<br><br>> Hi<br>><br>> We are having problems with our afs cell at the moment (14 fileserver locked
<br>> up last night). To get the the backtraces I need to not strip the debug<br>> symbols. How can I recompile the rpm get a fileserver binary I can get back<br>> traces with.<br>><br>> Cheers<br>><br>
> Matt
<br>><br><br>--<br> Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory<br> Member, MIT Student Information Processing Board (SIPB)<br> URL: <a href="http://web.mit.edu/warlord/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://web.mit.edu/warlord/
</a> PP-ASEL-IA N1NWH<br> <a href="mailto:warlord@MIT.EDU" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">warlord@MIT.EDU</a> PGP key available<br></blockquote>
</div><br>
</span></div>
------=_Part_62771_32945448.1185996199073--