delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/10/08/12:19:08

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-3.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS
X-Spam-Check-By: sourceware.org
Message-ID: <4ACE10DB.3010808@cwilson.fastmail.fm>
Date: Thu, 08 Oct 2009 12:18:35 -0400
From: Charles Wilson <cygwin AT cwilson DOT fastmail DOT fm>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.23) Gecko/20090812 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: Thread related crash
References: <4ACDCA99 DOT 9090400 AT cwilson DOT fastmail DOT fm> <20091008134822 DOT GD14389 AT ednor DOT casa DOT cgf DOT cx>
In-Reply-To: <20091008134822.GD14389@ednor.casa.cgf.cx>
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

Christopher Faylor wrote:
> On Thu, Oct 08, 2009 at 07:18:49AM -0400, Charles Wilson wrote:
>> is it possible that cygwin
>> is overzealously inserting the _cygtls::call2() function into the return
>> frame stack?  Does cygwin manipulate the TIB, even for threads created
>> by direct calls to CreateThread?
> 
> Uh, yeah.  If you are not using Cygwin methods to start threads then it
> is entirely likely that there will be problems, just like if you use
> non-Cygwin methods to do I/O.

I see.

>> Any suggestions? (Other than an STC. I'll put one together after I get
>> some sleep).

OK, I've got a *really* simple test case -- more of a sanity check,
really -- below.

>> This is coming up because any tcl app that I've built -- including
>> insight -- always dies on exit, as tcl is shutting down its various
>> utility threads.
> 
> So why isn't this a problem with the current version of insight then?

I believe it /is/ a problem, at least on cygwin-1.7.  I've tried to
restore my system to "normal", and I see a different behavior on
cygwin-1.5 and cygwin-1.7 with the test below.

[1.5] $ /usr/bin/wish84.exe /usr/share/tk8.4/demos/hello
Hello, world

works fine.  You should see a small window pop up. When you click the
button, "Hello, sorld" is printed to the console and the small window
disappears. The application exits with no problem.

[1.7] $ /usr/bin/wish84.exe /usr/share/tk8.4/demos/hello
Hello, world
Segmentation fault (core dumped)

Again, you should see a small window pop up. When you click the button,
"Hello, sorld" is printed to the console and the small window
disappears. But then, the application segfaults.

Similarly, for insight.exe:

[1.5] $ insight.exe
<then choose File->Exit>

and the application exits without error.  But on 1.7:

[1.7] $ insight.exe
<then choose File->Exit>
Segmentation fault (core dumped)

Can anybody verify this behavior for me, to make sure I haven't somehow
left dregs of my X-based tcl/tk packages lying around on my system?

--
Chuck




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