On Sun, Apr 25, 1999 at 03:58:02PM +0300, Michael Widenius wrote:
> Robert> I finally got MySQL working on the Cobalt RaQ Cube (w/ binutils,
> glibc,
> Robert> and egcs upgrades) but I can't get it to run, when I run
> Robert> mysql_install_db it dumps lots of error messages out and this is the
> one
> Robert> that keeps MySQL from running properly, what could be causing this?
>
> Robert> 990422 15:57:50 Can't create interrupt-thread (error 11, errno: 0)
> Robert> glibc 2.0.7 (r20 RPM)
> This means that there is probably a bug in pthread_create() or in
> the signal handling in your libraries :(
The clone(2) wrapper in libc was buggy for a long time; people may want
to try this test program. I don't know if Cobalt fixed it in their RPMs
or not.
Ralf
#include <pthread.h>
#include <stdio.h>
void* new_thread(void* arg)
{
int i;
printf("Thread[%s] stack at %x\n",arg, &i);
for (i = 0; i< 4; i++) {
printf("Thread[%s] %d\n", arg, i);
sched_yield();
}
return(NULL);
}
#define NUM_OF_THREAD 100
main(int argc, char **argv)
{
int num = NUM_OF_THREAD;
pthread_t thread[NUM_OF_THREAD];
char *args[NUM_OF_THREAD];
int i;
int last;
void *status;
if (argc > 1)
num = atoi(argv[1]);
if (num>NUM_OF_THREAD)
num = NUM_OF_THREAD;
printf("Original thread stack at %x\n", &i);
for (i = 0 ; i < num; i++) {
args[i] = (char *)malloc(80);
sprintf(args[i], "%04d", i);
if (pthread_create(&thread[i],
NULL,
new_thread, (void *)args[i])) {
printf("Error: creating new thread[%d]\n", i);
break;
}
}
last = i;
for (i = 0 ; i < last; i++) {
pthread_join(thread[i], &status);
printf("thread[%d] return status' address %p\n",i, status);
}
printf("%d threads created\n", last);
exit(0);
}
|