All of lore.kernel.org
 help / color / mirror / Atom feed
* [uml-devel] Debian bug 271069, gdb startup fails
@ 2004-11-13 21:14 Daniel Jacobowitz
  2004-11-13 21:52 ` [uml-devel] " Daniel Jacobowitz
  2004-11-18  2:43 ` [uml-devel] " Jeff Dike
  0 siblings, 2 replies; 5+ messages in thread
From: Daniel Jacobowitz @ 2004-11-13 21:14 UTC (permalink / raw)
  To: 271069-submitter, 271069, user-mode-linux-devel

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.

-- 
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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-11-18  2:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-13 21:14 [uml-devel] Debian bug 271069, gdb startup fails Daniel Jacobowitz
2004-11-13 21:52 ` [uml-devel] " Daniel Jacobowitz
2004-11-18  2:43 ` [uml-devel] " Jeff Dike
2004-11-18  0:47   ` Daniel Jacobowitz
2004-11-18  4:53     ` Jeff Dike

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.