"emacs -nw" hangs in a terminal

Ken Brown kbrown@cornell.edu
Wed May 23 13:24:00 GMT 2012

On 5/22/2012 9:49 AM, Corinna Vinschen wrote:
> On May 22 15:41, Corinna Vinschen wrote:
>> On May 22 07:42, Ken Brown wrote:
>>> On 5/22/2012 7:28 AM, Corinna Vinschen wrote:
>>>> On May 21 14:51, Ken Brown wrote:
>>>>> On 5/21/2012 12:29 PM, Corinna Vinschen wrote:
>>>>>> On May 21 11:31, Ken Brown wrote:
>>>>>>> On 5/21/2012 6:02 AM, Ken Brown wrote:
>>>>>>> I've discovered something strange by running emacs under gdb.  If I
>>>>>>> start emacs-24 in a terminal (but not under X) and start a shell as
>>>>>>> you did, then every press of C-g creates a new thread, and these are
>>>>>>> never destroyed.  I'm pretty sure the threads are created by Cygwin,
>>>>>>> not by emacs.

I've gotten some more information from gdb.  The crash occurs after a 
call to _longjmp, and gdb shows a new thread created right at that 
point.  This doesn't happen when I run emacs under X instead of in 
mintty.  Here's an excerpt from the gdb session, with the strange thread 

$ gdb -p 6492
Attaching to process 6048
[New Thread 6048.0x668]
[New Thread 6048.0x1a5c]
[New Thread 6048.0x2630]
[New Thread 6048.0x1d14]
Reading symbols from /home/kbrown/src/emacs/test-nox/src/emacs.exe...done.
(gdb) b unwind_to_catch
Breakpoint 3 at 0x52aca2: file eval.c, line 1234.
(gdb) c
[Switching to Thread 6048.0x668]
Breakpoint 3, unwind_to_catch (catch=0x28a8d0, value=12985830) at 
1234      catch->val = value;
(gdb) n
1272      _longjmp (catch->jmp, 1);
[New Thread 6048.0x1e04]   <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

Program received signal SIGSEGV, Segmentation fault.
0x76f3f8b1 in ntdll!RtlUpdateClonedSRWLock () from 
(gdb) thread apply all bt full

[compressed output attached]

And here's the stackdump:

Exception: STATUS_ACCESS_VIOLATION at eip=610CFA77
eax=80106D50 ebx=34322D73 ecx=766231E7 edx=00000000 esi=00000001 
ebp=048FACC8 esp=048FACA0 
program=C:\cygwin\home\kbrown\src\emacs\test-nox\src\emacs.exe, pid 
6492, thread pipesel


-------------- next part --------------
A non-text attachment was scrubbed...
Name: bt.out.bz2
Type: application/octet-stream
Size: 2904 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20120523/60474f80/attachment-0001.obj>
-------------- next part --------------
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

More information about the Cygwin mailing list