<?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: Pid &amp;lt;nnn&amp;gt; killed due to trashed stack. in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/pid-lt-nnn-gt-killed-due-to-trashed-stack/m-p/5106436#M445221</link>
    <description>hi Dennis,&lt;BR /&gt;&lt;BR /&gt;tx a lot for your helpul answers!&lt;BR /&gt;I will try to use also the function in my main and see how it goes.&lt;BR /&gt;I leave this thread open till I done and let everyone knows the results.</description>
    <pubDate>Sun, 04 May 2008 07:17:31 GMT</pubDate>
    <dc:creator>devshlom</dc:creator>
    <dc:date>2008-05-04T07:17:31Z</dc:date>
    <item>
      <title>Pid &lt;nnn&gt; killed due to trashed stack.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/pid-lt-nnn-gt-killed-due-to-trashed-stack/m-p/5106420#M445205</link>
      <description>Hi,&lt;BR /&gt;I'm havign an executable that works fine in all the other UNIX env (solaris,linux, aix) - but in HP-UX I get this error:&lt;BR /&gt;"Pid &lt;NNN&gt; killed due to trashed stack.&lt;BR /&gt;Pid &lt;NNN&gt; was killed due to failure in writing the signal context. Illegal instruction (core dumped)"&lt;BR /&gt;The exe was compiled and linked as 32bit app.&lt;BR /&gt;=========&lt;BR /&gt;sys info:&lt;BR /&gt;=========&lt;BR /&gt;HP-UX hpux B.11.23 U 9000/800 3697136004 unlimited-user license&lt;BR /&gt;&lt;BR /&gt;I've installed PHKL_36745 patch with all its dependencies, but it didn't help.&lt;BR /&gt;&lt;BR /&gt;Anyone has some ideas?&lt;/NNN&gt;&lt;/NNN&gt;</description>
      <pubDate>Wed, 30 Apr 2008 11:38:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/pid-lt-nnn-gt-killed-due-to-trashed-stack/m-p/5106420#M445205</guid>
      <dc:creator>devshlom</dc:creator>
      <dc:date>2008-04-30T11:38:24Z</dc:date>
    </item>
    <item>
      <title>Re: Pid &lt;nnn&gt; killed due to trashed stack.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/pid-lt-nnn-gt-killed-due-to-trashed-stack/m-p/5106421#M445206</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;This is really a continuation of your earlier thread:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1226923" target="_blank"&gt;http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1226923&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;As I said before:&lt;BR /&gt;&lt;BR /&gt;It is possible that you experienced a stack overflow due to excessive recursive calls or due to a buffer overrun.&lt;BR /&gt;&lt;BR /&gt;Perhaps a 'tusc' trace would help you.&lt;BR /&gt;&lt;BR /&gt;Please also give consideration to the guidelines here:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums11.itrc.hp.com/service/forums/helptips.do?#28" target="_blank"&gt;http://forums11.itrc.hp.com/service/forums/helptips.do?#28&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Wed, 30 Apr 2008 11:47:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/pid-lt-nnn-gt-killed-due-to-trashed-stack/m-p/5106421#M445206</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2008-04-30T11:47:58Z</dc:date>
    </item>
    <item>
      <title>Re: Pid &lt;nnn&gt; killed due to trashed stack.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/pid-lt-nnn-gt-killed-due-to-trashed-stack/m-p/5106422#M445207</link>
      <description>Hi James,&lt;BR /&gt;I closed the mentioned thread.&lt;BR /&gt;Regarding your answer:&lt;BR /&gt;can you give me some more details about this 'tusc'? I don't have such utility on my system.&lt;BR /&gt;Is it something like 'pstack' and if not - do you know if there is any took that is similar to pstack on hp-ux?&lt;BR /&gt;</description>
      <pubDate>Wed, 30 Apr 2008 12:11:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/pid-lt-nnn-gt-killed-due-to-trashed-stack/m-p/5106422#M445207</guid>
      <dc:creator>devshlom</dc:creator>
      <dc:date>2008-04-30T12:11:02Z</dc:date>
    </item>
    <item>
      <title>Re: Pid &lt;nnn&gt; killed due to trashed stack.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/pid-lt-nnn-gt-killed-due-to-trashed-stack/m-p/5106423#M445208</link>
      <description>Hi (again):&lt;BR /&gt;&lt;BR /&gt;You can still open your closed thread and assign points for the help you received there.&lt;BR /&gt;&lt;BR /&gt;You can obtain 'tusc' from the HP-UX Porting Center:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://hpux.cs.utah.edu/hppd/hpux/Sysadmin/tusc-7.9/" target="_blank"&gt;http://hpux.cs.utah.edu/hppd/hpux/Sysadmin/tusc-7.9/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;As for the Solaris 'pstack', the HP-UX counterpart would be 'gdb' or the HP form 'wdb':&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://h21007.www2.hp.com/portal/site/dspp/menuitem.863c3e4cbcdc3f3515b49c108973a801/?ciid=29080f1bace021100f1bace02110275d6e10RCRD" target="_blank"&gt;http://h21007.www2.hp.com/portal/site/dspp/menuitem.863c3e4cbcdc3f3515b49c108973a801/?ciid=29080f1bace021100f1bace02110275d6e10RCRD&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Wed, 30 Apr 2008 12:21:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/pid-lt-nnn-gt-killed-due-to-trashed-stack/m-p/5106423#M445208</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2008-04-30T12:21:03Z</dc:date>
    </item>
    <item>
      <title>Re: Pid &lt;nnn&gt; killed due to trashed stack.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/pid-lt-nnn-gt-killed-due-to-trashed-stack/m-p/5106424#M445209</link>
      <description>Hi (again):&lt;BR /&gt;&lt;BR /&gt;You might try increasing your 'maxssiz' under the assumption that you are doing recursive procedure calls (are you?) or have a program that allocates a large amount of data on the stack.&lt;BR /&gt;&lt;BR /&gt;Examine your current settings with 'kctune' and confine your change to the 32-bit 'maxssiz' since this is for a 32-bit application.  See the manpages for more information:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://docs.hp.com/en/B3921-60631/maxssiz.5.html" target="_blank"&gt;http://docs.hp.com/en/B3921-60631/maxssiz.5.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Wed, 30 Apr 2008 12:39:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/pid-lt-nnn-gt-killed-due-to-trashed-stack/m-p/5106424#M445209</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2008-04-30T12:39:17Z</dc:date>
    </item>
    <item>
      <title>Re: Pid &lt;nnn&gt; killed due to trashed stack.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/pid-lt-nnn-gt-killed-due-to-trashed-stack/m-p/5106425#M445210</link>
      <description>I've already modified all the relevant maxssize, maxtsize and maxdsize to the maximum legal value...&lt;BR /&gt;and it didn't help - as you can guess.&lt;BR /&gt;notes:&lt;BR /&gt;1. My application is multithreaded&lt;BR /&gt;2. If this code didn't work fine on the other UNIX env I would continue digging my code searching for some bug.&lt;BR /&gt;&lt;BR /&gt;tx.</description>
      <pubDate>Wed, 30 Apr 2008 14:01:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/pid-lt-nnn-gt-killed-due-to-trashed-stack/m-p/5106425#M445210</guid>
      <dc:creator>devshlom</dc:creator>
      <dc:date>2008-04-30T14:01:06Z</dc:date>
    </item>
    <item>
      <title>Re: Pid &lt;nnn&gt; killed due to trashed stack.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/pid-lt-nnn-gt-killed-due-to-trashed-stack/m-p/5106426#M445211</link>
      <description>&amp;gt;I've already modified all the relevant maxssiz, maxtsiz and maxdsiz to the maximum legal value.&lt;BR /&gt;&lt;BR /&gt;You should immediately reduce maxssiz back to a reasonable value, 80 Mb.  Making it bigger will reduce from maxdsiz, if set to 1 Gb or larger.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;1. My application is multithreaded&lt;BR /&gt;&lt;BR /&gt;Then maxssiz won't help.  You need to increase the thread stacksize with pthread_attr_setstacksize(3) or pthread_default_stacksize_np(3T).&lt;BR /&gt;Or export PTHREAD_DEFAULT_STACK_SIZE if you have a recent libpthread patch.</description>
      <pubDate>Thu, 01 May 2008 05:26:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/pid-lt-nnn-gt-killed-due-to-trashed-stack/m-p/5106426#M445211</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2008-05-01T05:26:25Z</dc:date>
    </item>
    <item>
      <title>Re: Pid &lt;nnn&gt; killed due to trashed stack.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/pid-lt-nnn-gt-killed-due-to-trashed-stack/m-p/5106427#M445212</link>
      <description>tx man,&lt;BR /&gt;can you specify how to do it?</description>
      <pubDate>Thu, 01 May 2008 06:34:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/pid-lt-nnn-gt-killed-due-to-trashed-stack/m-p/5106427#M445212</guid>
      <dc:creator>devshlom</dc:creator>
      <dc:date>2008-05-01T06:34:30Z</dc:date>
    </item>
    <item>
      <title>Re: Pid &lt;nnn&gt; killed due to trashed stack.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/pid-lt-nnn-gt-killed-due-to-trashed-stack/m-p/5106428#M445213</link>
      <description>&amp;gt;can you specify how to do it?&lt;BR /&gt;&lt;BR /&gt;Which?  They have man pages.&lt;BR /&gt;&lt;BR /&gt;You need to increase the thread stacksize with 1) pthread_attr_setstacksize(3)&lt;BR /&gt;2) pthread_default_stacksize_np(3T).&lt;BR /&gt;3) Or export PTHREAD_DEFAULT_STACK_SIZE if you have a recent libpthread patch.&lt;BR /&gt;&lt;BR /&gt;Are you using pthread_attr_setstacksize now?&lt;BR /&gt;If you are, make it bigger, else use 2) or 3).</description>
      <pubDate>Thu, 01 May 2008 06:59:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/pid-lt-nnn-gt-killed-due-to-trashed-stack/m-p/5106428#M445213</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2008-05-01T06:59:21Z</dc:date>
    </item>
    <item>
      <title>Re: Pid &lt;nnn&gt; killed due to trashed stack.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/pid-lt-nnn-gt-killed-due-to-trashed-stack/m-p/5106429#M445214</link>
      <description>hi again,&lt;BR /&gt;I want to use the 3 - what value you suggest me to set for this env var?</description>
      <pubDate>Thu, 01 May 2008 07:53:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/pid-lt-nnn-gt-killed-due-to-trashed-stack/m-p/5106429#M445214</guid>
      <dc:creator>devshlom</dc:creator>
      <dc:date>2008-05-01T07:53:30Z</dc:date>
    </item>
    <item>
      <title>Re: Pid &lt;nnn&gt; killed due to trashed stack.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/pid-lt-nnn-gt-killed-due-to-trashed-stack/m-p/5106430#M445215</link>
      <description>Hi denis,&lt;BR /&gt;the 3rd option solved the probelm!!!!&lt;BR /&gt;I just need to know know if there is anyway to chnage the PTHREAD_DEFAULT_STACK_SIZE permanently via the sam utility?&lt;BR /&gt;1. I need to find a nice way to recomment our customers.&lt;BR /&gt;2. Do you know what should be the minimal value for this env var so that my application work fine?&lt;BR /&gt;&lt;BR /&gt;thank alot!!!!!!&lt;BR /&gt;shlom</description>
      <pubDate>Thu, 01 May 2008 08:07:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/pid-lt-nnn-gt-killed-due-to-trashed-stack/m-p/5106430#M445215</guid>
      <dc:creator>devshlom</dc:creator>
      <dc:date>2008-05-01T08:07:31Z</dc:date>
    </item>
    <item>
      <title>Re: Pid &lt;nnn&gt; killed due to trashed stack.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/pid-lt-nnn-gt-killed-due-to-trashed-stack/m-p/5106431#M445216</link>
      <description>&amp;gt;I just need to know know if there is anyway to change the PTHREAD_DEFAULT_STACK_SIZE permanently via the sam utility?&lt;BR /&gt;&lt;BR /&gt;No, you need to export it.  Possibly in your .profile or /etc/profile.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;1. I need to find a nice way to recommend our customers.&lt;BR /&gt;&lt;BR /&gt;You can change your application to do 1).&lt;BR /&gt;&lt;BR /&gt;&amp;gt;2. Do you know what should be the minimal value for this env var so that my application work fine?&lt;BR /&gt;&lt;BR /&gt;No, you have to know your application.  (How many threads?) The default for PA is 64 Kb  For IPF it is 256 Kb but that needs to be divided by 2.&lt;BR /&gt;&lt;BR /&gt;What value did you use to get it to work?</description>
      <pubDate>Thu, 01 May 2008 09:05:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/pid-lt-nnn-gt-killed-due-to-trashed-stack/m-p/5106431#M445216</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2008-05-01T09:05:44Z</dc:date>
    </item>
    <item>
      <title>Re: Pid &lt;nnn&gt; killed due to trashed stack.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/pid-lt-nnn-gt-killed-due-to-trashed-stack/m-p/5106432#M445217</link>
      <description>Hi man,&lt;BR /&gt;well done for your answer, again.&lt;BR /&gt;1. my application uses at least 9 threads, but it can be configured to work with a lot more... more than INT_MAX (2147483647) - so, any recommended value?&lt;BR /&gt;&lt;BR /&gt;2. what is the standard way for working on HP-UX? if I have a script that start my app - do you think I better export PTHREAD_DEFAULT_STACK_SIZE in it (before start the app) or do some changes in my application (is it ok to do it on the main?) for HP-UX?&lt;BR /&gt;&lt;BR /&gt;tx again.</description>
      <pubDate>Thu, 01 May 2008 09:33:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/pid-lt-nnn-gt-killed-due-to-trashed-stack/m-p/5106432#M445217</guid>
      <dc:creator>devshlom</dc:creator>
      <dc:date>2008-05-01T09:33:12Z</dc:date>
    </item>
    <item>
      <title>Re: Pid &lt;nnn&gt; killed due to trashed stack.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/pid-lt-nnn-gt-killed-due-to-trashed-stack/m-p/5106433#M445218</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I probabaly did something wrong.&lt;BR /&gt;currently I can make it work again:&lt;BR /&gt;sometimes for PTHREAD_DEFAULT_STACK_SIZE, such as 4096 the app crashes when it tries to start with BUS ERROR and sometimes it gives me the original problem...&lt;BR /&gt;what's going on?! after I saw the light?!!</description>
      <pubDate>Thu, 01 May 2008 10:01:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/pid-lt-nnn-gt-killed-due-to-trashed-stack/m-p/5106433#M445218</guid>
      <dc:creator>devshlom</dc:creator>
      <dc:date>2008-05-01T10:01:23Z</dc:date>
    </item>
    <item>
      <title>Re: Pid &lt;nnn&gt; killed due to trashed stack.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/pid-lt-nnn-gt-killed-due-to-trashed-stack/m-p/5106434#M445219</link>
      <description>yes - I found my mistke.&lt;BR /&gt;pls ignore my last msg.&lt;BR /&gt;When I set PTHREAD_DEFAULT_STACK_SIZE to max 10240000 for example it worked fine.&lt;BR /&gt;&lt;BR /&gt;I read in the man that the max allowed for this one is 10MB, but what is the size unit it gets?&lt;BR /&gt;</description>
      <pubDate>Thu, 01 May 2008 10:11:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/pid-lt-nnn-gt-killed-due-to-trashed-stack/m-p/5106434#M445219</guid>
      <dc:creator>devshlom</dc:creator>
      <dc:date>2008-05-01T10:11:58Z</dc:date>
    </item>
    <item>
      <title>Re: Pid &lt;nnn&gt; killed due to trashed stack.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/pid-lt-nnn-gt-killed-due-to-trashed-stack/m-p/5106435#M445220</link>
      <description>&amp;gt;1. but it can be configured to work with a lot more - so, any recommended value?&lt;BR /&gt;&lt;BR /&gt;If they are using the all of a CPU, having more than the number of CPUs is not helpful.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;2. what is the standard way for working on HP-UX? if I have a script that start my app - do you think I better export PTHREAD_DEFAULT_STACK_SIZE in it or do some changes in my application (is it ok to do it on the main?) for HP-UX?&lt;BR /&gt;&lt;BR /&gt;The right way is to call pthread_attr_setstacksize.&lt;BR /&gt;But you could either export PTHREAD_DEFAULT_STACK_SIZE or call pthread_default_stacksize_np in your main.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;sometimes for PTHREAD_DEFAULT_STACK_SIZE, such as 4096&lt;BR /&gt;&amp;gt;but what is the size unit it&lt;BR /&gt;&lt;BR /&gt;This is in bytes:&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1110034" target="_blank"&gt;http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1110034&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;gt;When I set PTHREAD_DEFAULT_STACK_SIZE to max 10240000 for example it worked fine.&lt;BR /&gt;&lt;BR /&gt;Why would you want it that high?  Try with 256 KB, 262144.</description>
      <pubDate>Thu, 01 May 2008 19:55:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/pid-lt-nnn-gt-killed-due-to-trashed-stack/m-p/5106435#M445220</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2008-05-01T19:55:22Z</dc:date>
    </item>
    <item>
      <title>Re: Pid &lt;nnn&gt; killed due to trashed stack.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/pid-lt-nnn-gt-killed-due-to-trashed-stack/m-p/5106436#M445221</link>
      <description>hi Dennis,&lt;BR /&gt;&lt;BR /&gt;tx a lot for your helpul answers!&lt;BR /&gt;I will try to use also the function in my main and see how it goes.&lt;BR /&gt;I leave this thread open till I done and let everyone knows the results.</description>
      <pubDate>Sun, 04 May 2008 07:17:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/pid-lt-nnn-gt-killed-due-to-trashed-stack/m-p/5106436#M445221</guid>
      <dc:creator>devshlom</dc:creator>
      <dc:date>2008-05-04T07:17:31Z</dc:date>
    </item>
    <item>
      <title>Re: Pid &lt;nnn&gt; killed due to trashed stack.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/pid-lt-nnn-gt-killed-due-to-trashed-stack/m-p/5106437#M445222</link>
      <description>Thanks all.&lt;BR /&gt;I have 2 options to solve this problem:&lt;BR /&gt;1. use the env variable with 128K&lt;BR /&gt;2. use the pthread_default_stacksize_np in the code, before any thread begin (except for the main of course)&lt;BR /&gt;&lt;BR /&gt;shlom</description>
      <pubDate>Sun, 04 May 2008 12:30:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/pid-lt-nnn-gt-killed-due-to-trashed-stack/m-p/5106437#M445222</guid>
      <dc:creator>devshlom</dc:creator>
      <dc:date>2008-05-04T12:30:23Z</dc:date>
    </item>
  </channel>
</rss>

