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 #20 received at 10580 <at> debbugs.gnu.org (full text, mbox):

From: Dov Grobgeld <dov.grobgeld <at> gmail.com>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 10580 <at> debbugs.gnu.org
Subject: Re: bug#10580: 24.0.92; gdb initialization takes more than one minute
	at 100% CPU
Date: Wed, 25 Jan 2012 11:39:25 +0200
[Message part 1 (text/plain, inline)]
More tests.

1. I was mistaken in my previous email, the CPU spending was triggered
before gdb-mode-hook.
2. The following command in gdb-input starts the 40s 100% CPU:

  (process-send-string (get-buffer-process gud-comint-buffer)
               (concat command "\n")))

where command="1-inferior-tty-set /dev/pts/9". Note that the command
returns immediately, but some other thread apparently gets very busy.

Is this enough info, or do you want me to probe deeper?

On Wed, Jan 25, 2012 at 10:49, Dov Grobgeld <dov.grobgeld <at> gmail.com> wrote:

> Here are some more tests:
>
> 1. It doesn't get stuck when debugging a "hello-world.c" program. Thus it
> depends on the executable.
> 2. Regarding toggle-debug-on-quit and C-g, it doesn't work. No backtrace
> is produced and the CPU continues to be at 100%.
> 3. I tried running edebug on gdb, which wasn't easy. I had to manually
> first do eval-buffer on gdb-mi.el and gud.el. But in the end I managed and
> found that the CPU is spend during (run-hooks 'gdb-mode-hook) . I'll try to
> investigate it further in the next few days.
>
> Regards,
> Dov
>
> On Wed, Jan 25, 2012 at 02:37, Glenn Morris <rgm <at> gnu.org> wrote:
>
>>
>> >> I tried again with emacs -Q and the same thing happens. To be more
>> >> precise the startup time is about 40s at 100% CPU.
>>
>> Is this with everything you try to debug, or just certain things?
>>
>> Can you try M-x toggle-debug-on-quit, then interrupt Emacs with ctrl-g
>> during those 40 seconds and see if you get a backtrace?
>>
>> Or try M-x edebug-defun on the `gdb' function, step through it, and see
>> what is taking the time.
>>
>> Guesses: do you have a huge .gdb_history or ~/.gdbinit file?
>>
>
>
[Message part 2 (text/html, inline)]

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.