[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Emacs crashes

From: Nick Roberts
Subject: Re: Emacs crashes
Date: Wed, 15 Mar 2006 09:45:22 +1300

 > > 1) It hangs with some kind of mutex lock which I don't understand with a
 > >    brief backtrace of three functions in libc, I think.  The only thing I
 > >    can do, after attaching with GDB, is kill it.
 > Please show at least that short backtrace.

It happened twice but I've lost the details, sorry.

 > > 2) A garbage collection related crash where mark_object is called
 > >    recursively literally thousands of times,
 > The fact that there are thousands of recursive calls to mark_object is
 > not in itself a sign of a problem.  It is normal for the mark phase to
 > be deeply recursive.

OK, I didn't know that.  Perhaps I should look at the bottom of the backtrace
(i.e low frame nos) instead of the top.

 > etc/DEBUG has some text on how to debug crashes during GC.  Could you
 > try to use those techniques and see what data structure is corrupted?

I don't have a live process to debug but I think I can get it to crash again.
Anyway this is what I have found using the corefile:

(gdb) p last_marked_index
$1 = 482
(gdb) p last_marked[482]
$2 = 173755437
(gdb) xtype
(gdb) xcons
$3 = (struct Lisp_Cons *) 0xa5b4c28
  car = 0x83bc641, 
  u = {
    cdr = 0x837b8c9, 
    chain = 0x837b8c9
(gdb) p last_marked[481]
$4 = 167781611
(gdb) xtype
(gdb) xcons
$5 = (struct Lisp_Cons *) 0xa0024e8
  car = 0x4, 
  u = {
    cdr = 0xffffffff, 
    chain = 0xffffffff

These last addresses looks suspect I don't know what to do next.  Am I right
to assume that 481 is the index of the very last marked object, 480 the one
before etc.  And that 482 is the index of the oldest marked object in the
array held in a circular fashion?

Incidentally with gdb-ui, if you display a watch expression in the speedbar
and press 'p' on a component (with a live process), Emacs will print the
s-expression in the GUD buffer.  I've just extended it to work for arrays
so you can quickly look at the s-expression of any element of last_marked,
although I don't know if the others are of interest.

Nick                                           http://www.inet.net.nz/~nickrob

reply via email to

[Prev in Thread] Current Thread [Next in Thread]