I have a multi-thread problem illustrated by the following snippet.
My app is a server that listens on a socket, accepts connections and
fires off a thread to service the connection. The threads all terminate
ok but pthread_create() fails with errno = EAGAIN after several hundred
connections have been serviced.
It would appear to be a per process limit as the following code can be
run concurrently and both processes stop at t = 382.
/proc/sys/kernel/threads-max is 52467. (Per process thread limit is 26233).
Mandriva 2010.2
libpthread 2.11.1
libc 2.11.1
Would appreciate anyone running the following on their Linux.