All of lore.kernel.org
 help / color / mirror / Atom feed
* [uml-devel] Problems with UML on Debian Sarge 64 host
@ 2005-04-14  4:25 Ian McDonald
  2005-04-14  4:27 ` [uml-devel] " Ian McDonald
  2005-04-14 21:07 ` [uml-devel] " Blaisorblade
  0 siblings, 2 replies; 8+ messages in thread
From: Ian McDonald @ 2005-04-14  4:25 UTC (permalink / raw)
  To: UML Developer

[-- Attachment #1: Type: text/plain, Size: 1180 bytes --]

Hi there,

In my continuing saga (which some are becoming familiar with) to get
UML 2.6.x working at all I have been given access to another machine
to develop on and my old machine is going to disappear.

This machine is Debian Sarge with gcc 3.3.5 on an AMD64 with 32 bit
userspace although 64 bit compiles can also occur.

I am doing all my UML builds with ARCH=um SUBARCH=i386 at this point in time.

The problem is that my bootup dies very early on and this is the total output:
Checking for /proc/mm...not found
Checking PROT_EXEC mmap in /tmp...OK
tracing thread pid = 20981
OP_FORK failed to attach pid

I suspect that this is something to do with my mixed 32/64 bit
environment but I am not sure... Can anybody shed some light on this?

BTW I have also written a patch which I think is worth submitting into
the kernel tree as it gives better debugging of error messages in
arch/um/kernel/tt/tracer.c for where my process is dying.

When I run with my patch it shows that it is dying on the
PTRACE_ATTACH with an error EPERM but I can run other processes etc
like gdb which attach to processes.

Any help would be greatly appreciated.

Ian

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: tracer.diff --]
[-- Type: text/x-patch; name="tracer.diff", Size: 1249 bytes --]

--- arch/um/kernel/tt/tracer.c.sav	2005-04-14 15:02:50.000000000 +1200
+++ arch/um/kernel/tt/tracer.c	2005-04-14 15:45:13.151868552 +1200
@@ -68,14 +68,17 @@
 
 void attach_process(int pid)
 {
-	if((ptrace(PTRACE_ATTACH, pid, 0, 0) < 0) ||
-	   (ptrace(PTRACE_CONT, pid, 0, 0) < 0))
-		tracer_panic("OP_FORK failed to attach pid");
+	int err;
+
+	if (!(err = ptrace(PTRACE_ATTACH, pid, 0, 0)))
+		tracer_panic("OP_FORK: PTRACE_ATTACH failed, pid = %d, err = %d\n", pid, -err);
+	if (!(err = ptrace(PTRACE_CONT, pid, 0, 0)))
+		tracer_panic("OP_FORK: PTRACE_CONT failed, pid = %d, err = %d\n", pid, -err);
 	wait_for_stop(pid, SIGSTOP, PTRACE_CONT, NULL);
-	if (ptrace(PTRACE_OLDSETOPTIONS, pid, 0, (void *)PTRACE_O_TRACESYSGOOD) < 0)
-		tracer_panic("OP_FORK: PTRACE_SETOPTIONS failed, errno = %d", errno);
-	if(ptrace(PTRACE_CONT, pid, 0, 0) < 0)
-		tracer_panic("OP_FORK failed to continue process");
+	if (!(err = ptrace(PTRACE_OLDSETOPTIONS, pid, 0, (void *)PTRACE_O_TRACESYSGOOD)))
+		tracer_panic("OP_FORK: PTRACE_SETOPTIONS failed, pid = %d, err = %d\n", pid, -err);
+	if (!(err = ptrace(PTRACE_CONT, pid, 0, 0)))
+		tracer_panic("OP_FORK: PTRACE_CONT (2) failed, pid = %d, err = %d\n", pid, -err);
 }
 
 void tracer_panic(char *format, ...)

^ permalink raw reply	[flat|nested] 8+ messages in thread
[parent not found: <CBELIFGMBIEPIEOFCJFAMEFLCAAA.brocka@sterlingcgi.com>]

end of thread, other threads:[~2005-04-20 15:48 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-14  4:25 [uml-devel] Problems with UML on Debian Sarge 64 host Ian McDonald
2005-04-14  4:27 ` [uml-devel] " Ian McDonald
2005-04-14 21:07 ` [uml-devel] " Blaisorblade
2005-04-15  4:56   ` Ian McDonald
2005-04-19 16:05     ` Blaisorblade
2005-04-20  1:51       ` Ian McDonald
2005-04-21 15:47         ` Blaisorblade
     [not found] <CBELIFGMBIEPIEOFCJFAMEFLCAAA.brocka@sterlingcgi.com>
2005-04-17 17:32 ` Blaisorblade

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.