This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

debugging ld.so


Hi,
   I have a Hitach SH4 (SH7750) based board running Linux kernel 2.6.7 on
which I see intermittent segfaults in my multithreaded application.  The
instruction pointer points to code in ld.so
   My toolchain consists of gcc 3.3.3, glibc 2.3.2, linux kernel headers
from 2.6.7 and binutils 2.15.  The tool-chain was built using Dan Kegel's
crosstool version 0.28-rc28.
   After digging a bit more, I was able to narrow it down to the following
strcmp() call in do_lookup() in glibc/elf/do-lookup.h.

	  if (sym != ref && strcmp (strtab + sym->st_name, undef_name))
	    /* Not the symbol we are looking for.  */
	    continue;

   I ran my application after setting LD_DEBUG=symbols and this time it
crashed in strlen() called from _dl_debug_vdprintf() leading me to believe
that do_lookup() is passed NULL for undef_name.  Before it crashed it gave
me the following :

	  .......
        117:	symbol=errno;  lookup in file=/lib/libpthread.so.0 
        117:	symbol=errno;  lookup in file=/usr/lib/liberrhand.so 
        117:	symbol=errno;  lookup in file=/lib/libstdc++.so.5 
        117:	symbol=errno;  lookup in file=/lib/libm.so.6 
        117:	symbol=errno;  lookup in file=/lib/libgcc_s.so.1 
        117:	symbol=errno;  lookup in file=/lib/libc.so.6 
        117:	symbol=__malloc_initialize_hook;  lookup in
file=/bin/HostProxy 
        117:	symbol=__malloc_initialize_hook;  lookup in
file=/usr/lib/libixllm.so 
        117:	symbol=__malloc_initialize_hook;  lookup in
file=/usr/lib/libehal-interfacemgr.so 
        117:	symbol=__malloc_initialize_hook;  lookup in
file=/usr/lib/libixml.so 
        117:	symbol=__malloc_initialize_hook;  lookup in
file=/lib/libpthread.so.0 
        117:	symbol=__malloc_initialize_hook;  lookup in
file=/usr/lib/liberrhand.so 
        117:	symbol=__malloc_initialize_hook;  lookup in
file=/lib/libstdc++.so.5 
        117:	symbol=__malloc_initialize_hook;  lookup in
file=/lib/libm.so.6 
        117:	symbol=__malloc_initialize_hook;  lookup in
file=/lib/libgcc_s.so.1 
        117:	symbol=__malloc_initialize_hook;  lookup in
file=/lib/libc.so.6 
        117:	symbol=_dl_starting_up;  lookup in file=/bin/HostProxy 
        117:	symbol=_dl_starting_up;  lookup in file=/usr/lib/libixllm.so

        117:	symbol=_dl_starting_up;  lookup in
file=/usr/lib/libehal-interfacemgr.so 
        117:	symbol=_dl_starting_up;  lookup in file=/usr/lib/libixml.so


  I'm wondering if anybody can provide me with some hints as to how to debug
this up the call stack?

  Thanks,
	Ankur

ps. apologies if this is the incorrect list for this query.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]