lock waitors entry in syslocks
Posted in 2000
Topics: Transactions, Locking & Isolation
Informix Gurus,
This is the scenario....
I have three sessions.
Session1: Locked a table TEST in exclusive mode ( Got the lock and
being locked )
Session2: Trying to lock table TEST in exclusive mode with lock
mode wait to ???? ) in wait state
Session3: Trying to lock table TEST in exclusive mode with lock
wait to ???? ) in wait state.
I got entry in syslocks for session1 and session2 with
owner=sid_of_session1 and waitor=sid_of_session2
but there are no entries in syslocks with waitor name as sid_of_session3.
onstat -k shows only wait by session2 not by session3 BUT
onstat -u gives the right information on both session 2 and session 3
with a lock_wait_flag (L).
IDS7.30.uc8/solaris5.6
Any comments.
Thanks
Dhanesh
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
Share information about yourself, create your own public profile at
http://profiles.msn.com.
Dhanesh K Veedu wrote:
> I have three sessions.
>
> Session1: Locked a table TEST in exclusive mode ( Got the lock and
> being locked )
>
> Session2: Trying to lock table TEST in exclusive mode with lock
> mode wait to ???? ) in wait state
>
> Session3: Trying to lock table TEST in exclusive mode with lock
> wait to ???? ) in wait state.
>
> I got entry in syslocks for session1 and session2 with
> owner=sid_of_session1 and waitor=sid_of_session2
> but there are no entries in syslocks with waitor name as sid_of_session3.
>
> onstat -k shows only wait by session2 not by session3 BUT
> onstat -u gives the right information on both session 2 and session 3
> with a lock_wait_flag (L).
syslocks & onstat -k have a single row for each lock taken. If multiple
sessions are waiting on a lock, only one of those "waiters" is shown.
You can determine the various sessions waiting on a locked resource by
querying sysrstcb [hex(lkwait), sid] and figure out who is holding that
resource by querying syslcktab , systxptab and sysrstcb (examine the
syslocks view definition in $INFORMIXDIR/etc/sysmaster.sql).
Alternatively, you could use the outputs of onstat -u and onstat -k to
figure it out.
Rudy
Related threads
- record locked
- who locks a record?
- Regarding Non-Default Page Sizes
- Don't Understand Table's Space Requirement