Subject: Re: random crashes with pthreads
To: None <sigsegv@rambler.ru>
From: Michael <macallan18@earthlink.net>
List: port-sparc64
Date: 04/01/2005 17:31:38
Hello,

> u10$ uname -a
> NetBSD u10 3.0_BETA NetBSD 3.0_BETA (GENERIC) #1: Tue Mar 29 22:14:52 
> UTC 2005  root@u10:/opt/obj.sparc64/sys/arch/sparc64/compile/GENERIC sparc64
> 
> Greetings, I am observing random crashes with a multithreaded 
> application. I wrote a simple web server that creates a thread for each 
> client connection, it seems to crash randomly when there is a very high 
> load and threads need to be created at a very high rate.
...
> While the sever is processing HTTP requests, it crashes randomly. 
> Sometimes it crashes straight away, sometimes after a series of httperf 
> sessions. I don't think there is anything wrong with my web server, the 
> fact that it was crashing with segfault, bus error, illegal instruction, 
> etc, makes me very suspicious
> 
> Has anyone experienced anything like this on sparc64?
More or less. Lots of applications crash randomly here, mostly with bus errors coming from the bowels of libpthread. Sometimes there are segfaults too, but rarely. For some reason I can't even get a useful stack trace, usually it's something like this:
Program received signal SIGBUS, Bus error.
[Switching to LWP 1]
0x0000000041e0ef80 in pthread__sa_recycle () from /usr/lib/libpthread.so.0
(gdb) bt
#0  0x0000000041e0ef80 in pthread__sa_recycle () from /usr/lib/libpthread.so.0
Error accessing memory address 0x872: Invalid argument.

... looks a bit like it's in the middle of a context switch?

have fun
Michael