1748035 Members
4869 Online
108757 Solutions
New Discussion юеВ

Re: Pthread_create error

 

Pthread_create error

Our application is generating Memory fault (coredump) and generating
the following error messages :

1 . pthread_create : Not enough space"
2. "Pid 15890 received a SIGSEGV for stack growth failure.
Possible causes: insufficient memory or swap space, or
stack size exceeded maxssiz.
Memory fault(coredump) "

We are really stuck at this point . Please assist us.

Thanks & Regards,

Madhav
9 REPLIES 9
harry d brown jr
Honored Contributor

Re: Pthread_create error

Madhav,

Please post your OS level, and bit size, plus a listing of your kernel parameter settings.

live free or die
harry
Live Free or Die
Martin Burnett_2
Trusted Contributor

Re: Pthread_create error

Hello,

To get some help you are going to need to post some additional information:

1. What OS version (HP-UX 10.20,11.0,11i)?
2. What bitness 32 or 64?
3. Did the application work before and just started doing this or is this a new installation of this application that has never worked?
4. Is your libc cumulative patch up to date for the OS version?
5. Are you having any other problems with the system the application is running on?
6. Did you make any recent changes to the system (patches, upgrades, etc)?

Re: Pthread_create error

 

Re: Pthread_create error

Martin Burnett,

1. HP-UX 10.20
2. 32 bit
3. This is a new program we are working on.
4. latest is Nov 1999
5. To my knowledge no other problems with the running applications
6. No
Steven Gillard_2
Honored Contributor

Re: Pthread_create error

This sounds a lot like a memory / swap problem.

- Can you post 'swapinfo -tam' output?

- What size is the core file? Your maxdsiz is only 64Meg so if the application is hitting this limit you will get problems.

Regards,
Steve

Re: Pthread_create error

Steve,

->swapinfo -tam
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 128 0 128 0% 0 - 1 /dev/vg_root/lv_swapA
dev 952 0 952 0% 0 - 1 /dev/vg_root/lv_swapB
reserve - 239 -239
memory 764 277 487 36%
total 1844 516 1328 28% - 0 -
Core file size is app. 560KB.

Thanks&Regards
Prasad
Steven Gillard_2
Honored Contributor

Re: Pthread_create error

Hmmm looks ok... I'm not sure what the other causes of an ENOSPACE return from pthread_create would be - perhaps you're hitting the max_thread_proc kernel parameter? Are you able to create any threads in your application before the error? If so how many?

Try obtaining a tusc trace to get more information on the system calls being made, it may shed more light on the situation.

Regards,
Steve
Don Morris_1
Honored Contributor

Re: Pthread_create error

Increase maxssiz (that's what error #2 is telling you). If your output is right, you've got it set to 2048 pages (the default 8Mb) -- though the tunable itself is supposed to be in bytes... maybe 10.20 was different. You've got tons of swap - so I'm really sure this is your problem.

At any rate, are you doing a lot of function calls in this program or creating stack allocated memory in subroutines (i.e. long x[2048000];) - either one eats stack memory.

Try 32Mb for a first pass (8192 pages) - that should be enough, and you don't want to raise it too high unless you're running everything q3/q4 private - stack is taken out of q2, so you're reserving space that would have been available for heap when you raise the tunable.

Don

Re: Pthread_create error

Hello all,
Thanks for your assistance till this time.
I am able to narrow down the problem .We are using VisiBroker CORBA4.1 and SSL 3.0 together.
This problem we are seeing when we use Naming Serivce of Borland's Visibroker CORBA product. If we do not have a valid Naming Service object reference in otherwords if Naming service is not available , then our Client application is coredumping with the above error. We hope to catch an exception in this scenario but it is coredumping which is not good. I still do not know why this pthred_create error coming . When I get a valid NamingService Object reference ,surprisingly I am not seeing this error. So I am thinking that some how CORBA's NamingService is causing this problem when naming service is not avialble. I will be informing Visibroker so that they may further investigate the cause of the problems since thier Naming service is causing this error.


Thanks
Prasad Arikatla & Madhav