Subject: ptrace flaky?
To: None <tech-kern@netbsd.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: tech-kern
Date: 01/09/2000 13:52:25
I was using gdb and getting mysterious and baffling "Cannot allocate
memory" errors.  So I ktraced gdb...

 17311 gdb      CALL  ptrace(PT_READ_I,0x43a8,0x13670,0)
 17311 gdb      RET   ptrace -1 errno 12 Cannot allocate memory
 17311 gdb      CALL  ptrace(PT_READ_I,0x43a8,0x13670,0)
 17311 gdb      RET   ptrace -1 errno 12 Cannot allocate memory
 17311 gdb      CALL  ptrace(PT_READ_I,0x43a8,0x1366c,0)
 17311 gdb      RET   ptrace -804806588/0xd007a044

...WTF??  UTSLing seems to imply that this is a UVM problem; the only
way I can see that that ptrace call could possibly return ENOMEM is via
the call chain sys_procfs -> procfs_domem -> uvm_io -> uvm_map_extract.

I'm running 1999-08-13 code.  Do I just need to upgrade, or is it worse
than that?  If it's a resource shortage, it's a very transient one, and
I would say that something should be sleeping rather than failing if
that's the case.

					der Mouse

			       mouse@rodents.montreal.qc.ca
		     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B