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]

random ld-linux crashes on sparc in current glibc - how to debug?


When trying to build glibc 2.3.4 snapshots (dated 20040603, or a few
from May, on two different machines - with the same result) on
sparc-linux platform (64-bit kernel, 32-bit userland), build fails
randomly on execution of some binary linked with newly built libc -
sometimes on rpcgen, sometimes later on creating iconv or locale data
files.
I tested glibc 2.3.3 snap from 20040101 - still builds fine, so it
doesn't seem to be local problem.
I'm using gcc 3.3.3 and binutils 2.15.90.0.3 (with simple gas fix from
binutils CVS, needed to assemble some files from glibc sources).

Symptoms differ - sometimes it's SIGSEGV or SIGBUS ("Segmentation
fault", "Memory fault", "Bus error"), sometimes assertion failure
like that "assert (ELFW(R_TYPE)(reloc->r_info) == ELF_MACHINE_JMP_SLOT);"
(in elf/dl-runtime.c:76) or symbol lookup error like that: "symbol
lookup error: /home/users/builder2/rpm/BUILD/libc/builddir/sunrpc/rpcgen:
undefined symbol: fopen, version " (yes, with empty version).
The same binary run multiple times give different results - in most
cases runs successfully, but with probability about 2-5% crashes in one
of these ways.

core dump doesn't help much - gdb complains about unrecognized format
and shows some bogus addresses, like this:

warning: "/home/users/builder2/rpm/BUILD/libc/timezone/core": no core file handler recognizes format, using default
Core was generated by `/home/users/builder2/rpm/BUILD/libc/builddir/elf/ld-linux.so.2 --library-path /'.
Program terminated with signal 11, Segmentation fault.
Couldn't read input and local registers from core file
Couldn't read input and local registers from core file
0x000002e4 in ?? ()

LD_DEBUG=all on crash ends on one of such three messages (with different
symbol names, this is only example):

     23892:     binding file /home/users/builder2/rpm/BUILD/libc/builddir/libc.so.6 to /home/users/builder2/rpm/BUILD/libc/builddir/libc.so.6: normal symbol `malloc' [GLIBC_2.0]
     23892:     symbol=memcpy;  lookup in file=/home/users/builder2/rpm/BUILD/libc/builddir/timezone/zic
     23892:     symbol=memcpy;  lookup in file=/home/users/builder2/rpm/BUILD/libc/builddir/libc.so.6

When I tried to run binary run under strace or gdb (executing
path/ld-linux.so.2 --library-path ... etc.), it didn't crash at all.
So how to debug this problem?


-- 
Jakub Bogusz    http://cyber.cs.net.pl/~qboosh/
PLD Team


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