Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
X-Authenticated: #14308112
Date: Wed, 12 Oct 2005 15:18:00 +0300
From: Pavel Tsekov <ptsekov@gmx.net>
To: cygwin@cygwin.com
Subject: Re: handle_threadlist_exception: handle_threadlist_exception called     with threadlist_ix -1
In-Reply-To: <20051011150127.GB14140@trixie.casa.cgf.cx>
Message-ID: <Pine.CYG.4.58.0510121448440.1312@mordor>
References: <SERRANOzGZuNY1SWoBD0000004f@SERRANO.CAM.ARTIMI.COM>  <20050901144331.GH18595@trixie.casa.cgf.cx> <Pine.CYG.4.58.0510061616570.1556@mordor>  <20051006141933.GB17445@trixie.casa.cgf.cx> <Pine.CYG.4.58.0510061735120.1140@mordor>  <20051006150019.GA6197@trixie.casa.cgf.cx> <Pine.CYG.4.58.0510061840550.1524@mordor>  <Pine.CYG.4.58.0510111733550.1460@mordor> <20051011150127.GB14140@trixie.casa.cgf.cx>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Y-GMX-Trusted: 0
X-IsSubscribed: yes

On Tue, 11 Oct 2005, Christopher Faylor wrote:

> I don't see how ignoring blocked signals would cause a SEGV however.

Well... indirectly they do :) I hope you are not too annoyed already
because this time I really found the cause of the problem.

Assume a signal is sent to a thread with pthread_kill() but the thread is
blocking the signal and in doesn't get processed through it's lifetime.
The thread dies but the signal still remains in the singal queue.
Something triggeres the processing of the signal - sig_dispatch_pending()
in my case (which is called as part of pthread_sigmask()). As part of the
processing the 'tls' member of sigpacket is dereferenced but at that time
it is already invalid.

I'll try to post a testcase ASAP which demonstrates the problem.



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

