Skip Menu |
 

This queue is for tickets about the CPAN CPAN distribution.

Report information
The Basics
Id: 82295
Status: open
Priority: 0/
Queue: CPAN

People
Owner: Nobody in particular
Requestors: BOLDRA [...] boldra.org
piemas25 [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.9600
Fixed in: (no value)



Subject: Strange and very annoying bug/problem with Cygwin
Download (untitled) / with headers
text/plain 22.3k

Message body is not shown because it is too large.

Download (untitled) / with headers
text/plain 454b
Sorry to hear that. Unfortunately I have no cygwin around. From your description this looks much more like a cygwin bug than a CPAN.pm bug. If the problem persists for you, you should probably dive a bit into the code and make it more robust against this case. I'm interested in your findings and will gladly apply simple special cases for cygwin when you can do the ground work but I'm reluctant to just invent some heuristics that I cannot test myself.
Subject: Re: [rt.cpan.org #82295] Strange and very annoying bug/problem with Cygwin
Date: Fri, 28 Dec 2012 18:40:28 +0000
To: bug-CPAN [...] rt.cpan.org
From: pierre masci <piemas25 [...] gmail.com>
Download (untitled) / with headers
text/plain 867b
Thank you for your motivating answer, i'll see how it goes, if it continues i might try and understand. I'm considering going back to Linux-Land too. On the other hand, having to tweak into the modules to be able to install them has been quite teachful ;-) On 28 December 2012 16:23, Andreas Koenig via RT <bug-CPAN@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=82295 > > > Sorry to hear that. Unfortunately I have no cygwin around. From your > description this looks much more like a cygwin bug than a CPAN.pm bug. > If the problem persists for you, you should probably dive a bit into the > code and make it more robust against this case. I'm interested in your > findings and will gladly apply simple special cases for cygwin when you > can do the ground work but I'm reluctant to just invent some heuristics > that I cannot test myself.
Download (untitled) / with headers
text/plain 107b
FWIW, this problem still exists on Perl5.25.2. Sorry to say that it makes Perl on Cygwin almost unusuable.
Download (untitled) / with headers
text/plain 338b
I just set up a cygwin. Sample report: http://www.cpantesters.org/cpan/report/a154f439-6bf6-1014-9ba0-94355c8d98b0 So far could not reproduce. Next version of CPAN.pm (2.16) will try to get more diagnostics when it happens again. If this does not help, we need to consider some retry-after-failing-move option. Thanks for the reminder.
Download (untitled) / with headers
text/plain 735b
On Wed Aug 17 01:07:37 2016, ANDK wrote: Show quoted text
> I just set up a cygwin. Sample report: > http://www.cpantesters.org/cpan/report/a154f439-6bf6-1014-9ba0- > 94355c8d98b0 > > So far could not reproduce. > > Next version of CPAN.pm (2.16) will try to get more diagnostics when > it happens again. If this does not help, we need to consider some > retry-after-failing-move option. > > Thanks for the reminder.
Thanks, more diagnostics could indeed help. Here's a sample with 2.14: Running install for module 'Marpa::R2' Checksum for //utilite/mirrors/CPAN/authors/id/J/JK/JKEGL/Marpa-R2-3.000000.tar.gz ok Couldn't move /cygdrive/i/cpan/build/tmp-12332/Marpa-R2-3.000000/t to /cygdrive/i/cpan/build/Marpa-R2-3.000000-0/t: Is a directory
Download (untitled) / with headers
text/plain 110b
Actually I don't think it's Cygwin related. I can get the same error with Activestate Perl native on Windows.
Download (untitled) / with headers
text/plain 571b
On Fri Oct 07 22:21:44 2016, NHORNE wrote: Show quoted text
> Actually I don't think it's Cygwin related. I can get the same error > with Activestate Perl native on Windows.
Here is some output on Activestate, using CPAN 2.14: Running install for module 'IPC::System::Simple' Checksum for \\utilite\mirrors\CPAN\authors\id\P\PJ\PJF\IPC-System-Simple-1.25.tar.gz ok Couldn't move I:\cpan\build\tmp-7008\IPC-System-Simple-1.25\t to I:\cpan\build\IPC-System-Simple-1.25-0\t: No such file or directory Show quoted text
cpan>
Download (untitled) / with headers
text/plain 204b
If this helps, I can't reproduce the problem on Windows XP, only on Windows 10. My gut feeling is that something has changed in the permissions scheme that Windows now uses and that causes the breakage.
Download (untitled) / with headers
text/plain 992b
On Tue Oct 11 15:26:21 2016, NHORNE wrote: Show quoted text
> If this helps, I can't reproduce the problem on Windows XP, only on > Windows 10. My gut feeling is that something has changed in the > permissions scheme that Windows now uses and that causes the breakage.
Indeed it seems to be a permission problem! I was sitting together with Paul Boldra today who has the same problem (on Windows 10 I believe), after updating cygwin. We found out that the correct error message is actually lost, because of how File::Copy::move() works. It attempts to do a rename() first. If this fails, it tries other methods, and we haven't completely found out why the second attempt (with copy() and unlink()) produces a different error message, but: * The error message from rename() is "Permission denied" * If we put a "sleep 1" after the rename, it suddenly works So it has todo with copying many files after each other. For the record: CPAN::VERSION=2.18; File::Copy::VERSION=2.32, perl 5.26 Hope that helps!
Le Mer 06 Fév 2019 11:44:03, TINITA a écrit : Show quoted text
> On Tue Oct 11 15:26:21 2016, NHORNE wrote:
> > If this helps, I can't reproduce the problem on Windows XP, only on > > Windows 10. My gut feeling is that something has changed in the > > permissions scheme that Windows now uses and that causes the > > breakage.
> > > Indeed it seems to be a permission problem! > I was sitting together with Paul Boldra today who has the same problem > (on Windows 10 I believe), after updating cygwin. > We found out that the correct error message is actually lost, because > of how File::Copy::move() works. > It attempts to do a rename() first. If this fails, it tries other > methods, and we haven't completely found out why the second attempt > (with copy() and unlink()) produces a different error message, but: > > * The error message from rename() is "Permission denied" > * If we put a "sleep 1" after the rename, it suddenly works > > So it has todo with copying many files after each other. > > For the record: CPAN::VERSION=2.18; File::Copy::VERSION=2.32, perl > 5.26 >
I can confirm this on Windows 7 SP1 (64-bit) with Cygwin-x86_64 v3.0.7-1, Perl v5.26.3, File::Copy v2.32, so this is not only a Windows 10 problem. These packages failed CPAN installation: - Crypt::Mode::CBC - Crypt::Mode::ECB - HTML::Tidy - Excel::Writer::XLSX - Spreadsheet::ParseXLSX Other, more lightweight, packages installed correctly before and after these, e.g. Module::Build or XML::XPathEngine. As mentioned by Tina Müller, this dirty hack allows the listed failing packages to install normally (albeit a bit slowly when moving files): --- Copy.pm 2019-09-24 17:00:39.291599500 +0200 +++ Copy-hacked.pm 2019-09-24 17:00:28.903599500 +0200 @@ -278,7 +278,9 @@ 1 while unlink $to; } + sleep(1); return 1 if rename $from, $to; + sleep(1); # Did rename return an error even though it succeeded, because $to # is on a remote NFS file system, and NFS lost the server's ack? Feel free to contact me if you need further tests.


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.