Inline::CPP v0.44 has been uploaded to CPAN.

This version implements flocking on the typemap output file within
CPP.pm, and on two temp files used by Makefile.PL.  This should
eliminate race conditions that could possibly be caused within
Inline::CPP, particularly when testing under "HARNESS_OPTIONS=jX", or
by smokers that are testing more than one install at the same time.
The general use case is unlikely to encounter problems, but you never
know, so better safe than sorry.

Rob:  I notice there are numerous places in the Inline distribution
where we're opening for output but not flocking.  I didn't even look
at possible issues where we might be opening for input, reading, then
opening for output and expecting to not tromp on another process that
may have gotten in the middle of the cycle.

I think that Inline probably should be implementing flocking on all
outputs, and anytime an output follows a read, we should use a flocked
semaphore file to maintain the lock across the read/write cycle.

I can confirm that even after fixing Inline::CPP, we still have race
conditions that must be coming from inside of Inline, that rear their
ugly head while executing tests in parallel.

The fixes within Inline shouldn't be too difficult, but there are so
many places that Inline interacts with files, it will be hard to
assure we've gotten all of them.

I suppose I could implement a semaphore flock at the beginning of
compilation phase for Inline::CPP and release it after compilation
phase finishes.  That would make Inline::CPP concurrency-safe even if
Inline were to remain not concurrency-safe.  But that's just sweeping
the dust under the carpet. :)

--

David Oswald
daosw...@gmail.com

Reply via email to