- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Problem with PTHREAD_STACK_MIN
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
тАО04-27-2011 09:55 AM
тАО04-27-2011 09:55 AM
Problem with PTHREAD_STACK_MIN
I am running on an HP-UX B.11.31 IA64 with no patches installed (HP's AllianceONE program). While attempting to run all Ruby 1.9.2 p180 tests, it reveals I am suffering from the exact same symptom than the one described at http://stackoverflow.com/questions/717327/how-to-diagnose-trace-sendsig-useracc-failed-problem-in-hp-ux
On the computer I use, the following command shows:
# grep PTHREAD_STACK_MIN /usr/include/limits.h
# define PTHREAD_STACK_MIN 4096
Could you tell me what is your PTHREAD_STACK_MIN value on an up to date patched HP-UX B.11.31 IA64 system ?
Thank you in advance.
Philippe
- Tags:
- AllianceONE
- pthread
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-27-2011 10:09 AM
тАО04-27-2011 10:09 AM
Re: Problem with PTHREAD_STACK_MIN
Why is this important? This value is just too small for real applications. The default is 256 Kb, with 1/2 used for the user stack and the other for the RSE stack.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-27-2011 10:23 AM
тАО04-27-2011 10:23 AM
Re: Problem with PTHREAD_STACK_MIN
This is important because Ruby sets the stack size of a thread to PTHREAD_STACK_MIN. And in the case of one specific Ruby test, the stack is undersized.
The Ruby code is fairly dependant upon the value of PTHREAD_STACK_MIN if PTHREAD_STACK_MIN is defined which is the case on an HP-UX B.11.31 system.
Hence my very accurate question.
Philippe
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-27-2011 08:28 PM
тАО04-27-2011 08:28 PM
Re: Problem with PTHREAD_STACK_MIN
This value is too small on HP-UX, especially if you need a ucontext_t which is already > 4 Kb. You should take the default or experiment with minimum sizes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-27-2011 08:43 PM
тАО04-27-2011 08:43 PM
Re: Problem with PTHREAD_STACK_MIN
PTHREAD_STACK_MIN or
stacksize (excerpt from the man page)...
This defines the size (in bytes) of the user stack for threads created with this attributes object. This value must be greater than or equal to the minimum stack size PTHREAD_STACK_MIN.
Ruby code should check and set thread stack size instead of relying on default value.
BTW, the value of PTHREAD_STACK_MIN is 4096 on latest HP-UX 11i v3 release.
Regards
-Rajesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-28-2011 01:15 AM
тАО04-28-2011 01:15 AM
Re: Problem with PTHREAD_STACK_MIN
I thus modified /usr/include/limits.h to include the lines:
# ifndef PTHREAD_STACK_MIN
# define PTHREAD_STACK_MIN 4096
# endif
like on OpenVMS and defined PTHREAD_STACK_MIN to 512*1024 in the CPPFLAGS before the ./configure.
I now face another problem farther while running the tests with the pthread library. pthread_attr_destroy(&attr) returns EINVAL although all previous pthread_attr_xxxx did return 0. I think I now would need the latest pthread patch.
Not being able to access the patch library due to HP's policy change, could someone tell me whether there are known problems with pthread_attr_destroy which have been corrected since stock HP-UX B.11.31 ?
Philippe
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-28-2011 01:38 AM
тАО04-28-2011 01:38 AM
Re: Problem with PTHREAD_STACK_MIN
For the failing pthread_attr_destroy(&attr) do you have a corresponding pthread_attr_init() call previously. If not, the attr may have invalid value.
Regards
-Rajesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-28-2011 01:52 AM
тАО04-28-2011 01:52 AM
Re: Problem with PTHREAD_STACK_MIN
Concerning my change to limits.h, it is definitely not a good idea from the HP-UX pthread lab to set PTHREAD_STACK_MIN to an irrealistic value. The OpenVMS pthread.h looks to be much better coded regarding this aspect.
Philippe
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-28-2011 11:29 PM
тАО04-28-2011 11:29 PM
Re: Problem with PTHREAD_STACK_MIN
I don't see any patches mentioning it.
>it is definitely not a good idea from the HP-UX pthread lab to set PTHREAD_STACK_MIN to an unrealistic value.
Unrealistic perhaps, if you expect to get signals.
And you could use sigaltstack(2):
Each thread may define an alternate signal handling stack.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-11-2011 10:02 PM
тАО05-11-2011 10:02 PM
Re: Problem with PTHREAD_STACK_MIN
The value of PTHREAD_STACK_MIN has remained same (4096) on PA-RISC/Integrity on all HP-UX releases.
Regards
-Rajesh