TRACE Option JOBLCK

Added October 2016

TRACE=JOBLCK causes all unresolved lock/unlock operations on the jobtbl.sys file to be traced in the file jobtbl.lck. The intent here is to make it easier to debug and resolve a rogue condition whereby a process has a lock on jobtbl.sys preventing other users from getting in or out of A-Shell. Under UNIX you can use the lslk utility to see who has a lock on the file, but under AIX this appears to be nearly impossible, and under Windows it may be difficult.

The jobtbl.lck file is created in the same directory as jobtbl.sys, and consists of human readable ASCII text lines in the following format:

pid,op,recnovar

where pid is the process id, op is either "lock" or "unlock", and recnovar is 0 for the jobtbl header, else a number indicating the jobtbl record for that job number. For example:

2415,lock,5

3723,lock,15

2415,unlock,5

3724,unlock,15

 

The above case indicates the following chronology:

process 2415 locked the jobtbl record for job #5

process 3723 locked the jobtbl record for job #15

process 2415 unlocked the jobtbl record for job #5

process 3723 unlocked the jobtbl record for job #15

 

Since at this point the locks and unlocks match, on the next operation, the file will be truncated and started over again.

If the option is enabled and you get a "unable to access jobtbl.sys" error, you can then display this file to hopefully identify which processes have locks on the file and can then investigate or kill those processes.

History

2016 September, A-Shell 6.3.1526:  JOBLCK added to A-Shell. Note that a stripped-down version of this feature was added in 6.2.1428.0.