Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* dbx weirdness with fork(2)
@ 1995-11-17  5:00 Roger D. Gough
  1995-11-21  5:00 ` Brian S Hiles 
  0 siblings, 1 reply; 3+ messages in thread
From: Roger D. Gough @ 1995-11-17  5:00 UTC (permalink / raw)


I've just experienced a bizarre problem with dbx on a DEC Alpha
(OSF/1).  Usually, upon stepping over a fork(2), dbx kindly tells me
that a new child has been created, complete with PID, whereupon I can
do all kinds of mean and nasty things.  Now, however, after working
once with the same program (honest!), dbx hangs in the fork.  If I
step through the machine code, I get SIGTRAP at the call_pal
instruction.  After this, I cannot even kill dbx: ps says it's an
'uninterruptable sleeping process'.  Any ideas, folks?

Roger D. Gough
1156 Hightop Road, Suite 102
Blacksburg, VA 24060-9617 USA
Voice, Fax: +1 540.953.0221
http://www.bnt.com/~open/systems




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: dbx weirdness with fork(2)
  1995-11-17  5:00 dbx weirdness with fork(2) Roger D. Gough
@ 1995-11-21  5:00 ` Brian S Hiles 
  1995-11-21  5:00   ` Peter Thompson
  0 siblings, 1 reply; 3+ messages in thread
From: Brian S Hiles  @ 1995-11-21  5:00 UTC (permalink / raw)


Roger D. Gough (rgough@bev.net) wrote:
: I've just experienced a bizarre problem with dbx on a DEC Alpha
: (OSF/1).  Usually, upon stepping over a fork(2), dbx kindly tells me
: that a new child has been created, complete with PID, whereupon I can
: do all kinds of mean and nasty things.  Now, however, after working
: once with the same program (honest!), dbx hangs in the fork.  If I
: step through the machine code, I get SIGTRAP at the call_pal
: instruction.  After this, I cannot even kill dbx: ps says it's an
: 'uninterruptable sleeping process'.  Any ideas, folks?

SIGTRAP is the mechanism used internally to do process tracing. The
"uninterruptability" is derived from the fact the it is being blocked
in a high-level system call. Are you using "sproc"? (I am unfamiliar 
with OSF.alpha -- sorry). On some systems, a program called "dbxhang"
is provided for just this contigency. This is probably not enough info;
but perhaps some dbx guru "out there" with deign to reply?

-Brian



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: dbx weirdness with fork(2)
  1995-11-21  5:00 ` Brian S Hiles 
@ 1995-11-21  5:00   ` Peter Thompson
  0 siblings, 0 replies; 3+ messages in thread
From: Peter Thompson @ 1995-11-21  5:00 UTC (permalink / raw)


I've taken this offline with Roger.  We haven't really determined why 
dbx hangs in the fork just yet.  The SIGTRAP he saw was just an artifact of
stepping through the system call code, at least that
seems the most likely explanation.  Just to give an inside view of
what dbx does for forks (and this may yet change as things mature)
it first sets up a stop on syscall for fork and vfork.  This 
allows dbx to recognize the fork call in the first place.
Dbx at this point looks at a few things to decide whether or
not it really wants to break on this fork (system calls that 
fork are not really wanted.)  If it is a reasonable fork
call, we set up a trap on the syscall exit and let fork
do what it is supposed to do.  When it finishes, dbx
attaches to the process, tells it to stop, advances
it past the fork call, and then announces that there is
a new child.  It seems that this process is breaking down 
somewhere in fork itself, or possibly in attaching and
stopping the child process, which is more likely what is
happening in my guess.  So far I don't have quite enough to pin
this down, but I'm looking into it.

PeterT



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1995-11-21  5:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1995-11-17  5:00 dbx weirdness with fork(2) Roger D. Gough
1995-11-21  5:00 ` Brian S Hiles 
1995-11-21  5:00   ` Peter Thompson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox