delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2012/05/25/08:45:59

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,SPF_NEUTRAL,TW_GJ,TW_YG,T_RP_MATCHES_RCVD
X-Spam-Check-By: sourceware.org
Message-ID: <4FBF7EDC.2060502@cornell.edu>
Date: Fri, 25 May 2012 08:45:16 -0400
From: Ken Brown <kbrown AT cornell DOT edu>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20120428 Thunderbird/12.0.1
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: "emacs -nw" hangs in a terminal
References: <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> <20120523141538 DOT GI9200 AT calimero DOT vinschen DOT de> <4FBD08B0 DOT 50209 AT cornell DOT edu> <20120523160235 DOT GK9200 AT calimero DOT vinschen DOT de> <4FBE26C8 DOT 1000008 AT cornell DOT edu> <20120525100321 DOT GF4225 AT calimero DOT vinschen DOT de>
In-Reply-To: <20120525100321.GF4225@calimero.vinschen.de>
X-PMX-CORNELL-SPAM-CHECKED: Pawpaw
X-Original-Sender: kbrown AT cornell DOT edu - Fri May 25 08:45:35 2012
X-PMX-CORNELL-REASON: CU_White_List_Override
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.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 5/25/2012 6:03 AM, Corinna Vinschen wrote:
> On May 24 08:17, Ken Brown wrote:
>> On 5/23/2012 12:02 PM, Corinna Vinschen wrote:
>>> On May 23 11:56, Ken Brown wrote:
>>>> Based on the emacs code, I think that's right.  But maybe I need to
>>>> download the source for the snapshot I'm using (or build cygwin1.dll
>>>> myself) so that I can step through the first call to select after
>>>> the longjmp and see exactly where the crash is happening.
>>>
>>> That would be most helpful.  I don't grok this crash.  It's one of
>>> the "this should never possibly happen" kind...
>>
>> I'm now using an unoptimized build of the 20120523 snapshot.  The
>> gdb session is below.  I first started emacs and started the shell
>> process; this guarantees that when emacs calls select, one of the
>> descriptors is a pty master.  Then I attached gdb and put a
>> breakpoint at the emacs function unwind_to_catch, which is triggered
>> when I press C-g.  It took two presses of C-g to get the crash.  I
>> think the rest is self-explanatory.
>
> Just to let you know, I looked into this on and off yesterday, but I
> still don't understand what's going on.
>
> In theory starting the new thread should be harmless.  The threads in
> Cygwin are "cygthreads", which is our own thread pool implementation.
> It doesn't stop existing threads but reuses them.  Only if all
> cygthreads are still in use, another one is started and added to the
> pool.
>
> I'll look further into this, but I am wondering about this:  Is the
> new Fsignal/Fthrow implementation so much different than the old one
> in emacs 23.x?  If not, why does it work in 23.x?  Any chance 24.x
> produces a stack or heap corruption?  Double free or something?

There's nothing that jumps out at me.

> And then again, do we know if 24.x works on older Cygwin release or
> snapshots?  If it's a Cygwin problem, it might help to nail it down.

It works on the 20120111 snapshot but fails on the 20120122 snapshot. 
Thanks for suggesting this.  It should have been the first thing I checked.

Ken


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