<?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 4k-&amp;quot;hole&amp;quot; in pthread stack on 11.23 Itanium in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/4k-quot-hole-quot-in-pthread-stack-on-11-23-itanium/m-p/4207586#M91633</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;we're getting segfaults in one of our applications (multithreaded) while accessing an array element somewhere in the middle of the array.  Elements at the beginning and at the end are fine.  The array in question occupies ~64kb on the stack.&lt;BR /&gt;&lt;BR /&gt;Using pstat_getprocvm() and mprotect() I found out that there is a one-page "hole" in the middle of the pthread's stack, which is neither readable nor writeable.&lt;BR /&gt;&lt;BR /&gt;The attached program is a reduced test case which spawns a thread allocating an 192kb character array on the stack. That should be fine since the default stack size is 256kb.&lt;BR /&gt;&lt;BR /&gt;When compiled with "aCC +DD64 -mt -g -o stackhole stackhole.c" or "gcc -g -mlp64 -pthread -o stackhole stackhole.c" it crashes at char 61456 with the default stack size.&lt;BR /&gt;&lt;BR /&gt;Setting PTHREAD_DEFAULT_STACK_SIZE moves the "crash point", e.g. PTHREAD_DEFAULT_STACK_SIZE=320000 crashes at 28688.&lt;BR /&gt;&lt;BR /&gt;This make only half of a thread's stack usable and clearly looks like a bug to me. Is there a patch available?&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;&lt;BR /&gt;/Michael</description>
    <pubDate>Fri, 30 May 2008 06:54:33 GMT</pubDate>
    <dc:creator>Michael Klein</dc:creator>
    <dc:date>2008-05-30T06:54:33Z</dc:date>
    <item>
      <title>4k-"hole" in pthread stack on 11.23 Itanium</title>
      <link>https://community.hpe.com/t5/operating-system-linux/4k-quot-hole-quot-in-pthread-stack-on-11-23-itanium/m-p/4207586#M91633</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;we're getting segfaults in one of our applications (multithreaded) while accessing an array element somewhere in the middle of the array.  Elements at the beginning and at the end are fine.  The array in question occupies ~64kb on the stack.&lt;BR /&gt;&lt;BR /&gt;Using pstat_getprocvm() and mprotect() I found out that there is a one-page "hole" in the middle of the pthread's stack, which is neither readable nor writeable.&lt;BR /&gt;&lt;BR /&gt;The attached program is a reduced test case which spawns a thread allocating an 192kb character array on the stack. That should be fine since the default stack size is 256kb.&lt;BR /&gt;&lt;BR /&gt;When compiled with "aCC +DD64 -mt -g -o stackhole stackhole.c" or "gcc -g -mlp64 -pthread -o stackhole stackhole.c" it crashes at char 61456 with the default stack size.&lt;BR /&gt;&lt;BR /&gt;Setting PTHREAD_DEFAULT_STACK_SIZE moves the "crash point", e.g. PTHREAD_DEFAULT_STACK_SIZE=320000 crashes at 28688.&lt;BR /&gt;&lt;BR /&gt;This make only half of a thread's stack usable and clearly looks like a bug to me. Is there a patch available?&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;&lt;BR /&gt;/Michael</description>
      <pubDate>Fri, 30 May 2008 06:54:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/4k-quot-hole-quot-in-pthread-stack-on-11-23-itanium/m-p/4207586#M91633</guid>
      <dc:creator>Michael Klein</dc:creator>
      <dc:date>2008-05-30T06:54:33Z</dc:date>
    </item>
    <item>
      <title>Re: 4k-"hole" in pthread stack on 11.23 Integrity</title>
      <link>https://community.hpe.com/t5/operating-system-linux/4k-quot-hole-quot-in-pthread-stack-on-11-23-itanium/m-p/4207587#M91634</link>
      <description>&lt;P&gt;&amp;gt;This makes only half of a thread's stack usable and clearly looks like a bug to me.&lt;BR /&gt;&lt;BR /&gt;You are confused. The default stacksize on IPF is 256 Kb. With half assigned to the user stack and then a guard page then the other half assigned to the RSE stack.&lt;BR /&gt;&lt;BR /&gt;If you don't like the default allocation you are free to change it with:&lt;BR /&gt;pthread_attr_setrsestacksize_np&lt;BR /&gt;pthread_attr_getrsestacksize_np&lt;BR /&gt;pthread_default_rsestacksize_np&lt;/P&gt;</description>
      <pubDate>Sun, 11 Sep 2011 21:21:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/4k-quot-hole-quot-in-pthread-stack-on-11-23-itanium/m-p/4207587#M91634</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2011-09-11T21:21:54Z</dc:date>
    </item>
    <item>
      <title>Re: 4k-"hole" in pthread stack on 11.23 Itanium</title>
      <link>https://community.hpe.com/t5/operating-system-linux/4k-quot-hole-quot-in-pthread-stack-on-11-23-itanium/m-p/4207588#M91635</link>
      <description>Thanks, that explains it.  I expected a guard page at the end, but seeing IPF's two distinct stacks it makes sense now.</description>
      <pubDate>Fri, 30 May 2008 08:41:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/4k-quot-hole-quot-in-pthread-stack-on-11-23-itanium/m-p/4207588#M91635</guid>
      <dc:creator>Michael Klein</dc:creator>
      <dc:date>2008-05-30T08:41:37Z</dc:date>
    </item>
  </channel>
</rss>

