Display information about all blocked threads.
Syntax:
────.PB ──────────────────────┬──────────┬──────────────────── ├── # ──┤ ├── * ──┤ └── slot ──┘
Parameters:
slot
The following short-hand may be used for the slot number:
_TaskNumber
If no slot number is given then all thread slots are displayed in slot number order.
Results & Notes:
The .PB command locates each thread's TCB from the thread slot table, the linear address of which is given by global variable:
_papTCBSlots
or by traversing the process tree using TCBpTCBNext (TCB +0x14), TCBpPTDA (TCB +0x08) and ptda_pTCBHead (PTDA + 0x20) fields.
Output is displayed only if a thread is blocked on a Block-Id. It appears in tabular form as follows:
Slot Sta BlockID Name Type Addr Symbol 0001 blk fff11050 *ager 0002 blk fff74f59 *tsd _tkTSDDaemon 0003 blk fff43c78 *ctxh _kmCTXHDaemon 0004 blk fff7545a *kdb _tkKDBDaemon 0005 blk fff02dfc *lazyw _semLW 0006 blk fff111d4 *asyncr _AsyncReadSem 0008 blk fffe000e pmshell RamSem 074b:06d6 000a blk ffca0002 pmshell 000b blk fffd000b pmshell MuxWait 000c blk fffd000c pmshell MuxWait 000d blk 04000df0 pmshell DosSem 0400:0df0 CtrlNumLkQ 0007 blk fe750a10 pmshell Sem32 8001 0019 vhevLazyWrite 0010 blk fe728dcc pmshell Sem32 8001 0001 SrvReq 0011 blk fffe0006 pmshell RamSem d0c7:0020 0012 blk fffd0012 pmshell MuxWait *0013 blk fffe0007 pmshell RamSem d09f:0bc0 memory_pool + 127 0014# blk fffe0008 pmshell RamSem d09f:0bc8 memory_pool + 12f
Each of the fields has the following meaning:
slot
This value may be flagged with:
to the left to signify the last dispatched
thread.
to the right to signify the Kernel Debugger
or Dump Formatter default thread slot.
Slot may be found in the TCBNumber (TCB + 0x2) field of the TCB
The BlockId is taken from TCBSleepID (TCB + 0x18c).
The BlockID is a conventional value. A number of conventions are used by various system components. Usually the BlockID is constructed so to be unique across all conventions. Frequently it will refer to the address of an associated resource, such as a system control block, or a field within a control block. See discussion of the Type field below for more information on interpreting BlockIds.
See name field description of the .P command for further information.
The following Types are recognised by the Dump Formatter and Kernel Debugger:
RamSem
The high word of the BlockID is 0xfffe, the low word is the RamSemID taken from the RamSem structure.
The Addr field is taken from TCB_SemInfo. This is a selector:offset address of the RAMSEM The RamSem may be imbedded within a FastSafeRamSem or a PMFastSafeRamSem.
The Symbol displayed is either that of the TCB_SemDebugAddr or if -1, the RamSem address. See LN command for information on displaying symbols.
The high word of the BlockID is 0xfffd, the low word is the slot of the waiting thread.
TCB_SemInfo and TCB_SemDebugAddr are not used with a MuxWait BlockID.
To locate the semaphores that comprise a given MuxWait proceed as follows:
For type 1 (SysSem)
Addr and Symbol fields are blank.
The BlockID is the Selector:Offset address of the request packet. The Selector is the DOSGROUP kernel selector and should be selector 400.
The address should lie between addresses at global symbols: FirstPacket and LastPacket.
See the Physical Device Driver Reference manual for information on device driver request packets.
Addr and Symbol fields are blank.
The BlockID is the Selector:Offset address of the SysSemTblStruc structure. The Selector is the DOSGROUP kernel selector and should be selector 400.
The address should lie within the System Semaphore Data Table, located at symbol SysSemDataTable for length 256*6 bytes.
Offset +0 of each table entry contains the owner's thread number.
The name associated with the semaphore may be located as follows:
See System Semaphore example debugging log for an explicit example of using this technique.
The Addr and Symbol fields are blank.
The BlockID is the selector:offset of the DosSem. The Selector is the DOSGROUP kernel selector and should be selector 400. The offset does not lie in the System Semaphore Data Table or the I/O Request Packet Table.
Addr is the BlockID formatted as selector:offset.
The Symbol displayed is either that of the TCB_SemDebugAddr or if -1, the DosSem address. See LN command for information on displaying symbols.
The BlockID is the address of the 32-bit Semaphore structure.
TCB_SemInfo contains the semaphore handle. This is of the form:
8001nnnn
The Symbol displayed is either that of the TCB_SemDebugAddr or if -1, the Sem32 address. See LN command for information on displaying symbols.
Use the .D SEM32 comand with the BlockID to format the 32-bit semaphore.
The BlockId is the selector:offset address of the buffer. The high word is the buffer selector and should be a8.
The Addr and Symbol fields are blank.
The BlockId is the selector:offset address of the SFT. The high word is the buffer selector and should be one that is listed in the SFT table pointed to by c0:0.
The Addr and Symbol fields are blank.
The high word of the BlockID is the ptda_Pid offset from selector 30 (0xffca).
The low word of the BlockID is the Pid to which this thread belongs.
Addr field is blank.
The Symbol displayed is either that of the TCB_SemDebugAddr or if -1, the Sem32 address. See LN command for information on displaying symbols.
The BlockID interpretation is not exact. A device driver, for example, could call DevHlp_ProcBlock using a value for BlockID that conflicts with another convention.
Under the Debug kernel only, TCB_SemDebugAddr is used to record the creator's address of kernel, system and RAM semaphores. If it is not used it is set to 0xffffffff.
ChildWait BlockIDs might be missed by the Dump Formatter and Kernel Debugger. Look out for BlockIDs of the form 0xffca????. ChildWait is correctly reported from fix pack 29 for Warp V3 and base Warp V4.
Some Sem32 BlockIDs are missed by the Dump Formatter. Check TCB_SemInfo for a 32-bit semaphore handle and BlockIDs of the form 0xfe??????
If BlockID is a linear address owned by ksem then the semaphore is a Kernel Semaphore. However, not every KSEM is owned ksem owned memory. Under the ALLSTRICT kernel, a KSEM may be readily identified from the first 4 bytes, which have the signature "KSEM" Under the RETAIL and HSTRICT kernels, the Blockid is chosen to be the address (or handle) of the KSEM. Under the ALLSTRICT kernel, Event KSEMs use the KSEM handle+4 as the BlockId. Use .D KSEM command with the BlockID to format a KSEM.
In general a BlockID will be chosen to be meaningful to the programs using it. Often it is an address of a resource that needs to be serialised. Where no other information is given one should try:
See Type field discussion above for more precise information.
See Type field discussion above for more precise information.