Operating System - OpenVMS
1752788 Members
6229 Online
108789 Solutions
New Discussion юеВ

Re: Finding Record Locks

 
SOLVED
Go to solution
Robert Atkinson
Respected Contributor

Re: Finding Record Locks

I feel all warm and safe again :)
Robert Atkinson
Respected Contributor

Re: Finding Record Locks

Ummmmm....a word of warning - it's not that safe......

ALPHA_ROB$ gim cmk
ALPHA_ROB$$ showlock ediweb
pid>
lkid>




**** OpenVMS (TM) Alpha Operating System V7.3-2 - BUGCHECK ****


(Running away from MD wielding pick axe handle!)

Volker Halle
Honored Contributor

Re: Finding Record Locks

Rob,

if you could attach the CLUE file (CLUE$COLLECT:CLUE$node_ddmmyy_hhmm.LIS), we might be able to figure out what went wrong...

Volker.
Robert Atkinson
Respected Contributor

Re: Finding Record Locks

If you send me your email (ratkinson-at-tbs-ltd.co.uk) I'm happy to send the Clue crash log directly.

Rob.
Volker Halle
Honored Contributor

Re: Finding Record Locks

Rob,

this crash is easily reproducable even on OpenVMS Alpha V8.3. Do NOT type on both the pid> and lkid> prompt ;-(

It's probably just a matter of checking the input parameters...

BTW, what did you expect the program to show by specifying neither a PID nor a LKID ???

Volker.
Volker Halle
Honored Contributor

Re: Finding Record Locks

Rob,

when providing neither a PID nor a LKID, the program crashes the system with an INVEXCEPTN at IPL 8 executing the instruction:

LDL R27,#X0054(R8)

with R8 = FFFFFFFF

This corresponds to the source code line:

50$: cmpl r7,lkb$l_lkid(r8) ; correct lkid?

The code should probably check the lock index (moved into R8) for being > 0 as well, e.g.

extzv #0,#lkb$s_index,r7,r8 ; extract the index
BEQLU 60$ ; invalid LKID (= 0) ?

A less risky change (the above code executes in kernel mode), could be added after prompting and reading the LKID after label get_lkid:

Volker.
Volker Halle
Honored Contributor

Re: Finding Record Locks

Rob,

after the suggested change (BEQLU 60$), it doesn't crash anymore:

CHAALP $ set proc/priv=all
CHAALP $ run showlock
pid>
lkid>
%SYSTEM-F-IVLOCKID, invalid lock ID
CHAALP $

Volker.
Jim_McKinney
Honored Contributor

Re: Finding Record Locks

I'm sorry about that... I obviously wasn't defensive enough in my programming. I never thought about or tried executing the program (though I've used it often without problems) without supplying either a PID or LKID.
PaulGavin
Occasional Advisor

Re: Finding Record Locks

Attached is a DECC module that I have used for several years. Do not remember where I got it, but I have used it on everything from VAXen to Alpha's. Only does RMS indexed files, but could probably be fixed up for others. No warranty, no support, use at your own risk.