GNU bug report logs - #10580
24.0.92; gdb initialization takes more than one minute at 100% CPU

Previous Next

Package: emacs;

Reported by: Dov Grobgeld <dov.grobgeld <at> gmail.com>

Date: Sun, 22 Jan 2012 17:55:03 UTC

Severity: important

Tags: patch

Found in version 24.0.92

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


Message #44 received at 10580 <at> debbugs.gnu.org (full text, mbox):

From: Chong Yidong <cyd <at> gnu.org>
To: Dov Grobgeld <dov.grobgeld <at> gmail.com>
Cc: Glenn Morris <rgm <at> gnu.org>, 10580 <at> debbugs.gnu.org
Subject: Re: bug#10580: 24.0.92;
	gdb initialization takes more than one minute at 100% CPU
Date: Mon, 07 May 2012 10:53:52 +0800
Dov Grobgeld <dov.grobgeld <at> gmail.com> writes:

> The *input/output of a.out* is empty.
>
> It seems that I was wrong about read_key_sequence(). It doesn't
> "return early".

During this time, is Emacs responsive to user commands, i.e. does it
work normally apart from taking 100% CPU?  Or is it just unresponsive?

Also, what is your gdb version?

Also, please set a breakpoint at process.c:4896, which should be the
line

		  struct Lisp_Process *p = XPROCESS (proc);

as well as the function exec_sentinel().  See if Emacs hits each
breakpoint, and step through it for the next several steps.  In
exec_sentinel, please show the Lisp values of the `proc' and `reason'
variables (i.e. `pp proc' and `pp reason'.)

Basically, gdb-mi.el allocates a pty and passes it to the gdb process,
which hooks the pty up to the debugged process's input/output.  That's
what the "1-inferior-tty-set /dev/pts/9" gdb command does.  Emacs then
listens for input/output on the pty.  Recently I fixed a bug in which
Emacs would use 100% CPU due to Emacs getting an EIO error on that pty
and then spinning; this fix involved setting up a sentinel that closes
the pty when Emacs gets EIO; it's possible the fix is not working for
you, though I don't know why.  The other possibility is that the program
you are debugging does something strange with its input/output stream.

Thanks.




This bug report was last modified 12 years and 74 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.