HP3000-L Archives

September 1995, Week 3

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Mark Klein <[log in to unmask]>
Reply To:
Mark Klein <[log in to unmask]>
Date:
Tue, 19 Sep 1995 09:13:23 PST
Content-Type:
text/plain
Parts/Attachments:
text/plain (52 lines)
Donald Timmonds Harrington ([log in to unmask]) wrote:
: We have an application that does _a_lot_ of process handling.  A
: master process initiates sub-processes on other devices.  We also
: use a lot of message files.  Ever since going up on 5.0 push, we
: have been in situations, ocassionally, where the parent process has
: died (for whatever reason), but the child processes are still alive.
: This is seen by going into glance and looking at the session screen
: for the parent session - the parent process number has a priority of
: 0 (zero).
 
In our development and debugging phase, we often see cases where the
parent dies but the child lives. This can be caused by a number of
things. The most common is that the children are critical when the
parent isn't. The parent is actually still around (to a degree) waiting
for the sons to expire. This can be verified in the debugger as follows:
 
fv kso_pointer(44)+<suspect pin>*symlen('pib_type') 'pib_type.process_state'
 
This will show the state of the process (e.g. PROCESS_DYING or
PROCESS_ALIVE). This should be PROCESS_DYING. There is also a pointer to
the pibs of the childred, and you can chase the links (this macro
assumes you've got symbols already loaded):
 
macro ChaseProcessTree(Suspect = 0) {
 
  if (bound('Indent') <> 'VAR') then
    var Indent = 0
  else
    var Indent = Indent + 2;
 
  if (Suspect = 0) then
    loc Suspect pin;
 
  loc PIBPtr : sptr = kso_pointer(44) + !suspect * symlen('pib_type');
 
  while (PIBPtr <> sptr(0)) do {
    loc Sibling : sptr = symval(PIBPtr,'pib_type.sibling');
    loc PinNo          = symval(PIBPtr,'pib_type.pin');
 
    wl strrpt(' ',Indent),PinNo:'$,l,w4',' is ',
                   symval(PIBPtr,'pib_type.process_state');
 
    loc Child   : sptr = symval(pibptr,'pib_type.child');
    if (Child <> sptr(0)) then
      ChaseProcessTree(symval(Child,'pib_type.pin'));
 
    loc PIBPtr         = Sibling;
  };
 
  var Indent  = Indent - 2;
};

ATOM RSS1 RSS2