All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian McDonald <imcdnzl@gmail.com>
To: UML Developer <user-mode-linux-devel@lists.sourceforge.net>
Subject: [uml-devel] Problems with UML on Debian Sarge 64 host
Date: Thu, 14 Apr 2005 16:25:18 +1200	[thread overview]
Message-ID: <cbec11ac0504132125779afc07@mail.gmail.com> (raw)

[-- 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, ...)

             reply	other threads:[~2005-04-14  4:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-14  4:25 Ian McDonald [this message]
2005-04-14  4:27 ` [uml-devel] Re: Problems with UML on Debian Sarge 64 host 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cbec11ac0504132125779afc07@mail.gmail.com \
    --to=imcdnzl@gmail.com \
    --cc=user-mode-linux-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.