Operating System - HP-UX
1825777 Members
2142 Online
109687 Solutions
New Discussion

Re: Pid XXXX killed due to trashed stack

 
Soumen
Occasional Contributor

Pid XXXX killed due to trashed stack

Hi,
I am using Unigraphics NX on HP 11.00 Visualize System. I installed Unigraphics and now when I open unigraphics in #D mode it shows the initial screen and crashes saying "Pid XXXX killed due to trashed stack.
Error writing signal context"

Any suggestions will be appreciated.
Thanks,
6 REPLIES 6
Mark Grant
Honored Contributor

Re: Pid XXXX killed due to trashed stack

Check out this patch

PHKL_28474

Applications which are compiled for the 32-bit data model
and run on a 64-bit kernel can sometimes abort with the
messages: "Pid killed due to trashed stack. Pid
was killed due to failure in writing the signal context."

In most cases, the application was compiled with +O2
optimization or uses alloca(3C) with a computed size
argument.
Never preceed any demonstration with anything more predictive than "watch this"
Chris Evans_5
Frequent Advisor

Re: Pid XXXX killed due to trashed stack

Hi there

Have you got patch PHKL_28474 installed? It is a bundle which one of the patches (PHKL_27283) seems to deal with this exact issue...

PHKL_27283:
( SR:8606259602 CR:JAGae23920 )
Applications which are compiled for the 32-bit data model
and run on a 64-bit kernel can sometimes abort with the
messages: "Pid killed due to trashed stack. Pid
was killed due to failure in writing the signal context."

In most cases, the application was compiled with +O2
optimization or uses alloca(3C) with a computed size
argument.
Victor Prasad_1
New Member

Re: Pid XXXX killed due to trashed stack

Hi,

I am still facing this problem on HP11.00 and HP11.11. I get a bus error core dump and the above message on both the platforms. They have the relevant patches already installed (PHKL_27282 on 11.00 and PHKL_27283 on 11.11 respectively).

I am going to install patch PHKL_28474 on HP11.11 and test again. However, my target platform in HP11.00. Is there an equivalent patch for this platform?

Thanks.
Simon Bielasiak
New Member

Re: Pid XXXX killed due to trashed stack

I'm running into a similar problem but the +O2 compilation option was not used when building the code in question. I don't believe it makes use of alloca() either. Could the problem this patch addresses still be the cause?
Maribeth Romeo
Frequent Advisor

Re: Pid XXXX killed due to trashed stack

Was this issue ever resolved? I'm having the same problem on my HP-UX 11 machine.
Simon Bielasiak
New Member

Re: Pid XXXX killed due to trashed stack

It turns out that we were running out of stack space due to a definition of a very large automatic wide character array variable (automatic variables are allocated on the stack). To fix this, we now define a wide character pointer and set it to space we allocate off of the heap.