Operating System - HP-UX
1753269 Members
4850 Online
108792 Solutions
New Discussion

pthread_create() returns EAGAIN

 
Gerald Hatch
New Member

pthread_create() returns EAGAIN

Hi Folks! I have a situation whereby a process is attempting to start 128 threads on a 9000/800 HPUX 11.23 machine (PA-RISC flavor) with 128 CPUs. After successfully starting about 123 threads (this number varies slightly from run to run), "pthread_create()" returns EAGAIN which, according to the man pages, is due to either: 1) hitting the per-process thread limit, or 2) insufficient resources to start any more threads. Currently the per-process thread limit on this machine is 4,096, so it doesn't seem like that's the issue.

Does anyone have any idea which resource(s) I should look at? Is there some way to programatically dump information about available memory, file handles, etc? My thought here is that as soon as the error is returned, it would be nice to have the process dump out some information on what's currently in-use in the way of resources.

Many thanks!
1 REPLY 1
rick jones
Honored Contributor

Re: pthread_create() returns EAGAIN

Glance's system tables output might be a place to start. If you have tuned something recently, you might make sure that it is either a dynamic tunable, or that you have actually restarted the system with the tune applied.

If you have not already installed glance a trial version can be had from software.hp.com.

There are I think both global and per-process limits on threads, just like processes.
there is no rest for the wicked yet the virtuous have no pillows