Skip Menu |
 

This queue is for tickets about the File-NFSLock CPAN distribution.

Report information
The Basics
Id: 40185
Status: resolved
Worked: 2 hours (120 min)
Priority: 0/
Queue: File-NFSLock

People
Owner: bbb [...] cpan.org
Requestors: LGODDARD [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 1.20
Fixed in: 1.21



Subject: Tests Freeze on Win32
Download (untitled) / with headers
text/plain 639b
Show quoted text
cpan> force install File::NFSLock
Running install for module 'File::NFSLock' Running make for B/BB/BBB/File-NFSLock-1.20.tar.gz Has already been unwrapped into directory C:\dev\perl519 \cpan\build\File-NFSLo ck-1.20-eItgPC Has already been made Running make test Microsoft (R) Program Maintenance Utility Version 1.50 Copyright (c) Microsoft Corp 1988-94. All rights reserved. C:\dev\perl519\bin\perl.exe "-MExtUtils::Command::MM" "- e" "test_harness (0, 'blib\lib', 'blib\arch')" t/*.t t/100_load........ok t/110_compare.....ok t/120_single......ok t/200_bl_ex.......ok 1/22 The test freezes here until process is killed.
From: ddascalescu+perl [...] gmail.com
Download (untitled) / with headers
text/plain 248b
On Mon Oct 20 03:03:40 2008, LGODDARD wrote: Show quoted text
> cpan> force install File::NFSLock
> [...] t/200_bl_ex.......ok 1/22 > > The test freezes here until process is killed.
Same here, on Strawberry Perl 5.10.0.4. Does anyone still maintain this module?
Download (untitled) / with headers
text/plain 224b
Пнд. Окт. 20 03:03:40 2008, LGODDARD писал: Show quoted text
> The test freezes here until process is killed.
Patch to allows negative PIDs as used by Windows. Tests do not hang anymore. -- Alexandr Ciornii, http://chorny.net
Download NFSLock.pm.patch
text/x-diff 800b
--- NFSLock.pm.dist 2003-05-13 21:06:42.000000000 +0300 +++ NFSLock.pm 2009-04-12 03:45:22.890625000 +0300 @@ -171,7 +171,7 @@ my $try_lock_exclusive = !($self->{lock_type} & LOCK_SH); while(defined(my $line=<_FH>)){ - if ($line =~ /^$HOSTNAME (\d+) /) { + if ($line =~ /^$HOSTNAME (-?\d+) /) { #Windows has negative PID my $pid = $1; if ($pid == $$) { # This is me. push @mine, $line; @@ -201,7 +201,7 @@ seek (_FH, 0, 0); my $content = ''; while(defined(my $line=<_FH>)){ - if ($line =~ /^$HOSTNAME (\d+) /) { + if ($line =~ /^$HOSTNAME (-?\d+) /) { my $pid = $1; next if (!kill 0, $pid); # Skip dead locks from this host }
From: ddascalescu+perl [...] gmail.com
Download (untitled) / with headers
text/plain 842b
Show quoted text
> Patch to allows negative PIDs as used by Windows. Tests do not > hang anymore.
Thanks Alex. Tests don't hang any more but I get a lot of "readline() on closed filehandle _FH at NFSLock.pm line 203" errors and a few hundred files like "testfile.dat.NFSLock.shared.shared.shared.shared.shared.shared.shared.shared.shared.shared.tmp.135.-7040.3491" left over. After that, 2 tests fail: t/200_bl_ex.......ok t/210_nb_ex.......ok t/220_ex_scope....1/11 # Failed test 10 in t/220_ex_scope.t at line 110 # t/220_ex_scope.t line 110 is: ok (!$child3_lock); t/220_ex_scope.... Failed 1/11 subtests ... t/300_bl_sh.......51/73 # Failed test 53 in t/300_bl_sh.t at line 185 t/300_bl_sh.......52/73 # t/300_bl_sh.t line 185 is: ok /shared/; t/300_bl_sh....... Failed 1/73 subtests t/400_kill........ok t/410_die.........ok t/420_crash.......ok
Download (untitled) / with headers
text/plain 1.1k
On Thu Jul 09 11:13:27 2009, dandv wrote: Show quoted text
> > Patch to allows negative PIDs as used by Windows. Tests do not > > hang anymore.
> > Thanks Alex. Tests don't hang any more but I get a lot of "readline() > on > closed filehandle _FH at NFSLock.pm line 203" errors and a few hundred > files like >
"testfile.dat.NFSLock.shared.shared.shared.shared.shared.shared.shared.shared.shared.shared.tmp.135.- Show quoted text
> 7040.3491" > left over. > > After that, 2 tests fail: > > t/200_bl_ex.......ok > t/210_nb_ex.......ok > t/220_ex_scope....1/11 # Failed test 10 in t/220_ex_scope.t at line > 110 > # t/220_ex_scope.t line 110 is: ok (!$child3_lock); > t/220_ex_scope.... Failed 1/11 subtests > > ... > > t/300_bl_sh.......51/73 # Failed test 53 in t/300_bl_sh.t at line 185 > t/300_bl_sh.......52/73 # t/300_bl_sh.t line 185 is: ok /shared/; > t/300_bl_sh....... Failed 1/73 subtests > t/400_kill........ok > t/410_die.........ok > t/420_crash.......ok
I'm not able to see any readline closed handle or ".shared.shared.shared.shared." files. What version of File::NFSLock are you using? What version of Perl? How can I see this problem myself?
In version 1.21, all tests pass on ALL versions and flavors of Perl that I've tried.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.