[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GC bug?
From: |
Stephen Berman |
Subject: |
Re: GC bug? |
Date: |
Mon, 24 Oct 2005 01:33:09 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
On Sat, 22 Oct 2005 11:51:30 -0400 "Richard M. Stallman" <address@hidden> wrote:
[Stephen Berman wrote:]
> I made a diary entry and then called calendar and Emacs immediately
> hung or went into an infinite loop, presumably in diary-list-entries,
> since the last message was "Preparing diary...". I could get out of
> the loop by typing C-g.
It has happened again (in a different Emacs session, I had to close the
one where it happened before). Here are the particular circumstances,
FWIW: I have a file which is an #include in my ~/diary. Currently
this file is changed but not saved. When I type `d'
(diary-view-entries) in Calendar on the date which is the date of the
last entry in the unsaved included file, Emacs goes into an infinite
loop, as described above. If I type `d' on any other date in
Calendar, there is no problem. Also, if I save the included file and
then type `d' on the date of its last entry, there is no problem.
> Then it probably isn't a GC bug. It is probably an infinite loop
> that does a lot of consing and therefore frequently GCs.
>
> I suggest you stop it outside GC with a breakpoint at Fgarbage_collect
> and then type `finish' to get over the GC. Then please follow the
> methods suggested in etc/DEBUG for debugging infinite loops.
I tried to do this. Fgarbage_collect is called at several places in
the Emacs C sources, but I assume you mean the invocation in alloc.c,
so that's where I put the breakpoint. When I set the breakpoint
before inducing the infinite loop, then gdb hits the breakpoint
immediately, so I cannot induce loop. So I first induced the loop and
then set the breakpoint, and this is the result:
(gdb) c
Continuing.
[1]+ Stopped gdb emacs 16198
address@hidden:~> fg
gdb emacs 16198
Program received signal SIGINT, Interrupt.
[Switching to Thread 1084223872 (LWP 16198)]
Flooking_at (regexp=144421059) at search.c:354
354 return looking_at_1 (regexp, 0);
(gdb) break /home/steve/cvsroot/emacs/src/alloc.c:Fgarbage_collect
Breakpoint 1 at 0x813d4fc: file alloc.c, line 4695.
(gdb) finish
Run till exit from #0 Flooking_at (regexp=144421059) at search.c:354
Ffuncall (nargs=2, args=0xbfe57660) at eval.c:2870
2870 goto done;
Value returned is $1 = 137379905
(gdb) finish
Run till exit from #0 Ffuncall (nargs=2, args=0xbfe57660) at eval.c:2870
Fbyte_code (bytestr=144421571, vector=144365692, maxdepth=9) at bytecode.c:692
692 break;
Value returned is $2 = 137379905
(gdb) finish
Run till exit from #0 Fbyte_code (bytestr=144421571, vector=144365692,
maxdepth=9) at bytecode.c:692
At this point Emacs started consuming all available CPU cycles and I
had to interrupt gdb. So I don't know what else to do; can you or
someone else advise? Further investigation will have to wait for the
infinite loop to occur again, since I have to shut down the computer.
But since it happened in two consecutive Emacs sessions, the wait may
not be too long; I will also try the recipe I described above.
Steve Berman
- GC bug?, Stephen Berman, 2005/10/21
- Re: GC bug?, Richard M. Stallman, 2005/10/22
- Re: GC bug?,
Stephen Berman <=
- Re: GC bug?, Richard M. Stallman, 2005/10/24