ptrace bug

Chris Quenelle cquenel at polyslo.CalPoly.EDU
Fri Apr 14 19:42:59 AEST 1989


DISCLAIMER!

Flame me for an inappropriate posting if you have to, because
I know that there are other channels for this. But it is
so frustrating that I had to post.  (It's 2:30 am, so my
frustration tolerance level may be low :-).

I'm sorta posting this because it's probably the fastest
way to get Carl G.'s attention, and he will know who
to poke with it (If you poke Roy Clark, Carl, say hi for me :-).

I am writing a program on a Pyramid 98x.  The program 
repeatedly calls ptrace() to single-step a process
and read consecutive values of gr15 (the program counter).

I am tracing a program that normally executes 16 instructions.
We have the kernel debugger installed.

The following problem manifests when I try to read
  the program counter (register gr15) from the process
  being traced.

The problem:

	About 50% of the time, my program will
	cause our machine to drop into the kernel
	debugger and hang the entire system.
	
	(Luckily I'm in the same room as the console
	and can run over and hit "exit", and everything
	continues where it left off, the users just
	get hung for few seconds.)
	
	Anyway, the console says:
	
	Sys debug (cpu 0): unexpected step call from (ff005274)  _syscall
	Pid 2daf (proc[94])  [cpyr], inode 3c18, dev 818
	<dbg> exit

	"cpyr" is the name of the program being traced.
	The machine seems to hang when I try to read the
	gr15 value after executing the ret instruction
	at 00000080.

	If I continue from the kernel debugger, everything
	finishes okay.  I get a trace of 00000068, 006c, 0070
	and then the process exits.


  (...)
 00000060: 4040003e   _exit:       call     __cleanup,tr14
 00000068: 01000431                movw     pr0,tr1
 0000006c: 11000070                movw     $1,tr0
 00000070: 2060003e                callk    $0,tr14
 00000078: 00000000                halt     
  (...)
 00000080: 50900fc0   __cleanup:   ret      tr15,(gr0)
                                   ---
 00000084: 00000000                halt     




	Question:  Will the problem go away if we un-install
	the kernel debugger, or will the machine just crash ?

	--chris

Nobody said computers were going to be polite!

-- 
@---@  -----------------------------------------------------------------  @---@
\. ./  |cquenel at polyslo.calpoly.edu It is inconceivable that this could|  \. ./
 \ /   |be due to anything but nuclear processes. -- Fleischmann & Pons|   \ / 
==o==  -----------------------------------------------------------------  ==o==



More information about the Comp.sys.pyramid mailing list