- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Pid <nnn> killed due to trashed stack.
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2008 04:38 AM
04-30-2008 04:38 AM
I'm havign an executable that works fine in all the other UNIX env (solaris,linux, aix) - but in HP-UX I get this error:
"Pid
Pid
The exe was compiled and linked as 32bit app.
=========
sys info:
=========
HP-UX hpux B.11.23 U 9000/800 3697136004 unlimited-user license
I've installed PHKL_36745 patch with all its dependencies, but it didn't help.
Anyone has some ideas?
Solved! Go to Solution.
- Tags:
- stack overflow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2008 04:47 AM
04-30-2008 04:47 AM
Re: Pid <nnn> killed due to trashed stack.
This is really a continuation of your earlier thread:
http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1226923
As I said before:
It is possible that you experienced a stack overflow due to excessive recursive calls or due to a buffer overrun.
Perhaps a 'tusc' trace would help you.
Please also give consideration to the guidelines here:
http://forums11.itrc.hp.com/service/forums/helptips.do?#28
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2008 05:11 AM
04-30-2008 05:11 AM
Re: Pid <nnn> killed due to trashed stack.
I closed the mentioned thread.
Regarding your answer:
can you give me some more details about this 'tusc'? I don't have such utility on my system.
Is it something like 'pstack' and if not - do you know if there is any took that is similar to pstack on hp-ux?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2008 05:21 AM
04-30-2008 05:21 AM
Re: Pid <nnn> killed due to trashed stack.
You can still open your closed thread and assign points for the help you received there.
You can obtain 'tusc' from the HP-UX Porting Center:
http://hpux.cs.utah.edu/hppd/hpux/Sysadmin/tusc-7.9/
As for the Solaris 'pstack', the HP-UX counterpart would be 'gdb' or the HP form 'wdb':
http://h21007.www2.hp.com/portal/site/dspp/menuitem.863c3e4cbcdc3f3515b49c108973a801/?ciid=29080f1bace021100f1bace02110275d6e10RCRD
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2008 05:39 AM
04-30-2008 05:39 AM
Re: Pid <nnn> killed due to trashed stack.
You might try increasing your 'maxssiz' under the assumption that you are doing recursive procedure calls (are you?) or have a program that allocates a large amount of data on the stack.
Examine your current settings with 'kctune' and confine your change to the 32-bit 'maxssiz' since this is for a 32-bit application. See the manpages for more information:
http://docs.hp.com/en/B3921-60631/maxssiz.5.html
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2008 07:01 AM
04-30-2008 07:01 AM
Re: Pid <nnn> killed due to trashed stack.
and it didn't help - as you can guess.
notes:
1. My application is multithreaded
2. If this code didn't work fine on the other UNIX env I would continue digging my code searching for some bug.
tx.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2008 10:26 PM
04-30-2008 10:26 PM
Re: Pid <nnn> killed due to trashed stack.
You should immediately reduce maxssiz back to a reasonable value, 80 Mb. Making it bigger will reduce from maxdsiz, if set to 1 Gb or larger.
>1. My application is multithreaded
Then maxssiz won't help. You need to increase the thread stacksize with pthread_attr_setstacksize(3) or pthread_default_stacksize_np(3T).
Or export PTHREAD_DEFAULT_STACK_SIZE if you have a recent libpthread patch.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2008 11:34 PM
04-30-2008 11:34 PM
Re: Pid <nnn> killed due to trashed stack.
can you specify how to do it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2008 11:59 PM
04-30-2008 11:59 PM
Re: Pid <nnn> killed due to trashed stack.
Which? They have man pages.
You need to increase the thread stacksize with 1) pthread_attr_setstacksize(3)
2) pthread_default_stacksize_np(3T).
3) Or export PTHREAD_DEFAULT_STACK_SIZE if you have a recent libpthread patch.
Are you using pthread_attr_setstacksize now?
If you are, make it bigger, else use 2) or 3).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-01-2008 12:53 AM
05-01-2008 12:53 AM
Re: Pid <nnn> killed due to trashed stack.
I want to use the 3 - what value you suggest me to set for this env var?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-01-2008 01:07 AM
05-01-2008 01:07 AM
Re: Pid <nnn> killed due to trashed stack.
the 3rd option solved the probelm!!!!
I just need to know know if there is anyway to chnage the PTHREAD_DEFAULT_STACK_SIZE permanently via the sam utility?
1. I need to find a nice way to recomment our customers.
2. Do you know what should be the minimal value for this env var so that my application work fine?
thank alot!!!!!!
shlom
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-01-2008 02:05 AM
05-01-2008 02:05 AM
Re: Pid <nnn> killed due to trashed stack.
No, you need to export it. Possibly in your .profile or /etc/profile.
>1. I need to find a nice way to recommend our customers.
You can change your application to do 1).
>2. Do you know what should be the minimal value for this env var so that my application work fine?
No, you have to know your application. (How many threads?) The default for PA is 64 Kb For IPF it is 256 Kb but that needs to be divided by 2.
What value did you use to get it to work?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-01-2008 02:33 AM
05-01-2008 02:33 AM
Re: Pid <nnn> killed due to trashed stack.
well done for your answer, again.
1. my application uses at least 9 threads, but it can be configured to work with a lot more... more than INT_MAX (2147483647) - so, any recommended value?
2. what is the standard way for working on HP-UX? if I have a script that start my app - do you think I better export PTHREAD_DEFAULT_STACK_SIZE in it (before start the app) or do some changes in my application (is it ok to do it on the main?) for HP-UX?
tx again.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-01-2008 03:01 AM
05-01-2008 03:01 AM
Re: Pid <nnn> killed due to trashed stack.
I probabaly did something wrong.
currently I can make it work again:
sometimes for PTHREAD_DEFAULT_STACK_SIZE, such as 4096 the app crashes when it tries to start with BUS ERROR and sometimes it gives me the original problem...
what's going on?! after I saw the light?!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-01-2008 03:11 AM
05-01-2008 03:11 AM
Re: Pid <nnn> killed due to trashed stack.
pls ignore my last msg.
When I set PTHREAD_DEFAULT_STACK_SIZE to max 10240000 for example it worked fine.
I read in the man that the max allowed for this one is 10MB, but what is the size unit it gets?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-01-2008 12:55 PM
05-01-2008 12:55 PM
SolutionIf they are using the all of a CPU, having more than the number of CPUs is not helpful.
>2. what is the standard way for working on HP-UX? if I have a script that start my app - do you think I better export PTHREAD_DEFAULT_STACK_SIZE in it or do some changes in my application (is it ok to do it on the main?) for HP-UX?
The right way is to call pthread_attr_setstacksize.
But you could either export PTHREAD_DEFAULT_STACK_SIZE or call pthread_default_stacksize_np in your main.
>sometimes for PTHREAD_DEFAULT_STACK_SIZE, such as 4096
>but what is the size unit it
This is in bytes:
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1110034
>When I set PTHREAD_DEFAULT_STACK_SIZE to max 10240000 for example it worked fine.
Why would you want it that high? Try with 256 KB, 262144.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-04-2008 12:17 AM
05-04-2008 12:17 AM
Re: Pid <nnn> killed due to trashed stack.
tx a lot for your helpul answers!
I will try to use also the function in my main and see how it goes.
I leave this thread open till I done and let everyone knows the results.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-04-2008 05:30 AM
05-04-2008 05:30 AM
Re: Pid <nnn> killed due to trashed stack.
I have 2 options to solve this problem:
1. use the env variable with 128K
2. use the pthread_default_stacksize_np in the code, before any thread begin (except for the main of course)
shlom