On Thu, Jun 10, 2004 at 12:08:26PM -0700, Arun Sharma wrote: > On 6/9/2004 10:16 PM, Ian Wienand wrote: > > >I've tracked it down to doing a wait/waitpid/wait4 (they all end up in > >wait4) in a sigchld signal handler. If I do a minimal test case where > >I catch the sigchld and wait, once the call returns it segfaults as in > >this trace (gdb can't seem to give a good backtrace). > > > > I recall seeing this problem earlier. But I'm unable to reproduce it now. I > tried with 2.4.x and 2.6.6. Will try 2.6.7-rc3 later today. What was your > glibc version ? Hi, I can replicate it with 2.6.6, so I guess we must have different libcs :( The libc is 2.3.2.ds1-13 from Debian unstable. With this in mind, I ran in the chroot with LD_LIBRARY_PATH=/usr/lib/debug and to my surprise things seemed to work. Run it again with LD_LIBRARY_PATH=/usr/lib/debug/lib/tls (or indeed just leave the default path) and it segfaults. A guess : the only major difference with the optimised libraries is they enable __thread which has the effect of putting errno in the TLS area (sysdeps/unix/sysv/linux/i386). TLS uses the %gs register to get at the thread local data. Now for some reason the gs register gets trashed somewhere along the way, say in a signal handler, it's possible that you'd get a segfault? Anyone got any other ideas (cc: debian-glibc@lists.debian.org in case they do). -i
Attachment:
signature.asc
Description: Digital signature