- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: stack growth failure
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
12-11-2007 09:13 AM
12-11-2007 09:13 AM
I received the following error while running a particularly long test script on a C3000 machine running HP-UX 11i V1.
Pid 19278 received a SIGSEGV for stack growth failure.
Possible causes: insufficient memory or swap space,
or stack size exceeded maxssiz.
Test script exited ok.
maxsiz for the machine is 8388608.
The error message gives several possible reasons for the failure. As such is it possible to monitor the following while running the process?
Memory
Swap space
Stack size
Thanks for any help you can give.
Ed
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2007 09:36 AM
12-11-2007 09:36 AM
SolutionI would go ahead and increase to 32MiB. Very seldom does well-written code ever need a larger stack than that. If you still get stack overflows then you probably have very deep recursion and that is likely to be a data-related problem (or simply bad code).
It's not easy to monitor stack usage on a running process although you can run swapinfo while a process is running. It's pointless to worry about running out of memory because HP-UX is a virtual memory system rather than a physical memory system so when your swap space is entirely filled then you have failures.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2007 09:38 AM
12-11-2007 09:38 AM
Re: stack growth failure
You would have to send some system information to have input for the other items.
How much memory is in the system ?
How much swap is configured ?
If the system has only xGB then trying to run a program with a stack of over xGB probably will not work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2007 06:06 PM
12-11-2007 06:06 PM
Re: stack growth failure
The most common one (#4) is a programming error with recursive stack overflow. If you have a core file, you can use gdb to check this out with the "bt" command.
And if you increase maxssiz, it will just take longer to abort.
There are cases where you need such a large stack, some Fortran applications allocate big arrays there.
>Clay: It's not easy to monitor stack usage on a running process
You can use glance or attach with gdb.
Or you could write a program using pstat(2) to look at memory regions for processes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2007 06:15 PM
12-11-2007 06:15 PM
Re: stack growth failure
stack growth failure":
The program tried to access an address in the memory reserved for stack as
defined by the maxssiz or maxssiz_64bit kernel parameters and
the kernel was unable to find sufficient memory to do this or the address was
located in some guard pages surrounding this area. The test_stackgrowth
program shows this by calling a recursive function until all the stack space
has been used and the program hits a guard page.
This error is fatal for a process and no signal handler will be called as a
result even if one for SIGSEGV is installed.
Check if your program is 64bit or 32bit
WK
- Tags:
- guard page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2007 06:57 PM
12-11-2007 06:57 PM
Re: stack growth failure
You are confused. :-) After decades of believing this, you have to read the fine print and there you will discover that you need to use sigaltstack(2).