Is it possible to know wich program is locking a record?

ezequiel

Member
Hello, is it possible to know wich program is locking a record?

The thing is that we can check the VST tables and know the user and workstation, but our only way to know the implied program(s) is going to the computer and check the open procedures.

We use Progress 9.1c, Windows 2003 server, Windows XP / 7 / 8.1 workstations.


Thank you
 

TomBascom

Curmudgeon
Not for 9.1c. That is an ancient, obsolete and unsupported release.

Upgrade to 10.2B08 or better (you need to upgrade and there is no point in doing anything less than 10.2B08) and use the client statement cache (part of the _Connect VST). Or send a SIGUSR1 and get a stack trace (there is a Windows script that does the equivalent but I forget the name of it).
 

Rob Fitzpatrick

ProgressTalk.com Sponsor
Debugging is certainly more challenging on old platforms. There may be a few things you can do, if you can justify the time spent on detective work.

When you determine who the user/workstation is, what application activity do you see there?
  • If it is one or a few clients who take these locks consistently, add "-y" and/or "-yd" to their client startup parameters, if these exist in 9.1C. They're in 9.1D but I can't find any 9.1C docs at the moment. It won't tell you which program ran at a moment in time but it will help you narrow down which programs ran in their session.
  • Similar technique, if the code is remote from the client: run a packet trace (e.g. Wireshark) during the client's session and filter for samba traffic from the code server. This will tell you which programs they ran, and in which order.
  • Use Process Explorer to determine the state of the client.
    • Is it using CPU cycles?
    • Is it doing any disk I/O?
    • Does it have open TCP sockets?
    • Which objects does it have handles to?
      With knowledge of the logic in the code and narrowing down which programs might be running (from above), you may be able to use info about the client process' state to piece together which program is running, or at least eliminate one or two possibilities.
  • Collect 4GL profiling data from the client and analyze it. This will give you the session call tree, tell you what ran and when, etc.
  • I'm not sure when the LOG-MANAGER was introduced; was it 10.0A? If it's in 9.1C, that could provide useful info.
  • Check the client log. If by some chance your client threw an unhandled error that is interesting (lock wait timeout, etc.), maybe you can correlate it to the VST data you collected. Long shot but it doesn't hurt to look.
 

oli

Member
Yes, Cringer, the Process Id.
It has been implement with OpenEdge 10.1C, if I clearly remember.

The "protrace.xxxx" (where xxxx is the Process Id) file will be generated in either the OpenEdge original working directory (the one specified during installation) or, if not available (in case of netsetup installation), in the session's startup directory.
 

Cringer

ProgressTalk.com Moderator
Staff member
Is there any prerequisite for this to work other than version? I've tried it and I get
Code:
F:\DATABASE\LIVE>progetstack 2872
OpenEdge Release 11.2 as of Wed Feb 13 19:01:30 EST 2013
Cannot get stack of process 2872.
The process id you specified may be invalid, not an OpenEdge ABL process
or is a process from a pre 10.1C release of OpenEdge.
 

ezequiel

Member
Thank you all! In 9.1C, as Oli said, there is no _debugConfig.exe

So, in 10.x and 11.x, do the VST include a table for the program?
 

TomBascom

Curmudgeon
Modern releases of Progress provide the "client statement cache" as part of _connect. It will tell you what line# of what program last communicated with the db.

Or you can do the stack trace thing.

Both get you to the same place. And both require something that was released a bit more recently than 9.1d. I think it might have been 10.1C but it is certainly there by 10.2a.
 

Cringer

ProgressTalk.com Moderator
Staff member
Modern releases of Progress provide the "client statement cache" as part of _connect. It will tell you what line# of what program last communicated with the db.
Sorry for the hijacking of this thread - again! Is there any prerequisite for this? How do I use it? Here is the _connect for my current session - slightly sanitised, and it doesn't seem to be populated.
Code:
Name    Value
_Connect-2phase    0
_Connect-Batch    No
_Connect-CacheInfoType    ?
_Connect-CacheInfo[10]    ?
_Connect-CacheInfo[11]    ?
_Connect-CacheInfo[12]    ?
_Connect-CacheInfo[13]    ?
_Connect-CacheInfo[14]    ?
_Connect-CacheInfo[15]    ?
_Connect-CacheInfo[16]    ?
_Connect-CacheInfo[17]    ?
_Connect-CacheInfo[18]    ?
_Connect-CacheInfo[19]    ?
_Connect-CacheInfo[1]    ?
_Connect-CacheInfo[20]    ?
_Connect-CacheInfo[21]    ?
_Connect-CacheInfo[22]    ?
_Connect-CacheInfo[23]    ?
_Connect-CacheInfo[24]    ?
_Connect-CacheInfo[25]    ?
_Connect-CacheInfo[26]    ?
_Connect-CacheInfo[27]    ?
_Connect-CacheInfo[28]    ?
_Connect-CacheInfo[29]    ?
_Connect-CacheInfo[2]    ?
_Connect-CacheInfo[30]    ?
_Connect-CacheInfo[31]    ?
_Connect-CacheInfo[32]    ?
_Connect-CacheInfo[3]    ?
_Connect-CacheInfo[4]    ?
_Connect-CacheInfo[5]    ?
_Connect-CacheInfo[6]    ?
_Connect-CacheInfo[7]    ?
_Connect-CacheInfo[8]    ?
_Connect-CacheInfo[9]    ?
_Connect-CacheLastUpdate    ?
_Connect-CacheLineNumber[10]    ?
_Connect-CacheLineNumber[11]    ?
_Connect-CacheLineNumber[12]    ?
_Connect-CacheLineNumber[13]    ?
_Connect-CacheLineNumber[14]    ?
_Connect-CacheLineNumber[15]    ?
_Connect-CacheLineNumber[16]    ?
_Connect-CacheLineNumber[17]    ?
_Connect-CacheLineNumber[18]    ?
_Connect-CacheLineNumber[19]    ?
_Connect-CacheLineNumber[1]    ?
_Connect-CacheLineNumber[20]    ?
_Connect-CacheLineNumber[21]    ?
_Connect-CacheLineNumber[22]    ?
_Connect-CacheLineNumber[23]    ?
_Connect-CacheLineNumber[24]    ?
_Connect-CacheLineNumber[25]    ?
_Connect-CacheLineNumber[26]    ?
_Connect-CacheLineNumber[27]    ?
_Connect-CacheLineNumber[28]    ?
_Connect-CacheLineNumber[29]    ?
_Connect-CacheLineNumber[2]    ?
_Connect-CacheLineNumber[30]    ?
_Connect-CacheLineNumber[31]    ?
_Connect-CacheLineNumber[32]    ?
_Connect-CacheLineNumber[3]    ?
_Connect-CacheLineNumber[4]    ?
_Connect-CacheLineNumber[5]    ?
_Connect-CacheLineNumber[6]    ?
_Connect-CacheLineNumber[7]    ?
_Connect-CacheLineNumber[8]    ?
_Connect-CacheLineNumber[9]    ?
_Connect-CachingType    ?
_Connect-ClientType    ABL
_Connect-Device    xxxx
_Connect-Disconnect    0
_Connect-DomainId    -3
_Connect-Id    1128
_Connect-Interrupt    0
_Connect-IPAddress    192.xxx.xxx.xxx
_Connect-Misc    ?
_Connect-Name    jpalmer
_Connect-Pid    3184
_Connect-Resync    0
_Connect-semid    0
_Connect-SemNum    0
_Connect-Server    13
_Connect-TenantId    0
_Connect-Time    Wed Jan 29 07:54:28 2014
_Connect-TransId    0
_Connect-Type    REMC
_Connect-Usr    1127
_Connect-Wait    --
_Connect-Wait1    0
 
Top