cancel
Showing results for 
Search instead for 
Did you mean: 

Crash in U_STACK_TRACE function

Harin Vadodaria
Occasional Visitor

Crash in U_STACK_TRACE function

Hi,

I am calling U_STACK_TRACE function from my application and getting crash at following location

#11 0xc00000000192c9a0:0 in uwx_restore_reg+0x1a0 ()
from /usr/lib/hpux64/libunwind.so.1
#12 0xc000000001950d60:0 in uwx_step+0x15e0 ()
from /usr/lib/hpux64/libunwind.so.1
#13 0xc00000000195ed40:0 in _UNW_STACK_TRACE_COMMON(FILE*,uwx_env*,uwx_self_in
fo*)+0x120 () from /usr
/lib/hpux64/libunwind.so.1
#14 0xc00000000195eab0:0 in U_STACK_TRACE+0x1f0 ()
from /usr/lib/hpux64/libunwind.so.1

At this point ulimit -a says that stack limit for process is 8192

When I increase stack space available for process by "ulimit -s" command, to some large value say 32767, I do not encounter the error!

Is there any specific reason for this behavior?

Thanks
3 REPLIES
Dennis Handly
Acclaimed Contributor

Re: Crash in U_STACK_TRACE function

>getting crash at following location

What type of crash? Signal 11 stack overflow?
Do you have the latest Unwind Lib patches? PHSS_38139 for 11.31.

>Is there any specific reason for this behavior?

You have answered your own question. You must have a large enough stack to call U_STACK_TRACE.
Harin Vadodaria
Occasional Visitor

Re: Crash in U_STACK_TRACE function

>What type of crash? Signal 11 stack overflow?
Do you have the latest Unwind Lib patches? PHSS_38139 for 11.31.

I am getting SIGSEGV.
I do not have latest patch of libunwind.so.1.

> Is there any specific reason for this behavior?

Thread dump showed that even with stack size cap of 8192, stack was not fully used still I got the crash. However with increased stack size this was prevented. That is why I asked.
Dennis Handly
Acclaimed Contributor

Re: Crash in U_STACK_TRACE function

>I am getting SIGSEGV.

But are you getting stack overflow? Or have you enabled sigaltstack(2)?

>I do not have latest patch of libunwind.so.1.

Make it so.

>Thread dump showed that even with stack size cap of 8192, stack was not fully used

What's this? Are you dealing with the main stack or a thread stack?
If the latter, 1/2 of the stack is used for the RSE stack.

>with increased stack size this was prevented. That is why I asked.

Again, your changes answered your question.
You should ignore the incorrect/lying "Thread dump".