Skip Menu |

This queue is for tickets about the Params-Util CPAN distribution.

Report information
The Basics
Id: 75672
Status: resolved
Priority: 0/
Queue: Params-Util

People
Owner: Nobody in particular
Requestors: KENTNL [...] cpan.org
Cc: ribasushi [...] leporine.io
AdminCc:

Bug Information
Severity: Critical
Broken in:
  • 1.06
  • 0.35
  • 0.36
  • 0.37
  • 0.38
  • 1.00
  • 1.01
  • 1.03
  • 1.04
  • 1.05
Fixed in: 0.33



Subject: Loading Params::Util on Cygwin perl breaks ``
The presence of this bug is somewhat widespread , and affects anything using Dist::CheckConflicts , which includes Package::Stash, which is a dependency of Moose.

It makes any such packages stall during installation during Makefile.PL with a fork-death:

      0 [main] perl 4280 child_copy: loaded dll data write copy failed, 0x58004000..0x58004208, done 0, windows pid 6640, Win32 error 487
5011718 [main] perl 4280 child_copy: loaded dll data write copy failed, 0x58004000..0x58004208, done 0, windows pid 6640, Win32 error 487

is repeatedly printed, and configure eventually fails as a result.

Replicating the bug is quite simple:

use strict;
use warnings;

require Params::Util;

my $var = `echo 1`;

 

This will exhibit the failure for me on both cygwin's 5.14.1, and a freshly brewed perl from blead.

And simply removing the Params::Util require/use from code solves the problem.

( And if Params::Util is included *anywhere* in *any * code prior to ``, the `` seems to become broken as a result )


 

Further inspection indicates this happens on every XS version of Params::Util, and by downgrading to Params::Util 0.33 I can get things to work again.

 

But when you *do* downgrade, you have to make sure you clear out the old version of Params/Util.pm from @INC

 

find /home/Kent/perl5/perlbrew/perls/blead-2012-03-11-03-19-13-13-00-B/lib/ | grep -i "Params/Util.pm"
/home/Kent/perl5/perlbrew/perls/blead-2012-03-11-03-19-13-13-00-B/lib/site_perl/5.15.8/cygwin-thread-multi-64int/Params/Util.pm <-- old 0.37
/home/Kent/perl5/perlbrew/perls/blead-2012-03-11-03-19-13-13-00-B/lib/site_perl/5.15.8/Params/Util.pm  <--- freshly installed 0.33

And perl takes 0.37 over the 0.33 one due to ordering in @INC :/

 


I'm still having incredible difficulty tracking down exactly *why* this bug occurs.

I can't see anything obvious in the Xs that would change fork behaviour, but anyway, for a temp solution, just rm site_perl/5.15.8/cygwin-thread-multi-64int/auto/Params/Util/Util.{dll,bs}

Then it falls back to pure-perl and works without a problem.

Disabled XS on cygwin
Subject: Loading Params::Util on Cygwin(1.7.11) perl breaks ``

Thanks for the quick bug-fix.


After a *lot* of debugging, the real culprit was finally unmasked: 


http://cygwin.com/ml/cygwin/2012-03/msg00161.html

Dynamic Loading is completely broken on Cygwin 1.7.11, and Params::Utils was simply the first thing that came into my dependency tree that triggered that problem.
 

( Its weird, because its not nessecarily caused by dynamic loading, often it just works, for example, you could load Class::Load::XS and List::Utils , or Package::Stash::XS and List::Utils,  that would be fine, but loading Class::Load::XS and Package::Stash::XS together caused an explosion )

It should be safe to use XS  again as long as "uname -r " doesn't =~ /^1.7.11\(0\.260/

Sorry for any hassle this added. Blame Cygwin. =)
 

Subject: Re: [rt.cpan.org #75672] Loading Params::Util on Cygwin(1.7.11) perl breaks ``
Date: Tue, 13 Mar 2012 18:10:54 +1100
To: bug-Params-Util [...] rt.cpan.org
From: Adam Kennedy <adamkennedybackup [...] gmail.com>
If the entirety of Perl is fucked, I'm not sure we should do anything special at all. Adam On 11 March 2012 14:56, Kent Fredric via RT <bug-Params-Util@rt.cpan.org> wrote: Show quoted text
>       Queue: Params-Util >  Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=75672 > > > Thanks for the quick bug-fix. > > > After a *lot* of debugging, the real culprit was finally unmasked: > > > http://cygwin.com/ml/cygwin/2012-03/msg00161.html > > Dynamic Loading is completely broken on Cygwin 1.7.11, and Params::Utils was > simply the first thing that came into my dependency tree that triggered that > problem. > > ( Its weird, because its not nessecarily caused by dynamic loading, often it > just works, for example, you could load Class::Load::XS and List::Utils , or > Package::Stash::XS and List::Utils, that would be fine, but loading > Class::Load::XS and Package::Stash::XS together caused an explosion ) > > It should be safe to use XS again as long as "uname -r " doesn't =~ > /^1.7.11\(0\.260/ > > Sorry for any hassle this added. Blame Cygwin. =) >
On 2012-03-13 00:11:02, adam@ali.as wrote: Show quoted text
> If the entirety of Perl is fucked, I'm not sure we should do anything > special at all.
What can we do to unfuck things? Is this a known issue to p5p? (I'd report it, except I wouldn't know how to describe it.)

This bug is really tending towards being archaelogy now.

It seems that at the time, a specific version of cygwin was broken, in ways that was later fixed on a later cygwin release, if memory serves correctly.

 

Given that was getting on 18 months ago, and those versions of cygwin may be dead stale already, bringing XS back should be safe.

 

You **may** just want to put a check in Makefile.PL that says "Sorry, your cygwin is a version that is fucked with XS things, please get an unfucked cygwin to continue playing".

 

But I'm not really in a position to help further, because the install I was triggering this bug on is LONG dead, and I don't even believe its possible to coerce cygwin into installing things that old still.

From: paul [...] liekut.de
Show quoted text
> Given that was getting on 18 months ago, and those versions of cygwin > may be > dead stale already, bringing XS back should be safe.
It seems that XS is working again on cygwin. Using cygwin setup version 2.850 (32 bit) I tested versions 0.35 through 1.07 (skipping the _DEV releases)[1] and each of them built without problem and ran the simple script mentioned by KENTNL at the beginning of the ticket. The exact process is described in the attached script test_param_utils_versions.sh. The script to reproduce the backquote bug is also attached, as well as the test output for each version of Param::Utils. A fork of Params::Util version 1.07 exists at https://github.com/paultcochrane/Params-Util/tree/ptc_v1.07. A patch removing the cygwin workaround for XS is also attached to this ticket. Hope this helps! Cheers, Paul [1] version 1.07 had to be tested by hand as the section ignoring cygwin had to be commented out in Makefile.PL.
Subject: cygwin_backquote_bug.pl
use strict; use warnings; require Params::Util; my $var = `echo 1`;
Subject: 0001-Removing-cygwin-XS-workaround-in-Makefile.PL.patch
From ebd6d6519c82ca14761199c48f0927a9c7a9fee9 Mon Sep 17 00:00:00 2001 From: Paul Cochrane <paul@liekut.de> Date: Wed, 28 May 2014 22:07:47 +0200 Subject: [PATCH 1/2] Removing cygwin XS workaround in Makefile.PL The issue mentioned in RT#75672 seems to have resolved itself via updates to cygwin. --- Makefile.PL | 5 ----- 1 files changed, 0 insertions(+), 5 deletions(-) diff --git a/Makefile.PL b/Makefile.PL index 8731ae8..fc0ce04 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -14,11 +14,6 @@ foreach ( @ARGV ) { unless ( defined $make_xs ) { $make_xs = can_xs(); } -if ( $^O eq 'cygwin' and $make_xs == 1 and not /^-xs/ ) { - # Cygwin goes bonkers breaking `` if using Params::Util XS version - # for no apparent reason. - $make_xs = 0; -} # Generate the non-XS tests if we are making the XS version my @tests = qw{ -- 1.7.9
Subject: test_param_utils_versions.sh
Download test_param_utils_versions.sh
application/octet-stream 637b

Message body not shown because it is not plain text.

Subject: params_util_test_results.log
Download params_util_test_results.log
application/octet-stream 210b

Message body not shown because it is not plain text.

I currently work on a List::MoreUtils stable release. Once it's out, I care for that. It seems that it's reasonable to develop a test whether an XS module is working properly. I think about it and discuss it with some developers.
From: paul [...] liekut.de
On Wed May 28 16:36:50 2014, REHSACK wrote: Show quoted text
> I currently work on a List::MoreUtils stable release. Once it's out, I > care for that.
No problems. Just wanted to share the results I obtained with the current cygwin. Show quoted text
> It seems that it's reasonable to develop a test whether > an XS module is working properly.
I agree. When I was working on this ticket I couldn't come up with a test case since the version of cygwin which throws the problem no longer exists and thus it's difficult to verify that a test actually exercises the problem. Perhaps there's a more general issue that one can test with XS which is not restricted to cygwin? Cheers, Paul
Next release contains new tooling. Let's see how it behaves on cygwin.