<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Problem with PTHREAD_STACK_MIN in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-pthread-stack-min/m-p/4781981#M641122</link>
    <description>Thank you everyone. The problem is that the Ruby 1.9.2 source does code pthread_attr_setstacksize(PTHREAD_STACK_MIN)  if PTHREAD_STACK_MIN is defined which is insufficient on HP-UX IA64 for the given thread.&lt;BR /&gt;&lt;BR /&gt;I thus modified /usr/include/limits.h to include the lines:&lt;BR /&gt;# ifndef PTHREAD_STACK_MIN&lt;BR /&gt;#   define PTHREAD_STACK_MIN 4096&lt;BR /&gt;# endif&lt;BR /&gt;like on OpenVMS and defined PTHREAD_STACK_MIN to 512*1024 in the CPPFLAGS before the ./configure.&lt;BR /&gt;&lt;BR /&gt;I now face another problem farther while running the tests with the pthread library. pthread_attr_destroy(&amp;amp;attr) returns EINVAL although all previous pthread_attr_xxxx did return 0. I think I now would need the latest pthread patch.&lt;BR /&gt;&lt;BR /&gt;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 ?&lt;BR /&gt;&lt;BR /&gt;Philippe&lt;BR /&gt;</description>
    <pubDate>Thu, 28 Apr 2011 08:15:16 GMT</pubDate>
    <dc:creator>Ph Vouters</dc:creator>
    <dc:date>2011-04-28T08:15:16Z</dc:date>
    <item>
      <title>Problem with PTHREAD_STACK_MIN</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-pthread-stack-min/m-p/4781976#M641117</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;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 &lt;A href="http://stackoverflow.com/questions/717327/how-to-diagnose-trace-sendsig-useracc-failed-problem-in-hp-ux" target="_blank"&gt;http://stackoverflow.com/questions/717327/how-to-diagnose-trace-sendsig-useracc-failed-problem-in-hp-ux&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;On the computer I use, the following command shows:&lt;BR /&gt;# grep PTHREAD_STACK_MIN /usr/include/limits.h &lt;BR /&gt;#  define PTHREAD_STACK_MIN             4096&lt;BR /&gt;&lt;BR /&gt;Could you tell me what is your PTHREAD_STACK_MIN value on an up to date patched HP-UX B.11.31 IA64 system ?&lt;BR /&gt;&lt;BR /&gt;Thank you in advance.&lt;BR /&gt;Philippe</description>
      <pubDate>Wed, 27 Apr 2011 16:55:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-pthread-stack-min/m-p/4781976#M641117</guid>
      <dc:creator>Ph Vouters</dc:creator>
      <dc:date>2011-04-27T16:55:00Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with PTHREAD_STACK_MIN</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-pthread-stack-min/m-p/4781977#M641118</link>
      <description>&amp;gt;Could you tell me what is your PTHREAD_STACK_MIN value on an up to date&lt;BR /&gt;&lt;BR /&gt;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.</description>
      <pubDate>Wed, 27 Apr 2011 17:09:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-pthread-stack-min/m-p/4781977#M641118</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2011-04-27T17:09:47Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with PTHREAD_STACK_MIN</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-pthread-stack-min/m-p/4781978#M641119</link>
      <description>Denis,&lt;BR /&gt;&lt;BR /&gt;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.&lt;BR /&gt;&lt;BR /&gt;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.&lt;BR /&gt;&lt;BR /&gt;Hence my very accurate question.&lt;BR /&gt;&lt;BR /&gt;Philippe</description>
      <pubDate>Wed, 27 Apr 2011 17:23:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-pthread-stack-min/m-p/4781978#M641119</guid>
      <dc:creator>Ph Vouters</dc:creator>
      <dc:date>2011-04-27T17:23:40Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with PTHREAD_STACK_MIN</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-pthread-stack-min/m-p/4781979#M641120</link>
      <description>&amp;gt;Ruby code is fairly dependent upon the value of PTHREAD_STACK_MIN&lt;BR /&gt;&lt;BR /&gt;This value is too small on HP-UX, especially if you need a ucontext_t which is already &amp;gt; 4 Kb.  You should take the default or experiment with minimum sizes.</description>
      <pubDate>Thu, 28 Apr 2011 03:28:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-pthread-stack-min/m-p/4781979#M641120</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2011-04-28T03:28:47Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with PTHREAD_STACK_MIN</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-pthread-stack-min/m-p/4781980#M641121</link>
      <description>Have you considered using pthread_attr_setstacksize() and pthread_attr_setstacksize() to get the current value of stack size and set to higher value if needed. For the set function, valid values of stacksize attribute are,&lt;BR /&gt;&lt;BR /&gt;PTHREAD_STACK_MIN or&lt;BR /&gt;stacksize (excerpt from the man page)...&lt;BR /&gt;   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.&lt;BR /&gt;&lt;BR /&gt;Ruby code should check and set thread stack size instead of relying on default value.&lt;BR /&gt;&lt;BR /&gt;BTW, the value of PTHREAD_STACK_MIN is 4096 on latest HP-UX 11i v3 release.&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;-Rajesh</description>
      <pubDate>Thu, 28 Apr 2011 03:43:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-pthread-stack-min/m-p/4781980#M641121</guid>
      <dc:creator>Rajesh K Chaurasia</dc:creator>
      <dc:date>2011-04-28T03:43:55Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with PTHREAD_STACK_MIN</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-pthread-stack-min/m-p/4781981#M641122</link>
      <description>Thank you everyone. The problem is that the Ruby 1.9.2 source does code pthread_attr_setstacksize(PTHREAD_STACK_MIN)  if PTHREAD_STACK_MIN is defined which is insufficient on HP-UX IA64 for the given thread.&lt;BR /&gt;&lt;BR /&gt;I thus modified /usr/include/limits.h to include the lines:&lt;BR /&gt;# ifndef PTHREAD_STACK_MIN&lt;BR /&gt;#   define PTHREAD_STACK_MIN 4096&lt;BR /&gt;# endif&lt;BR /&gt;like on OpenVMS and defined PTHREAD_STACK_MIN to 512*1024 in the CPPFLAGS before the ./configure.&lt;BR /&gt;&lt;BR /&gt;I now face another problem farther while running the tests with the pthread library. pthread_attr_destroy(&amp;amp;attr) returns EINVAL although all previous pthread_attr_xxxx did return 0. I think I now would need the latest pthread patch.&lt;BR /&gt;&lt;BR /&gt;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 ?&lt;BR /&gt;&lt;BR /&gt;Philippe&lt;BR /&gt;</description>
      <pubDate>Thu, 28 Apr 2011 08:15:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-pthread-stack-min/m-p/4781981#M641122</guid>
      <dc:creator>Ph Vouters</dc:creator>
      <dc:date>2011-04-28T08:15:16Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with PTHREAD_STACK_MIN</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-pthread-stack-min/m-p/4781982#M641123</link>
      <description>It is not a good practice to re-define system header file constants. The modified code would work but other pieces of code may be confused. You can pass new stack size to pthread_attr_setstacksize().&lt;BR /&gt;&lt;BR /&gt;For the failing pthread_attr_destroy(&amp;amp;attr) do you have a corresponding pthread_attr_init() call previously. If not, the attr may have invalid value.&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;-Rajesh</description>
      <pubDate>Thu, 28 Apr 2011 08:38:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-pthread-stack-min/m-p/4781982#M641123</guid>
      <dc:creator>Rajesh K Chaurasia</dc:creator>
      <dc:date>2011-04-28T08:38:07Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with PTHREAD_STACK_MIN</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-pthread-stack-min/m-p/4781983#M641124</link>
      <description>The Ruby 1.9.2 source code is pretty well coded regarding pthreads. The problem should rather lay inside the stock HP-UX B.11.31 pthread library implementation which looks to be buggy.&lt;BR /&gt;&lt;BR /&gt;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.&lt;BR /&gt;&lt;BR /&gt;Philippe</description>
      <pubDate>Thu, 28 Apr 2011 08:52:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-pthread-stack-min/m-p/4781983#M641124</guid>
      <dc:creator>Ph Vouters</dc:creator>
      <dc:date>2011-04-28T08:52:43Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with PTHREAD_STACK_MIN</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-pthread-stack-min/m-p/4781984#M641125</link>
      <description>&amp;gt;could someone tell me whether there are known problems with pthread_attr_destroy?&lt;BR /&gt;&lt;BR /&gt;I don't see any patches mentioning it.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;it is definitely not a good idea from the HP-UX pthread lab to set PTHREAD_STACK_MIN to an unrealistic value.&lt;BR /&gt;&lt;BR /&gt;Unrealistic perhaps, if you expect to get signals.&lt;BR /&gt;&lt;BR /&gt;And you could use sigaltstack(2):&lt;BR /&gt;Each thread may define an alternate signal handling stack.</description>
      <pubDate>Fri, 29 Apr 2011 06:29:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-pthread-stack-min/m-p/4781984#M641125</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2011-04-29T06:29:33Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with PTHREAD_STACK_MIN</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-pthread-stack-min/m-p/4781985#M641126</link>
      <description>PTHREAD_STACK_MIN is architecturally defined minimum stack size. The value may be impractical for general application. If you have issues please report to HP response center (need a valid HP-UX support contract) to have the behavior corrected.&lt;BR /&gt;&lt;BR /&gt;The value of PTHREAD_STACK_MIN has remained same (4096) on PA-RISC/Integrity on all HP-UX releases.&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;-Rajesh</description>
      <pubDate>Thu, 12 May 2011 05:02:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-pthread-stack-min/m-p/4781985#M641126</guid>
      <dc:creator>Rajesh K Chaurasia</dc:creator>
      <dc:date>2011-05-12T05:02:50Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with PTHREAD_STACK_MIN</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-pthread-stack-min/m-p/4781986#M641127</link>
      <description>There is no bug in pthread_detach. This was simply caused by an indirect setjmp call through a Ruby's rb_raise in a thread leading to various run-time failures. Squeezing this rb_raise made Ruby behave much better.&lt;BR /&gt;&lt;BR /&gt;Got a little problem with pthread_cond_timedwait. It looks like that the maximum acceptable delay is 874800000 seconds under HP-UX 11iv3.&lt;BR /&gt;&lt;BR /&gt;About PTHREAD_STACK_MIN, no support contract =&amp;gt; no problem report to HP.&lt;BR /&gt;&lt;BR /&gt;Now the latest Ruby is available on HP-UX. It has already really interested two Chinese people. And this is what I really do care about.</description>
      <pubDate>Thu, 12 May 2011 07:36:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-pthread-stack-min/m-p/4781986#M641127</guid>
      <dc:creator>Ph Vouters</dc:creator>
      <dc:date>2011-05-12T07:36:15Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with PTHREAD_STACK_MIN</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-pthread-stack-min/m-p/4781987#M641128</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;&amp;gt; It has already really interested two Chinese people. And this is what I really do care about.&lt;BR /&gt;&lt;BR /&gt;Who cares what nationality is interested?  As a global community, why not simply say "...has really interested TWO PEOPLE".&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Thu, 12 May 2011 10:15:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-pthread-stack-min/m-p/4781987#M641128</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2011-05-12T10:15:53Z</dc:date>
    </item>
  </channel>
</rss>

