linux-mips-fnet
[Top] [All Lists]

Re: MySQL: 990422 15:57:50 Can't create interrupt-thread (error 11, err

To: linux-mips@fnet.fr, Robert Gash <gashalot@cybermax.net>
Subject: Re: MySQL: 990422 15:57:50 Can't create interrupt-thread (error 11, errno: 0)
From: Ralf Baechle <ralf@uni-koblenz.de>
Date: Tue, 27 Apr 1999 14:38:06 +0200
Cc: mysql@lists.mysql.com
In-reply-to: <14115.4366.62836.211220@monty.pp.sci.fi>; from Michael Widenius on Sun, Apr 25, 1999 at 03:58:02PM +0300
References: <371F808E.4E490086@cybermax.net> <14115.4366.62836.211220@monty.pp.sci.fi>
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);
}

<Prev in Thread] Current Thread [Next in Thread>