delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2012/05/23/10:16:48

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Wed, 23 May 2012 16:15:38 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: "emacs -nw" hangs in a terminal
Message-ID: <20120523141538.GI9200@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <7rmx513ol1 DOT fsf AT ws796-of-spb DOT ru DOT yotateam DOT com> <4FBA12C7 DOT 4070305 AT cornell DOT edu> <4FBA5FDA DOT 7080801 AT cornell DOT edu> <20120521162908 DOT GP7763 AT calimero DOT vinschen DOT de> <4FBA8EA0 DOT 4040905 AT cornell DOT edu> <20120522112828 DOT GA9200 AT calimero DOT vinschen DOT de> <4FBB7BA6 DOT 9000409 AT cornell DOT edu> <20120522134119 DOT GB9200 AT calimero DOT vinschen DOT de> <20120522134932 DOT GC9200 AT calimero DOT vinschen DOT de> <4FBCD166 DOT 8080101 AT cornell DOT edu>
MIME-Version: 1.0
In-Reply-To: <4FBCD166.8080101@cornell.edu>
User-Agent: Mutt/1.5.21 (2010-09-15)
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On May 23 08:00, Ken Brown wrote:
> 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 marked:
> 
> $ 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
> Continuing.
> [Switching to Thread 6048.0x668]
> [...]
> Breakpoint 3, unwind_to_catch (catch=0x28a8d0, value=12985830) at
> eval.c:1234
> 1234      catch->val = value;
> (gdb) n
> [...]
> 1272      _longjmp (catch->jmp, 1);
> (gdb)
> [New Thread 6048.0x1e04]   <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
> 
> Program received signal SIGSEGV, Segmentation fault.

I don't know what this has to do with the longjmp, but the thread
which gets crated right after pressing Ctrl-G is due to a select or
poll call.  The descriptor is a pipe, fifo, or pty.

> 0x76f3f8b1 in ntdll!RtlUpdateClonedSRWLock () from
> /c/windows/SysWOW64/ntdll.dll
> (gdb) thread apply all bt full
> 
> [compressed output attached]
> 
> And here's the stackdump:
> 
> Exception: STATUS_ACCESS_VIOLATION at eip=610CFA77

The problem with stackdumps is that the addresses only make sense
for a single version of the Cygwin DLL.  If that's a self-built
version, what does `addr2line -e /bin/cygwin1.dll 610CFA77' print?
If it's 1.7.15, please install the cygwin-debug package and call
the same addr2line.

I assume the address corresponds to select.cc, line 625, but I'm
quite busy with the pthread_cancel stuff, so I didn't look deeper
into this problem.

> eax=80106D50 ebx=34322D73 ecx=766231E7 edx=00000000 esi=00000001
> edi=00000050
> ebp=048FACC8 esp=048FACA0
> program=C:\cygwin\home\kbrown\src\emacs\test-nox\src\emacs.exe, pid
> 6492, thread pipesel
               ^^^^^^^
Yes, that's exactly the created thread.  Do you happen to know what
kind of descriptor has been given to select at this point?  Is that
a pty master side perhaps?


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019