X-Recipient: archive-cygwin@delorie.com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:date:message-id:from:to:subject:references
	:in-reply-to:content-type; q=dns; s=default; b=yXFOebdHtao1g2sSX
	D3kqSLoY8yWgZX+6GxkHkjwTm9qXLruuqOpHmTxRfaOpL6gZdK2I3PmPA5QxEKLd
	omQt9s2tt8V7Ezylr4MxOmJAXPT6RTipdLnBN7NepSSgz26MTYmU6A0eU8KPF+s0
	oQm9hnSS0Tlk02Y44qywR6G4Hk=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:date:message-id:from:to:subject:references
	:in-reply-to:content-type; s=default; bh=rm1WSL++gx0v5qeeXJS6KXA
	i5A8=; b=mt1tbKKqamlIffNPrlCoa+RwjrFgiLXudadgMxhL5ZeYV7qcByuDE3u
	ummzH6hr79AT1iB7MBv6/1pgGrzUFsCx+FFK7Gcg/2+5LsoEwDenIxxzxsYeH82m
	tSv/u/aHl5qXGcHlMiKaP7fI8jIx+8NKUX0lJK2BastzcQkVWB5U=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
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
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=younger, precious, Advantage, Christopher
X-HELO: lb1-smtp-cloud7.xs4all.net
Date: Sun, 20 Aug 2017 15:19:53 +0200
Message-ID: <eec2ed14107eea3a5a71e344b8e8e9dc@smtp-cloud7.xs4all.net>
From: Houder <houder@xs4all.nl>
To: cygwin@cygwin.com
Subject: Re: REVISITED: Signal delivered while blocked
References: <c05c742f0f3809e6d1afb8fb2c646ad7@xs4all.nl> <20170818162040.GC6314@calimero.vinschen.de>
In-Reply-to: <20170818162040.GC6314@calimero.vinschen.de>
Content-Type: text/plain; charset=UTF-8; format=fixed
User-Agent: mua.awk 0.99
X-CMAE-Envelope: MS4wfAOeTJvKb2SYPsjHFVROJOgY4IQs5w+LCwGbsuDkBdaFXR4v3FbNBmnDebDGb8ow1qNDwCTLBBVDu0rVj/G5Hwkb6L5ZZx4ZC5dQoKNFbTq/D4AQL70I 2PP5tHRDdi8Xmod8wx0vryZZZIIwn9/pxT+w9F5BsNLHbhXCpixkRRRCGLYVB9XlkCyPxSUChtOhQA==
X-IsSubscribed: yes

On Fri, 18 Aug 2017 18:20:40, Corinna Vinschen wrote:
> On Aug 16 23:22, Houder wrote:
[snip]

> > The alternative testcase in fact consists of 2 testcases (2 files):
> >
> >  1. sigprocmask-exclusion4.c
> >  2. sigprocmask-exclusion5.c

> Thanks for the testcases.  This is still a pretty tricky problem and a

Providing a proper testcase was my sole purpose (intention?). That is,
to help you (i.e. to prevent you from waisting your precious time).

Though Noah believes that my modification of his testcase is uncalled
for.

Consequently, it is up your discretion :-)

> few hours of debugging haven't shown anything conclusive.  The signal
> code was my former co-maintainer's domain, so I'm not as fluent in
> debugging it.

Got it, "Advantage Christopher Faylor, disadvantage Corinna Vinschen"!

Perhaps Christopher would be willing to lend you a hand here ... for old
times' sake ... or as an once-only challenge (to proof to himself, he can
still do it :-))

> ATM it looks like a race inside of the Cygwin DLL to me.  The checks if
> a signal should be handled and the *creation* of the call to the signal
> handler (but *not* the actual call to the signal handler) may occur
> before the signal is blocked, while the call then occurs after the
> blocking.

My impression as well (however, in my case it was based on the results of
the testcases).

.. uhm, in "U/Linux land" the delivery of a signal is "immediate", once
the process returns to the kernel ... (i.e. the stack of the process is
adjusted with a call to the signal handler before it will continue).

.. signal handler A is not allowed to continue (and block signal B) if
the kernel has decided that signal handler B should run.

That is, it is what I remember from old times ...

> Anyway, I'm not sure I have enough time to fully immerse into that
> problem any time soon.  I'd be not too unhappy if somebody would try to
> debug this in the Cygwin DLL, too...

I hear you. However I am not capable to help you here ... Perhaps somebody
else can ... a much younger person than I am.

Regards,

Henri

=====


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

