From Bugzilla Helper: User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.0) Gecko/20020526 Description of problem: MySQL, oops-cache use lot of thread. Standart distribution limited to ~256 threads per process. Patch increase limit of processes and decrease minimal stack size(?). Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1.Start one process and create threads in loop. 2.Wait for SIGSEGV Actual Results: If threads level too low, program crashed. With this patch program works great. Additional info: diff -urN glibc-2.2.5/linuxthreads/descr.h glibc-2.2.5.new/linuxthreads/descr.h --- glibc-2.2.5/linuxthreads/descr.h Mon Feb 25 10:55:48 2002 +++ glibc-2.2.5.new/linuxthreads/descr.h Wed Aug 7 14:38:58 2002 @@ -201,7 +201,7 @@ THREAD_SELF implementation is used, this must be a power of two and a multiple of PAGE_SIZE. */ #ifndef STACK_SIZE -#define STACK_SIZE (2 * 1024 * 1024) +#define STACK_SIZE (64 * PAGE_SIZE) #endif /* Get some notion of the current stack. Need not be exactly the top diff -urN glibc-2.2.5/linuxthreads/sysdeps/unix/sysv/linux/bits/local_lim.h glib --- glibc-2.2.5/linuxthreads/sysdeps/unix/sysv/linux/bits/local_lim.h Tue Apr +++ glibc-2.2.5.new/linuxthreads/sysdeps/unix/sysv/linux/bits/local_lim.h @@ -64,7 +64,7 @@ /* The number of threads per process. */ #define _POSIX_THREAD_THREADS_MAX 64 /* This is the value this implementation supports. */ -#define PTHREAD_THREADS_MAX 1024 +#define PTHREAD_THREADS_MAX 8192 /* Maximum amount by which a process can descrease its asynchronous I/O priority level. */
This patch is totally broken. The first part is completely unnecessary, the latter is solved better in rawhide glibc (and of course, with Native POSIX Thread Library this is all history).