This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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>

Attachment: signature.asc
Description: Digital signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]