delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2012/06/01/18:28:01

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-4.0 required=5.0 tests=AWL,BAYES_00,KHOP_PGP_SIGNED,T_RP_MATCHES_RCVD
X-Spam-Check-By: sourceware.org
Date: Fri, 1 Jun 2012 17:27:35 -0500
From: "Ryan C. Underwood" <nemesis-lists AT icequake DOT net>
To: cygwin AT cygwin DOT com
Subject: Re: sem_wait frequently returning with EINTR [Was: Re: How to "bisect" Cygwin?]
Message-ID: <20120601222735.GH25227@localhost.localdomain>
Reply-To: nemesis AT icequake DOT net
References: <20120531210143 DOT GA11744 AT localhost DOT localdomain> <20120601174610 DOT GD25227 AT localhost DOT localdomain> <20120601181852 DOT GF28506 AT calimero DOT vinschen DOT de> <20120601184041 DOT GE25227 AT localhost DOT localdomain> <20120601185906 DOT GG28506 AT calimero DOT vinschen DOT de> <20120601195107 DOT GF25227 AT localhost DOT localdomain> <4FC93D36 DOT 10206 AT sister-shadow DOT de>
MIME-Version: 1.0
In-Reply-To: <4FC93D36.10206@sister-shadow.de>
User-Agent: Mutt/1.5.21 (2010-09-15)
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT 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

--ZPDwMsyfds7q4mrK
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sat, Jun 02, 2012 at 12:07:50AM +0200, Otto Meta wrote:
>=20
> Are you using signals or functions that use signals internally? Signals a=
re
> a bit wonky in 1.7.9 and they seem to be pretty much broken in 1.7.12 and
> newer (I didn=E2=80=99t try any snapshots). Have a look at the problem I =
reported:
> http://cygwin.com/ml/cygwin/2012-05/msg00186.html
> While the cancelling part seems to be mostly fixed by now, the signal part
> is still unchanged.
>=20
> Maybe you could try test 3 from my test program attached to the above
> mentioned post. If its output changes along with your program=E2=80=99s b=
ehaviour
> when you try different Cygwin versions, your problem could be signal-rela=
ted.

I will give that a try.

> If Ryan had told us more about his program, we=E2=80=99d know whether he =
uses multiple
> threads or multiple processes...

I'm really sorry for that, I just find that on mailing lists it's easy
to brain-dump and then people's eyes glaze over in response to a wall
of combined text, questions and log traces.  I tend to want to
research my end out first and then get to the point where I can ask
direct questions.

Here is a bird's-eye description of the program:

The program has a master setitimer() timer, a SIGALRM handler, and
five pthreads which each 1) wait on POSIX semaphores, 2) go do work
when semaphore is released and then wait again.

The semaphores are released in the SIGALRM handler based on derived
clocks from the master timer (to achieve 8 Hz, 20 Hz, etc).  This code
was ported from an old embedded system and each thread used to be an
individual timer interrupt handler.

A Linux port was done (against NPTL rather than LinuxThreads
thankfully) and now I am porting the Linux port to Cygwin to reflect
changing circumstances of the system it is hosted on.

--=20
Ryan C. Underwood, <nemesis AT icequake DOT net>

--ZPDwMsyfds7q4mrK
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iD8DBQFPyUHXIonHnh+67jkRAlx9AJ9wVr2Tsls5/6nh2QzLC0fbgxz1igCgwQCt
FPIpI3hzBgEqNDbYkph07ZY=
=GwA9
-----END PGP SIGNATURE-----

--ZPDwMsyfds7q4mrK--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019