Unix Technical Forum

how to find process pc

This is a discussion on how to find process pc within the comp.unix.solaris forums, part of the Solaris Operating System category; --> Hello, I am trying to debug a situation where I have several processes which are sharing resources via the ...


Go Back   Unix Technical Forum > Unix Operating Systems > Solaris Operating System > comp.unix.solaris

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 07-01-2008, 07:05 AM
mitchmcc@yahoo.com
 
Posts: n/a
Default how to find process pc

Hello,

I am trying to debug a situation where I have several processes which
are sharing
resources via the Sun sema_init (etc) semaphore library functions. I
am experiencing
a periodic hang, which of course appears that one process is holding
the lock.

My questions are:


1. I could not find any documentation that showed any system
utilities which would
show (analogous to the System V ipcs command) what processes were
holding the
semaphore. Is there such a command for the Sun semaphore
implementation?

2. I thought I could figure this out by simply finding out where the
processes themselves
were running, but the output of the 'ps' command does NOT show the
address of
where the process currently is. The ps man page seems to indicate
that this is what ADDR should show. Can anyone tell me how to get
the program counter for a process that may be stuck somewhere?

Thanks,

Mitch

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 07-01-2008, 07:06 AM
Andrew Gabriel
 
Posts: n/a
Default Re: how to find process pc

In article <ba0a96cf-1ea8-4afd-a661-8635fd197db8@t54g2000hsg.googlegroups.com>,
"mitchmcc@yahoo.com" <mitchmcc@yahoo.com> writes:
> Hello,
>
> I am trying to debug a situation where I have several processes which
> are sharing
> resources via the Sun sema_init (etc) semaphore library functions. I


You are using USYNC_PROCESS to initialise the semaphores, I hope?

> am experiencing
> a periodic hang, which of course appears that one process is holding
> the lock.
>
> My questions are:
>
>
> 1. I could not find any documentation that showed any system
> utilities which would
> show (analogous to the System V ipcs command) what processes were
> holding the
> semaphore. Is there such a command for the Sun semaphore
> implementation?
>
> 2. I thought I could figure this out by simply finding out where the
> processes themselves
> were running, but the output of the 'ps' command does NOT show the
> address of
> where the process currently is. The ps man page seems to indicate
> that this is what ADDR should show. Can anyone tell me how to get


That's the address in the kernel, which isn't useful for you here.
(Not sure it's much use at all any more given many processes are
multi-threaded.)

> the program counter for a process that may be stuck somewhere?


Use: pstack <pid>

--
Andrew Gabriel
[email address is not usable -- followup in the newsgroup]
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 11:12 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com