Usage hints

This topic describes how to use the monitor debugger in some special circumstances.

CAUTION:
Extreme care must be exercised when using the debugger to remove a lock or semaphore. This may cause data loss. We strongly recommend contacting Customer Support if a system locks up

Removing a dead lock

When a process has been killed by the system, it may have left a semaphore or a virtual lock behind.

  1. Verify all users are inactive.

  2. Type:

    d3 -0 -D
    

    Press BREAK.

  3. Depending on the case, type:

    T! f
    T! s*?
    
  4. Do one of the following options:

    1. To remove a semaphore number that has been set, type:

      T! s semnum -
      T! g
      
      Warning: If the lock is a virtual lock, it may need to be cleared. If not cleared properly, this can have disastrous results. Before attempting to clear the virtual lock, it is strongly advised that you contact Customer Support first for assistance.
    2. To clear the lock, type:

      V! f
      V! r15;2
      

      The system displays a number, for example, 0.

      V! r15;2 .001A= 0
      V! g
      
      Note: If a nonzero value displays, make it 0. If a nonzero value continues to display, there may be a problem, contact Customer Support for assistance.
  5. Identify the virtual lock.

    There are three types of virtual locks:

    • system-wide lock

    • item lock

    • group lock

To identify a system-wide lock:
  1. Type:

    V! f
    V! 1.100;2
    

    The system displays a number, for example 0.

  2. Press CTRL+N ten times or until a nonzero value displays.

    V! 1.100 .0000= CTRL+N
    V! 1.102 .001A= 0
    V! g
    
    Note: If no null value displays, there may be a problem, contact Customer Support for assistance.
To identify the item lock:
  1. Type: V! 1.15a;6

    The system displays a frame number.

  2. Type: V! ..0;4

    The system displays an 8-digit hexadecimal number. The first four digits indicate the global lock, while the next four digits indicate the number of item locks. To zero both of these, type 0 at the = prompt, and then press ENTER.

To identify a group lock:
  1. Type: V! gl

    If the system prints anything other than G-, then the group locks are set.

  2. Select the appropriate clear format.

    To clear all group locks, type:

    V! gl-
    
  3. To clear a group lock on a specific fid, type:

    V! gl[fid|.hexfid]
    
  4. To check results, type:

    V! gl
    

    The system reports G- after the last command. The virtual machine may still report locks set if the list-locks command is used.

To correct this, perform these steps:
  1. Return to TCL, and then type: V! g

    Note: If the system does not return to a TCL prompt, some other lock condition may exist, contact Customer Support for assistance.
  2. Type clear-locks (g if a TCL prompt displays.

    Allow some time for the clear-locks to complete (if terminated abnormally, the command may be delayed). After completion, the group locks should be cleared. If any further deadlocks are encountered, contact Customer Support.

    If only line 0 is deadlocked, it may be accidentally comatized. The where command displays the first two characters of the status field as FE or 7E. To uncomatize line 0, log off from another port or type:

    T! p.0;1
    T! p.0;1 .7E= .ff
    T! g
    

Enabling the debugger on line 0

If the line 0 has been started without the -D option, it is impossible to get in the monitor debugger, unless there is a lock. Line 0 must be started with the -D option for the monitor debugger to be enabled.

Finding the line number

To determine the PIB number on which the debugger is running, break into the debugger by typing:

B! p.18;2

The PIB number plus one in hexadecimal displays.

Early abort

If the virtual machine boot aborts too early (during or right after the diagnostic message), after having corrected the error when possible, the boot can be restarted by pressing BREAK.

B! g3.0

The message Diagnostic... displays.