2.3.0: possible Cygwin flock bug (Windows 10 x86_64)

Corinna Vinschen corinna-cygwin@cygwin.com
Thu Nov 12 12:28:00 GMT 2015


Hi Mario,

On Nov 11 21:51, Mario Roy wrote:
> Greetings,
> 
> During testing of the Perl MCE 1.608 module (uses flock), the examples
> scripts hang. Downgrading the base Cygwin package from 2.3.0-1 to
> 2.2.1-1 resolves the issue.
> 
> Installation is not required if a Cygwin developer desires to test
> file locking via the Perl MCE module.
> 
> https://cpan.metacpan.org/authors/id/M/MA/MARIOROY/MCE-1.608.tar.gz
> 
> 1. extract tar file
> 2. cd MCE-1.608/examples
> 3. perl foreach.pl 10
> 
> Hangs with Cygwin 2.3.0-1
> Successful with Cygwin 2.2.1-1

Thanks for the testcase.  I found the problem.  In 2.2.1 was a 
use-after-free bug in the file locking code which I fixed in
2.3.0... just wrongly.  It fails to work in certain cases when
locking collisions occur.  I fixed this in the git repo.

I uploaded a new developer snapshot to https://cygwin.com/snapshots/
Please give it a try.

> The upcoming Perl MCE 1.7 release does away with file locking and
> works with 2.3.0-1.

Uh, please don't do this.  This is a bug in Cygwin 2.3.0, and the right
fix is to release Cygwin 2.3.1 end of this week, not to change other
packages to workaround this bug.

> p.s. Thank you for Cygwin

Thanks :)
Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20151112/37ea2760/attachment.sig>


More information about the Cygwin mailing list