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 ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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 |
| ||||
| 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] |