My first guess would be hardware also, except in this case I've seen
similiar things on three different dual processor G4 systems running 2.2,
and they work fine with 2.4.
Does Oracle for Linux us pthreads or the 'clone()' system call?
Can you try running the included pthreads program on an 2.2.19 SMP system
(but make it's idle, since if this is a genric 2.2 SMP bug it will
probably crash the system)
Compile with the following command:
gcc -o pt pthread-test.c -lpthread
Run it repeatedly:
I=0; while [ $? -eq 0 ] ; let I=I+1; do ./pt ; done ; echo $I
on 2.2.19 on a mac dual G4, the pthreads program will sometimes get
segfaults and illegal instructions, and if I run it long enough, I will
eventually get the following in dmesg:
swap_free: Trying to free nonexistent swap-page
swap_free: offset exceeds max
swap_free: Trying to free nonexistent swap-page
swap_free: Trying to free nonexistent swap-page
swap_free: offset exceeds max
swap_free: Trying to free nonexistent swap-page
swap_free: Trying to free nonexistent swap-page
swap_free: offset exceeds max
swap_free: offset exceeds max
swap_free: offset exceeds max
swap_free: Trying to free nonexistent swap-page
swap_free: Trying to free nonexistent swap-page
swap_free: Trying to free nonexistent swap-page
swap_free: Trying to free nonexistent swap-page
swap_free: offset exceeds max
swap_free: offset exceeds max
swap_free: offset exceeds max
If I keep running it, I will eventually wind up with a kernel panic on an
illegal instruction. Something is corrupting memory, and in my case, the
kernel panics are caused by a '0x00000008' being written over a random
location in the kernel code.
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <pthread.h>
#define NTH 8
void
thread(void *arg)
{
printf("THREAD: pid %d\n", getpid());
return;
}
int
main(int argc, char **argv)
{
int i;
pthread_t t[NTH];
for (i=0; i<NTH; i++)
pthread_create(t+i, NULL, thread, NULL);
for (i=0; i<NTH; i++)
pthread_join(t[i], NULL);
return 0;
}
-- Troy Benjegerdes | master of mispeeling | 'da hozer' | hozer@drgw.net -----"If this message isn't misspelled, I didn't write it" -- Me ----- "Why do musicians compose symphonies and poets write poems? They do it because life wouldn't have any meaning for them if they didn't. That's why I draw cartoons. It's my life." -- Charles Shulz - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/