Bug 74176 - glibc limitation to count of one process thread
glibc limitation to count of one process thread
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: glibc (Show other bugs)
7.3
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Brian Brock
: FutureFeature
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-09-17 09:20 EDT by Denis Fedorishenko
Modified: 2016-11-24 09:48 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-09-17 09:20:28 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Denis Fedorishenko 2002-09-17 09:20:20 EDT
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.  */
Comment 1 Jakub Jelinek 2002-09-20 05:21:00 EDT
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).

Note You need to log in before you can comment on or make changes to this bug.