Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Data-Model CPAN distribution.

Report information
The Basics
Id: 76404
Status: open
Priority: 0/
Queue: Data-Model

People
Owner: Nobody in particular
Requestors: SREZIC [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.00007
Fixed in: (no value)



Subject: bleadperl (?) breaks Data-Model
On my freebsd 8.0 system with bleadperl 5.15.9+ (commit id d005e6a6a9ca86c3b2f1eaa7b931b085cf8a205b) the test suite fails. Looking at http://matrix.cpantesters.org/?dist=Data-Model-0.00007 there are also other systems using bleadperl where the test suite is failing. Regards, Slaven
On Sun Apr 08 04:52:26 2012, SREZIC wrote: Show quoted text
> On my freebsd 8.0 system with bleadperl 5.15.9+ (commit id > d005e6a6a9ca86c3b2f1eaa7b931b085cf8a205b) the test suite fails. Looking at > http://matrix.cpantesters.org/?dist=Data-Model-0.00007 there are also > other systems using bleadperl where the test suite is failing.
It passes for me with v5.15.9-89-geade715, four commits later.
CC: SREZIC [...] cpan.org
Subject: Re: [rt.cpan.org #76404] bleadperl (?) breaks Data-Model
Date: Mon, 09 Apr 2012 16:22:45 +0200
To: bug-Data-Model [...] rt.cpan.org
From: Slaven Rezic <slaven [...] rezic.de>
"Father Chrysostomos via RT" <bug-Data-Model@rt.cpan.org> writes: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=76404 > > > On Sun Apr 08 04:52:26 2012, SREZIC wrote:
>> On my freebsd 8.0 system with bleadperl 5.15.9+ (commit id >> d005e6a6a9ca86c3b2f1eaa7b931b085cf8a205b) the test suite fails. Looking at >> http://matrix.cpantesters.org/?dist=Data-Model-0.00007 there are also >> other systems using bleadperl where the test suite is failing.
> > It passes for me with v5.15.9-89-geade715, four commits later. >
It passes also for me on a different system with v5.15.9-123-gbd9cbc4, while it fails on that system with 5.14.2. So it's probably NOT a bleadperl issue. Regards, Slaven -- Slaven Rezic - slaven <at> rezic <dot> de Berlin Perl Mongers - http://berlin.pm.org
I found a new pattern regarding t/060_driver/memcached/serializer.t: if Data-MessagePack isn't installed, then the test is skipped, so we get a pass; if perl is unthreaded, then it works with all Data-MessagePack versions up to current 0.46; if perl is threaded, then the MessagePack version makes a difference: if it is 0.34 or lower, then the test in Data-Model works, regardless; if it is 0.36..0.46, then it fails. Sumarizing in a table, I hope it doesn't get distorted by RT: | | | =======perl========== | | | | threaded | unthreaded | | | | | | | message | 0.36-0.46 | FAIL | PASS | | pack | <=0.34 | PASS | PASS | | | missing | PASS | PASS | I have verified that this pattern holds with 22 different bleadperls. YMMV.
On Sun Sep 23 06:52:22 2012, ANDK wrote: Show quoted text
> I found a new pattern regarding t/060_driver/memcached/serializer.t: if > Data-MessagePack isn't installed, then the test is skipped, so we get a > pass; if perl is unthreaded, then it works with all Data-MessagePack > versions up to current 0.46; if perl is threaded, then the MessagePack > version makes a difference: if it is 0.34 or lower, then the test in > Data-Model works, regardless; if it is 0.36..0.46, then it fails. > > Sumarizing in a table, I hope it doesn't get distorted by RT: > > | | | =======perl========== | > | | | threaded | unthreaded | > | | | | | > | message | 0.36-0.46 | FAIL | PASS | > | pack | <=0.34 | PASS | PASS | > | | missing | PASS | PASS | > > I have verified that this pattern holds with 22 different bleadperls. YMMV.
Does it happen with 5.14?
Yes, the four 5.14.2 perls I have follow the same pattern.
On Sun Sep 23 06:52:22 2012, ANDK wrote: Show quoted text
> I found a new pattern regarding t/060_driver/memcached/serializer.t: if > Data-MessagePack isn't installed, then the test is skipped, so we get a > pass; if perl is unthreaded, then it works with all Data-MessagePack > versions up to current 0.46; if perl is threaded, then the MessagePack > version makes a difference: if it is 0.34 or lower, then the test in > Data-Model works, regardless; if it is 0.36..0.46, then it fails. > > Sumarizing in a table, I hope it doesn't get distorted by RT: > > | | | =======perl========== | > | | | threaded | unthreaded | > | | | | | > | message | 0.36-0.46 | FAIL | PASS | > | pack | <=0.34 | PASS | PASS | > | | missing | PASS | PASS | > > I have verified that this pattern holds with 22 different bleadperls. YMMV.
I had completely forgotten about this ticket. Y’know, this is probably the same issue as <https://rt.perl.org/rt3/Ticket/Display.html?id=119771> which occurs because Data::MessagePack is behaving differently depending on a boolean read from uninitialized memory. t/060_driver/memcached/serializer.t depends on Data::MessagePack’s sorting hashes when serialising them. Data::MessagePack makes no guarantee that it will do that. What it actually does is random, depending on what order things are arranged in memory. The attached patch makes sure that Data::MessagePack’s canonical option is used in the test, for the sake of comparing output. Data::Model’s tests fail for me on Perl 5.19.4 (to be released tomorrow) without this patch, but pass with 5.18.1.
Subject: open_nJORTpUn.txt
diff -rup /Users/sprout/.cpan/build/Data-Model-0.00008-lTnemK-orig/t/060_driver/memcached/serializer.t /Users/sprout/.cpan/build/Data-Model-0.00008-lTnemK/t/060_driver/memcached/serializer.t --- /Users/sprout/.cpan/build/Data-Model-0.00008-lTnemK-orig/t/060_driver/memcached/serializer.t 2013-07-08 04:19:47.000000000 -0700 +++ /Users/sprout/.cpan/build/Data-Model-0.00008-lTnemK/t/060_driver/memcached/serializer.t 2013-09-19 14:48:28.000000000 -0700 @@ -7,6 +7,19 @@ our $has_dmp = 0; if (eval "use Data::MessagePack; if (\$Data::MessagePack::VERSION >= 0.05 ) { 1 } else { 0 }") { plan tests => 100; $has_dmp = 1; + # Data::MessagePack has no way to specify a global default for the + # canonical value, which we need for testing in order to compare out- + # put. It can only be done on a per-object basis. So wrap its pack + # method to enforce canonicity. + my $dmp = new Data::MessagePack ->canonical; + my $orig = Data::MessagePack->can("pack"); + no warnings 'redefine'; + *Data::MessagePack::pack = sub { + if (!length ref $_[0]) { + splice @_, 0, 1, $dmp; + } + goto &$orig + }; } else { plan tests => 20; $has_dmp = 0;