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
Discussions
Discussions
Forums
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
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
тАО08-20-2010 09:44 AM
тАО08-20-2010 09:44 AM
=============
Pid 29493 received a SIGSEGV for stack growth failure.
Possible causes: insufficient memory or swap space,
or stack size exceeded maxssize
or stack size limit is set too small.
is this related to pthread_attr_setstacksize? I am passing NULL as NULL stack address so I think its using PTHREAD_STACK_MIN.
what is the value of PTHREAD_STACK_MIN?
In limits.h it shows it as 4096 and in unistd.h "define _SC_THREAD_STACK_MIN 432"
Can you please suggest what needs to be increased?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-20-2010 12:45 PM
тАО08-20-2010 12:45 PM
Re: Pthreads
> increased?
Attention to detail?
> [...] HP-UX B.11.31 U ia64 [...]
You've posted your HP-UX question in a Linux
forum.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-20-2010 05:16 PM
тАО08-20-2010 05:16 PM
SolutionI'm not sure why increasing the number should do this.
It would be helpful to debug it and get a stack trace.
>is this related to pthread_attr_setstacksize?
It might be if the stack overflow is on a thread stack.
>I am passing NULL as NULL stack address so I think it's using PTHREAD_STACK_MIN.
Why are you calling pthread_attr_setstacksize(3) if you aren't providing a value? No need to call the attribute functions if you take the default.
>what is the value of PTHREAD_STACK_MIN? In limits.h it shows it as 4096
I think the default thread stack size on Integrity is 256 Kb, half for the user stack.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-21-2010 09:42 AM
тАО08-21-2010 09:42 AM
Re: Pthreads
I tried to debug the stack trace using gdb. every time its crashing at different place in different thread and due to a structure memory getting corrupted. sometimes at the time of freeing the structure memory and sometimes when trying to use some members of the structure. The functionality of the thread works fine when the threads count is 8, with out any crash.
I will try to run the application by increasing the thread stack size to check if its crashing due to thread stack.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-21-2010 11:10 PM
тАО08-21-2010 11:10 PM
Re: Pthreads
If it is a thread stack overflow, you can determine this easily and it doesn't matter if in different places.
>sometimes at the time of freeing the structure memory and sometimes when trying to use some members of the structure.
If it is on a free, you have likely corrupted the heap. What does your stack trace look like?
>I will try to run the application by increasing the thread stack size to check if its crashing due to thread stack.
Analyzing the registers $sp and $bsp on the first and last frames will tell you if you have an overflow.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-24-2010 03:06 AM
тАО08-24-2010 03:06 AM
Re: Pthreads
The following is the stack trace of the core.
(gdb) where
#0 0x60000000c0126320:0 in pthread_default_rsestacksize_np+0x40 ()
from /usr/lib/hpux32/libpthread.so.1
can you please tell me when is the call to pthread_default_rsestacksize_np() is made?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-24-2010 03:16 AM
тАО08-24-2010 03:16 AM
Re: Pthreads
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-24-2010 12:26 PM
тАО08-24-2010 12:26 PM
Re: Pthreads
(gdb) where
#0 0x60000000c0126320:0 pthread_default_rsestacksize_np+0x40 hpux32/libpthread.so.1
It would help if you provided the whole stack trace.
>can you please tell me when is the call to pthread_default_rsestacksize_np() is made?
Probably in pthread_attr_setstacksize or in pthread_attr_init. That's why the whole stacktrace is needed.
>can you please tell me in what cases this pthread_default_rsestacksize_np() will give core dump?
Only if you give it a bad mutex address?
What version of libpthread do you have, which patch?
>is this related to pthread_attr_setstacksize? I am passing NULL as NULL stack address so I think its using PTHREAD_STACK_MIN.
You aren't allowed to pass in NULL to pthread_attr_setstacksize(3). Are you checking for errors after the call?
And 4096 is probably too small for a stack.
_SC_THREAD_STACK_MIN 432, is just a key to get the current value:
$ getconf _SC_THREAD_STACK_MIN
4096
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-24-2010 11:42 PM
тАО08-24-2010 11:42 PM
Re: Pthreads
Actually there is no call pthread_attr_setstacksize() to set the stack size. NULL is being passed as attribute to pthread_create.
May be this is a stupid question but how is the bad mutex address is related to pthread_default_rsestacksize_np()?
What version of libpthread do you have, which patch?
I think its R11.31_BL2007_1213_5, I got it, by doing strings on libpthread.so.
if this is not correct way to know the patch, Can you please tell me how to check libpthread.so patch?
I will get the complete stack.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-25-2010 12:20 AM
тАО08-25-2010 12:20 AM
Re: Pthreads
Ok, it seems that pthread_create may be calling all of those pthread_attr_* functions to get the defaults.
>how is the bad mutex address is related to pthread_default_rsestacksize_np()?
Oops I confused mutex attributes with thread attributes.
>I think it's R11.31_BL2007_1213_5, I got it, by doing strings on libpthread.so.
Instead of strings, use what(1) but that's not that helpful.
>Can you please tell me how to check libpthread.so patch?
I was expecting a patch ID with what. But it appears it isn't there. Try:
swlist | grep -i pthread