sem_wait frequently returning with EINTR [Was: Re: How to "bisect" Cygwin?]

Ryan C. Underwood nemesis-lists@icequake.net
Fri Jun 1 22:27:00 GMT 2012


On Sat, Jun 02, 2012 at 12:07:50AM +0200, Otto Meta wrote:
> 
> Are you using signals or functions that use signals internally? Signals are
> a bit wonky in 1.7.9 and they seem to be pretty much broken in 1.7.12 and
> newer (I didn’t 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.
> 
> Maybe you could try test 3 from my test program attached to the above
> mentioned post. If its output changes along with your program’s behaviour
> when you try different Cygwin versions, your problem could be signal-related.

I will give that a try.

> If Ryan had told us more about his program, we’d 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.

-- 
Ryan C. Underwood, <nemesis@icequake.net>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: Digital signature
URL: <http://cygwin.com/pipermail/cygwin/attachments/20120601/928d2127/attachment.sig>


More information about the Cygwin mailing list