1821868 Members
3052 Online
109638 Solutions
New Discussion юеВ

Finding Record Locks

 
SOLVED
Go to solution
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.