Hanging application

Hi all,

I have a problem with a hanging multithreaded C++ application (build with SunStudio10). To find out where it hangs, I want to debug it, but in the debugger I can not reproduce this behaviour. Is there a possibility to force the application to write a corefile when it hangs, that give me a snapshot of the current process state (callstack of every thread)?

regards

Arno

[402 byte] By [ScAra] at [2007-11-26 17:29:37]
# 1
You can force a core file generation with gcore when the application hangs.The pstack tool (piped to c++filt) may also give you some hints regarding the cause of the problem, without generating a core file.
ochedrua at 2007-7-8 23:57:34 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 2
Instead of gcore'ing your process you might want to run dbx separately and 'attach' to the process.You'll get your hang in dbx with all the debugging/inspecting functionality ready (not just call stack).regards,__Fedor.
SFVa at 2007-7-8 23:57:34 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 3
Thanks a lot!
ScAra at 2007-7-8 23:57:34 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 4
A last question to this:Is gcore and pstack available on all Solaris versions also without development tools installed?
ScAra at 2007-7-8 23:57:34 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 5
Hard to say, but if you don't have pstack on any of your systems, you can find it in SUNWesu package on installation CD/DVD; gcore comes from SUNWtoo.
MaximKartasheva at 2007-7-8 23:57:34 > top of Java-index,Development Tools,Solaris and Linux Development Tools...