All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <dan@debian.org>
To: 271069-submitter@bugs.debian.org, 271069@bugs.debian.org,
	user-mode-linux-devel@lists.sourceforge.net
Subject: [uml-devel] Re: Debian bug 271069, gdb startup fails
Date: Sat, 13 Nov 2004 16:52:33 -0500	[thread overview]
Message-ID: <20041113215233.GA31209@nevyn.them.org> (raw)
In-Reply-To: <20041113211443.GA27963@nevyn.them.org>

On Sat, Nov 13, 2004 at 04:14:43PM -0500, Daniel Jacobowitz wrote:
> History:
>   http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=271069
> 
> I've been looking at this bug.  I've already fixed the EINTR problem;
> I didn't see your patch (not sure why the BTS didn't forward it to me).
> But 2.6.10-rc1 does the same thing outside of UML, so I needed to fix
> it anyway.
> 
> However, GDB startup still fails in UML using './linux debug'.  Here's
> what happens:
> 
> - GDB forks
> - the child issues TRACEME
> - GDB waits for it, successfully now that EINTR is handled
> - GDB issues PTRACE_SETOPTIONS (returns -EINVAL because the proxy
>   does not support it)
> - GDB decides that the feature isn't available (good so far; it isn't)
> - GDB tries to clean up.  It sends PTRACE_KILL to the child it forked.
> - GDB waits for the child to exit.  Which it never does.
> 
> I imagine the proxy is just not able to cope with this.  It certainly
> doesn't look as if it can.  For instance, arg2 is completely ignored
> except for PTRACE_ATTACH; I think what has happened is that the
> PTRACE_KILL was sent to the wrong process.  And the waitpids are
> probably waiting for the wrong process too.
> 
> I think the only way to fix this is to teach the UML proxy to get out
> of the way if the pid is not the expected one, for at least PTRACE_KILL
> and waitpid; but it should probably continue to return failure for
> PTRACE_SETOPTIONS.

Actually, while the proxy probably should be fixed anyway, I've worked
around this in GDB.  It will be in the Debian 6.3-2 packages, which I'm
working on right now.

Should "kill" work from the GDB prompt?  If so, that does need some
work in the proxy.

-- 
Daniel Jacobowitz


-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

  reply	other threads:[~2004-11-13 21:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-13 21:14 [uml-devel] Debian bug 271069, gdb startup fails Daniel Jacobowitz
2004-11-13 21:52 ` Daniel Jacobowitz [this message]
2004-11-18  2:43 ` Jeff Dike
2004-11-18  0:47   ` Daniel Jacobowitz
2004-11-18  4:53     ` Jeff Dike

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=20041113215233.GA31209@nevyn.them.org \
    --to=dan@debian.org \
    --cc=271069-submitter@bugs.debian.org \
    --cc=271069@bugs.debian.org \
    --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.