X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Date: Fri, 25 May 2012 12:03:21 +0200 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: "emacs -nw" hangs in a terminal Message-ID: <20120525100321.GF4225@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com 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> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <4FBE26C8.1000008@cornell.edu> User-Agent: Mutt/1.5.21 (2010-09-15) Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , 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 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? 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. 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