Subject: Re: Advice on debugging pthreads problems
To: Martin Husemann <martin@duskware.de>
From: segv <segv@netctl.net>
List: port-sparc64
Date: 08/22/2005 23:52:25
On Mon, 22 Aug 2005 21:47:19 +0200
Martin Husemann <martin@duskware.de> wrote:

> On Sat, Aug 20, 2005 at 04:02:29PM +0100, segv wrote:
> > sometimes it crashes in pthreads library with SIGBUS, sometimes in Xft library
> > with SIGSEGV
> 
> I think this are two problems, the font rendering code might have alignement
> (and other) bugs; the second effect is a register window handling problem
> that effectively zeros a whole bunch of registers on return from a syscall.
> My guess is the return path to userland eroneously restoring registers from
> the trapframe instead of the window save area in the pcb - but I don't see
> how it could happen.
> 
> Martin

Well I run a few other GTK applications all the time, like gimp, sylpheed,
xfce4, gaim, etc. I think some of them use Xft library and they never crash

Maybe you're right about messed up registers after a syscall. Galeon web
browser just froze and I attached gdb to the process and this is what I got:

Loaded symbols for /usr/pkg/lib/gtk-2.0/2.4.0/loaders/libpixbufloader-ico.so
[Switching to LWP 1]
---Type <return> to continue, or q <return> to quit---
0x000000004700a8b4 in pthread__upcall () from /usr/lib/libpthread.so.0
(gdb) bt
#0  0x000000004700a8b4 in pthread__upcall () from /usr/lib/libpthread.so.0
Error accessing memory address 0x70: Invalid argument.
(gdb) 

Looks like it was doing something in pthreads when something bad happened??