From:	CRDGW2::CRDGW2::MRGATE::"SMTP::CRVAX.SRI.COM::RELAY-INFO-VAX"  3-MAR-1992 23:06:24.58
To:	ARISIA::EVERHART
CC:	
Subj:	MWAIT V1.06, part 5 of 7

From:	RELAY-INFO-VAX@CRVAX.SRI.COM@SMTP@CRDGW2
To:	Everhart@Arisia@MRGATE

Received:  by crdgw1.ge.com (5.57/GE 1.123)
	 id AA21297; Tue, 3 Mar 92 22:36:43 EST
Message-Id:  <9203040336.AA21297@crdgw1.ge.com>
Received: From SUN2.NSFNET-RELAY.AC.UK by CRVAX.SRI.COM with TCP; Tue,  3 MAR 92 17:32:13 PST
Received: from ncdlab.ulcc.ac.uk by sun2.nsfnet-relay.ac.uk via JANET 
          with NIFTP id <3509-7@sun2.nsfnet-relay.ac.uk>;
          Tue, 3 Mar 1992 08:48:38 +0000
Date: Tue, 3 Mar 92 8:27 GMT
From: Nick de Smith <NICK@ncdlab.ulcc.ac.uk>
To: INFO-VAX <@nsfnet-relay.ac.uk:INFO-VAX@KL.SRI.com>
Subject: MWAIT V1.06, part 5 of 7

-+-+-+-+-+-+-+-+ START OF PART 5 -+-+-+-+-+-+-+-+
XLef`09Local event flag wait. The process is waiting for one or more local
X`09event flags to be set. The program displays the event flag cluster
X`09number - 0 (0-31) or 1 (32-63).
X`09If more than one EFN is being waited for, the process is waiting for
X`09any of the EFNs to be set, unless the "All EFNs" text appears, in
X`09which case all the specified EFNs must be set for the wait to complete.
XLefo`09Local evet flag wait (outswapped).
XHib`09Hibernating. The process has used $HIBER. Use of $WAKE or $SCHDWK will
X`09restart the process.
XHibo`09Hibernating (outswapped).
XSusp`09Suspended. The process has used, or been subject to, $SUSPND. Use of
X`09$RESUME will restart the process.
XSuspo`09Suspended (outswapped).
XFpg`09Free page wait. Process has requested a physical page to be added to i
Vts
X`09working set, and no pages are on the free page list. When a page is
X`09available, the process becomes COM or COMO.
XCom`09Compute wait. The process wants to use a CPU, but none is currently
X`09available.
XComo`09Compute wait (outswapped).
XCur`09The current process.
X
X
X
X2. Table of system resource wait states
X---------------------------------------
X
XText`09Description
X-------`09-----------
XRW???`09Unknown resource wait state. Should never occur.
X
XRWAST`09Any number of things! See below. Note that some RWAST states,
X`09particularly those related to devices such as TK50s, can be caused by
X`09hardware/microcode faults on the drive or controller, and may only be
X`09cleared by a system re-boot/power off or by calling an engineer. There
X`09is NO magic bullet for all RWAST situations.
X
XRWMBX`09Mailbox full. The process has tried to write to a mailbox that is fu
Vll
X`09or has insufficient buffer space. See below for messages that detail the
X`09cause of this wait state.
X
XRWNPG`09Non-paged dynamic memory. Process was unsuccessful in allocating som
Ve
X`09NPP space. Should be a very rare wait.
X
XRWPAG`09Paged dynamic memory. Process was unsuccessful in allocating some
X`09paged pool. This can be generated by XQP. Use the SDA command
X`09"EXAMINE @AP+4" to return the number of bytes being requested. DEC
X`09recommend that you keep 40% of paged dynamic memory free. The SYSGEN
X`09parameter PAGEDYN (amongst others) controls this pool.
X
XRWMPE`09Modified page list empty. Process is waiting for the modified page
X`09writer to signal that it has flushed the modified page list. OPCRASH
X`09does this to wait prior to stopping the system.
X
XRWMPB`09Modified page writer busy. The process has faulted a modified page o
Vut
X`09of its working set, and either a) The modified page list already
X`09contains more than MPW_WAITLIMIT, or b) The modified page list contains
X`09more that MPW_LOWLIMIT pages and the modified page writer is busy.
X`09Processes should not remain in RWMPB very long. If they do, it may be
X`09that a page file has become full, or that the paging disk is extremely
X`09busy or has gone into mount verification.
X
XRWSCS`09Distributed lock manager wait. The process is waiting for a response
X`09from a remote cluster node that has information about a particular lock.
X
XRWCLU`09Cluster transition. The process has requested a lock on a node that
V is
X`09in transition (being added or removed from the cluster). The process
X`09will remain in this state until the cluster stabilises.
X
XRWCAP`09CPU capability wait. The process in computable, and has requested
X`09specific CPU capabilities that its current CPU cannot offer. The process
X`09is rescheduled to run on a CPU that has the right SMP characteristics.
X`09This is used when cluster quorum has been lost.
X
XRWCSV`09Cluster server process. The limit of outstanding requests from one
X`09cluster member to another's server process has been reached, and this
X`09process has also requested a service of that node. It may also be that
X`09the CLUSTER_SERVER process has problems. This process should be in a HIB
X`09state - if it isn't then that may be the cause of the problem. If the
X`09CLUSTER_SERVER process is not running, use the commands:
X`09"@SYS$SYSTEM:STARTUP CSP" to (re)start the server.
X
XSNPFU`09Snapshot rollout/rollin. Should never happen on a normal VMS system.
X
XRWPFF`09Page file full (*).
XRWBRK`09Breakthrough (*).
XRWIMG`09Image activation lock (*).
XRWQUO`09Job Pooled quota (*).
XRWLCK`09Lock identifier (*).
XRWSWP`09Swap file space (*).
X
X(*) Means "Not currently used".
X
X
X2.1 RWAST causes
X----------------
XWhen an RWAST condition is detected, MWAIT attempts to determine the cause.
XThere are only a few threads in VMS that can cause an RWAST. One or more of
V the
Xfollowing messages may be displayed. If the process header is resident, then
V a
Xregister dump is given. Subsequent messages may refer to these register valu
Ves.
X
XNote: When a process is in RWAST it can be very unwise to use SDA to try to
Xexamine memory in that process's address space as the process running SDA ma
Vy
Xalso hang. For this reason, MWAIT does not read any data from the target
Xprocess's P0 or P1 space - only executive data is used. Be particularly care
Vful
Xwhere MWAIT gives messages relating to channels - try not to use SDA SHOW
XPROCESS/CHANNELS or SDA FORMAT CCB etc on a process in RWAST.
X
Xa. "Process resource wait is DISABLED"
X   "Process resource wait is ENABLED"
X   "Process is marked for deletion"
X`09These are information only messages about the state of the process.
X`09The setting of the process's resource wait state does not normally
X`09affect an RWAST condition, except in a very few cases (see 'j' and 'k').
X
Xb. "Process has no DIO left (DIOCNT zero)"
X`09The process needs to perform a direct I/O operation, and no quota is
X`09left for it. The process may remain in RWAST until one of the
X`09outstanding direct I/O operations completes. Increase the UAF parameter
X`09DIOLM and/or the SYSGEN parameter PQL_DDIOLM.
X
Xc. "Process has no BIO left (BIOCNT zero)"
X`09The process needs to perform a buffered I/O operation, and no quota is
X`09left for it. The process may remain in RWAST until one of the
X`09outstanding buffered I/O operations completes. Increase the UAF
X`09parameter BIOLM and/or the SYSGEN parameter PQL_DBIOLM.
X
Xd. "Process has 'a'. outstanding DIO operations (DIOCNT: 'c'., DIOLM: 'l'.)
X   "Process has 'a'. outstanding BIO operations (BIOCNT: 'c'., BIOLM: 'l'.)
X`09An operation has been requested that requires that all outstanding I/O
X`09is completed first. The process may remain in RWAST untill all I/O has
X`09completed. There are 'a' operations of the specified type still
X`09outstanding. A maximim of 'c' others could be made active at the same
X`09time up to a total of 'l'.
X
Xe. "Process has 'l'. live sub-processes"
X`09Process deletion cannot be completed until all sub-processes owned by
X`09this process have successfully terminated.
X
Xf. "Process has 'a'. outstanding XQP events"
X`09Process deletion and suspension require that all outstanding XQP
X`09activity is completed first. PCB$B_DPC contains a count of events that
X`09can stop a delete or suspension. Currently its only used by XQP and is
X`09incremented at the start and decremented at the end of an operation.
X
Xg. "Process has no AST entries left (ASTCNT zero)"
X`09The process needs an AST, and no quota is available. Increase the UAF
X`09parameter ASTLM and/or the SYSGEN parameter PQL_DASTLM.
X
Xh. "Process has 'n'. outstanding ASTS active (ASTCNT: 'c'. ASTLM: 'l'.)
X`09The process has 'n' outstanding ASTs waiting for delivery. A total
X`09of 'c' ASTs can still be allocated and the maximum allowed active at
X`09any one time is 'l'.
X
Xi. "$DASSGN while channel busy: R5 = channel, R6 = CCB"
X    (Channel: 'c')
X`09A channel deassign cannot complete until operations on that channel
X`09have completed. If the device is network related, ie. is an RTAn: or
X`09NETu: etc. device, you can often use NCP SHOW KNOW LINKS to identify
X`09the DECnet link associated with the device, and then use NCP DISCONNECT
X`09LINK 'n' to delete the link and thus the errant device. This often also
X`09clears the RWAST condition.
X`09Activity on a channel is indicated by CCB$W_IOC being non-zero.
X`09You can use SDA on the process to identify the detail on the CCB
X`09pointed to by R6 (or use the channel number in R5 or from "c") using
X`09the command "SDA> SHOW PROCESS/IDENT=pid/CHANNEL". The number of
X`09outstanding operations is given by the SDA commands:
X`09`09SDA> SET PROCESS /IDENT=pid
X`09`09SDA> READ SYS$SYSTEM:SYSDEF
X`09`09SDA> EXAMINE @R6+CCB$W_IOC
X`09The count is then the low 16 bits of the displayed value. Note the
X`09caveat above about using SDA on processes in RWAST. The PC is in
X`09EXE$DASSGN.
X
Xj. "Quota: R1 = quantity, R2 = address, R3 = width(bits)
X    (Requested: 'r'. units, Available: 'c'. units)"
X    `5Bother text`5D
X`09The process has run out of a quota. R1 contains the number of units
X`09of quota that are required, R2 points to the quota field in system
X`09memory, and R3 contains the field width in bits. The process will remain
X`09in RWAST until the quota request is satisfied. A previous message will
X`09detail which quota is exhausted, and you can use SDA to confirm the
X`09cause (see the example above). If previous messages imply that more than
X`09one quota has been exhausted and no "`5Bother text`5D" message was displa
Vyed
X`09identifying the major culprit, use the SDA commands:
X`09`09SDA> SET PROCESS/IDENT=pid
X`09`09SDA> READ SYS$SYSTEM:SYSDEF
X`09`09SDA> SHOW PROCESS`09! Note the PCB, PHD and JIB addresses
X`09`09SDA> FORMAT pcb_address`09! ...and jib_address and phd_address
X`09Note which of the format commands displays an address that matches the
X`09contents of R2 (from the registers display), and that will be the
X`09exhausted quota that is causing the wait. The RWAST has been caused by
X`09a request for 'r' units of quota when the process only has 'c' units
X`09left. Using "SET PROCESS/NORESOURCE_WAIT" will prevent this RWAST
X`09state, and cause an error to be returned to the process instead. The PC
X`09is in EXE$SNGLEQUOTA or EXE$MULTIQUOTA.
X`09
Xk. "$CANCEL needs BIOCNT: R5 = UCB, R6 = CCB, R7 = channel
X    (Device: devu:, Channel: 'c')"
X`09A cancel operation on a channel needs a buffered I/O operation, and
X`09that quota is exhausted. The channel is given by "c" and the device name
X`09by "devu:". Using "SET PROCESS/NORESOURCE_WAIT" will prevent this RWAST
X`09state, and cause an error to be returned to the process instead. The
X`09PC is in EXE$CANCEL.
X
Xl. "$DELPRC subprocesses active: R4 = PCB"
X`09To delete a process, all its subprocesses must also be deleted. The
X`09process will remain in RWAST until all its subprocesses have terminated.
X`09The count of subprocesses is in the field PCB$W_PRCCNT. You can use
X`09SDA to inspect this field using the PCB address from R4, however this
X`09value is also displayed by the message in 'e' above. The PC is in
X`09EXE$DELPRC. Use SDA or a DCL procedure to locate the processes owned
X`09by the hung process (the PCB$L_OWNER field should contain the EPID
X`09of the hung process).
X
Xm. "$DELPRC XQP still active: R4 = PCB"
X`09To delete a process, all XQP activity must have ceased. The process
X`09will remain in RWAST until PCB$B_DPC becomes zero. See 'f' above.
X`09The PC is in EXE$DELPRC.
X
Xn. "$SUSPND XQP still active: R4 = PCB"
X`09A process cannot be suspended until all XQP activity has completed.
X`09See "f" above. The PC is in EXE$SUSPND.
X
Xo. "EXE$QIO access/deaccess pending: R4 = PCB, R5 = UCB, R7 = CCB
X    (Device: devu:)"
X`09A $QIO request has been made to a channel that has a pending access
X`09or deaccess request to the device called "devu:". This must be allowed
X`09to complete before retrying the I/O operation. The PC is in EXE$QIO.
X
Xp. "$PROCESS_SCAN context busy"
X`09The context block required by EXE$PSCAN_LOCKCTX is busy. The process
X`09will wait until its free.
X
Xq. "DIO active when PFN mapped page deleted: R2 = VA, R3 = SAVPTE, R4 = PCB"
X`09Some DIO was outstanding when a deleting a page mapped by PFN. The
X`09process will wait until all direct I/O has completed. The PC is in
X`09MMG$DELPAG.
X
Xr. "Process header is not resident"
X`09As the process header is not resident in physical memory, the process's
X`09registers and AST quota are not available. Therefore no analysis of the
X`09executive thread causing the RWAST is possible.
X
Xs. "PC is at nnDRIVER+xxxx"
X`09The PC does not lie in a VMS loadable executive image, but in the named
X`09driver at the specified offset. Certain drivers, such as LTDRIVER, use
X`09the ASTWAIT state to stall processes while events complete. It is beyond
X`09the scope of this program to document every ASTWAIT occurrance in every
X`09driver as some drivers on your system may not be supplied by DEC. You
X`09must use your judgement in this case.
X
Xt. "Can't calculate reason from PC"
X`09This message is displayed when either the change mode vectors could not
X`09be located (see below) and the PC was in one of the recognised threads,
X`09or when the PC is in a totally unrecognised location. I suggest
X`09you use SDA to locate the PC in these cases, or contact DEC if MWAIT
X`09has not already provided enough information.
X
Xu. "%MWAIT-W, CHMK vector not found"
X`09The change mode to kernel vector was not found, and therefore no PC
X`09resolution on executive threads that lie in system services that operate
X`09in kernel mode can be carried out. The message implies that you are
X`09using incompatable versions of VMS and MWAIT. Contact the author.
X
Xv. "%MWAIT-W, CHME vector not found"
X`09The change mode to executive vector was not found, and therefore no PC
X`09resolution on executive threads that lie in system services that operate
X`09in executive mode can be carried out. The message implies that you are
X`09using incompatable versions of VMS and MWAIT. Contact the author.
X
Xw. "%MWAIT-W, Failed to locate image EXCEPTION.EXE"
X`09This should never happen. It means that the executive loadable image
X`09"EXCEPTION.EXE" could not be located in the list of loaded images.
X`09If this happens, there is something really strange with your system.
X
Xx. "%MWAIT-W, Illegal vector (not known format) xxxxxxxx:
X    'text'"
X`09A vector was not in one of the known formats, and therefore its real
X`09PC (in the executive) could not be resolved. The 'text' string will
X`09identify the vector entry that was invalid, and the hexadecimal number
X`09'xxxxxxxx' is the contents of the unrecognised entry. Contact the
X`09author.
X
X
X2.2 RWMBX causes
+-+-+-+-+-+-+-+-  END  OF PART 5 +-+-+-+-+-+-+-+-

