0

I developed an application in HP Unix Itanium server (HP-UX 11.3). I tried to hit my application by creating concurrent threads. I can't create multiple threads at the same time. I can only create 1024 threads; some time after that I got a core dump: segmentation fault.

Is there any limitation on the number of threads that can be created in HP-UX?

Jonathan Leffler
  • 730,956
  • 141
  • 904
  • 1,278
Mr.Cool
  • 1,525
  • 10
  • 32
  • 51
  • 1
    This is going to be very difficult to answer unless you add a lot more information to your post. How about some code or more specifics? How do you know that you are in deadlock? – Gray Aug 30 '12 at 15:21
  • I assume that by "i will not put mutex or semaphore for my application" you mean that you did not add mutexes or semaphores to your application. That could be the problem if you're performing thread-unsafe operations and corrupting state as a result. Gray's questions should be answered. – Michael Burr Aug 30 '12 at 16:15
  • Which attributes did you set in the attributes passed to `pthread_create()`? Have you made sure your process can acquire enough memory for that many threads? [pthread_attr_setstacksize()](http://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_attr_setstacksize.html)? Do you religiously check the return value from every function call that could fail to ensure that your functions always succeed? Why do you want so many threads in a single process? – Jonathan Leffler Aug 31 '12 at 05:55
  • I hope this will help little-bit. http://stackoverflow.com/questions/344203/maximum-number-of-threads-per-process-in-linux – Jeyaram Aug 31 '12 at 11:45

0 Answers0