emacs-devel
[Top][All Lists]
Advanced

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

Re: erroneous auto-save-list file


From: Stephen Berman
Subject: Re: erroneous auto-save-list file
Date: Thu, 15 Nov 2007 09:51:04 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (gnu/linux)

On Fri, 09 Nov 2007 21:59:32 -0500 Richard Stallman <address@hidden> wrote:

>       When
>     the initial abort occurred, resulting in the erroneous auto-save-list
>     file, Emacs was not running under gdb, but, as I wrote in my bug report
>     about the abort, even reproducing it under gdb yielded no backtrace, why
>     I don't know.
>
> That could be a serious problem in GDB.  It would be good to talk
> with GDB developers about how to investigate it.  Since the bug's
> cause is known, they could focus on figuring out why GDB fails
> to give a backtrace.

I've had a fruitful exchange about this on the gdb-devel list, and it
turns out gdb does give a backtrace.  I had been able to get it because
I had already killed the emacs process, which was the only way to
release my desktop after emacs aborted.  Michael Snyder explained it
like this:

>> In a nutshell, your emacs process has a lock on a shared 
>> resource (the X keyboard-and-mouse "focus").  It is intended
>> to keep that lock only briefly, but while in posession of the
>> lock, it aborts.
>> 
>> Normally an abort would result in the freeing of the lock, 
>> but since gdb stops the emacs process from exiting, the lock
>> is not freed, resulting in a deadlock when some other process
>> (eg. xterm) needs the lock.
>> 
>> This is a problem, but a normal and predictable one.
>> GDB cannot tell when a debugged process is in posession 
>> of a lock that will cause other processes to deadlock, 
>> and it has no way of freeing such locks.

He suggested starting gdb in a virtual console and attaching the emacs
process to this.  After emacs aborted under X, I switched to the virtual
console and was able to get a backtrace.[1] So there's no problem here
with gdb and since Jan D. had already fixed the bug which caused Emacs
to abort, this issue can be declared closed.

Steve Berman

Footnotes: 
[1]  The backtrace was not very informative, containing lines like this:
        #5  0xb7c7b1c1 in ?? () from /usr/lib/libgtk-x11-2.0.so.0
        #6  0x085c2d00 in ?? ()
This may be because the shared libraries installed on my system are
stripped.






reply via email to

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