Tuesday, February 15, 2005

Getting stack

I will try to post here some useful, making life easier tricks from time to time.
Today - how to get stack of a process when it stuck and pstack does not work? Attaching mdb to the process doesn't work too. I got solution from Sun Engineering (thanks guys) some time ago - simple and works.


$ mdb -k
Loading modules: [ unix krtld genunix ]
> ::ps ! grep metadevadm
R 317 1 7 7 0 0x42004900 0dbfe018 metadevadm
> 0dbfe018::walk thread |::findstack
stack pointer for thread d154c400: d18fdbd0
[ d18fdbd0 0xfe8222f2() ]
d18fdbe8 swtch+0x125()
...
...
...

No comments: