Skip Menu |

This queue is for tickets about the JSON-XS CPAN distribution.

Report information
The Basics
Id: 84151
Status: resolved
Priority: 0/
Queue: JSON-XS

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

Bug Information
Severity: Critical
Broken in: 2.33
Fixed in: (no value)



Subject: fails to install against perl 5.17.10
kevin@vinny:~$ cpan JSON::XS CPAN::SQLite not installed, trying to work without CPAN: Storable loaded ok (v2.40) Reading '/home/kevin/.cpan/Metadata' Database was generated on Fri, 22 Mar 2013 17:07:39 GMT Running install for module 'JSON::XS' Running make for M/ML/MLEHMANN/JSON-XS-2.33.tar.gz CPAN: Digest::SHA loaded ok (v5.84) CPAN: Compress::Zlib loaded ok (v2.06) Checksum for /home/kevin/.cpan/sources/authors/id/M/ML/MLEHMANN/JSON-XS-2.33.tar.gz ok CPAN: File::Temp loaded ok (v0.23) CPAN: Parse::CPAN::Meta loaded ok (v1.4404) CPAN: CPAN::Meta loaded ok (v2.120921) CPAN: Module::CoreList loaded ok (v2.85) CPAN.pm: Building M/ML/MLEHMANN/JSON-XS-2.33.tar.gz CPAN: CPAN::Reporter loaded ok (v1.2009) CPAN::Reporter: error loading Test::Reporter::Transport::Metabase. Please install the missing module or choose a different transport mechanism. Checking if your kit is complete... Looks good Writing Makefile for JSON::XS Writing MYMETA.yml and MYMETA.json (/home/kevin/perl5/perlbrew/perls/perl-5.17.10/bin/perl5.17.10 Makefile.PL exited with 0) CPAN::Reporter: Makefile.PL result is 'pass', No errors. CPAN::Reporter: error loading Test::Reporter::Transport::Metabase. Please install the missing module or choose a different transport mechanism. cp XS/Boolean.pm blib/lib/JSON/XS/Boolean.pm cp XS.pm blib/lib/JSON/XS.pm /home/kevin/perl5/perlbrew/perls/perl-5.17.10/bin/perl5.17.10 /home/kevin/perl5/perlbrew/perls/perl-5.17.10/lib/5.17.10/ExtUtils/xsubpp -typemap /home/kevin/perl5/perlbrew/perls/perl-5.17.10/lib/5.17.10/ExtUtils/typemap -typemap typemap XS.xs > XS.xsc && mv XS.xsc XS.c cc -c -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -DVERSION=\"2.33\" -DXS_VERSION=\"2.33\" -fPIC "-I/home/kevin/perl5/perlbrew/perls/perl-5.17.10/lib/5.17.10/i686-linux-thread-multi/CORE" XS.c XS.c: In function ‘encode_sv’: XS.xs:789:7: warning: ignoring return value of ‘gcvt’, declared with attribute warn_unused_result [-Wunused-result] Running Mkbootstrap for JSON::XS () chmod 644 XS.bs rm -f blib/arch/auto/JSON/XS/XS.so cc -shared -O2 -L/usr/local/lib -fstack-protector XS.o -o blib/arch/auto/JSON/XS/XS.so \ \ chmod 755 blib/arch/auto/JSON/XS/XS.so cp XS.bs blib/arch/auto/JSON/XS/XS.bs chmod 644 blib/arch/auto/JSON/XS/XS.bs cp bin/json_xs blib/script/json_xs /home/kevin/perl5/perlbrew/perls/perl-5.17.10/bin/perl5.17.10 -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/json_xs Manifying blib/man1/json_xs.1 Manifying blib/man3/JSON::XS::Boolean.3 Manifying blib/man3/JSON::XS.3 (/usr/bin/make exited with 0) CPAN::Reporter: make result is 'pass', No errors. MLEHMANN/JSON-XS-2.33.tar.gz /usr/bin/make -- OK CPAN: YAML::XS loaded ok (v0.41) Running make test CPAN::Reporter: error loading Test::Reporter::Transport::Metabase. Please install the missing module or choose a different transport mechanism. PERL_DL_NONLAZY=1 /home/kevin/perl5/perlbrew/perls/perl-5.17.10/bin/perl5.17.10 "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/00_load.t ............. ok t/01_utf8.t ............. ok t/02_error.t ............ ok t/03_types.t ............ ok t/04_dwiw_encode.t ...... ok t/05_dwiw_decode.t ...... ok t/06_pc_pretty.t ........ ok t/07_pc_esc.t ........... ok t/08_pc_base.t .......... ok t/09_pc_extra_number.t .. ok t/10_pc_keysort.t ....... ok t/11_pc_expo.t .......... ok t/12_blessed.t .......... ok t/13_limit.t ............ ok t/14_latin1.t ........... ok t/15_prefix.t ........... ok t/16_tied.t ............. ok t/17_relaxed.t .......... ok t/18_json_checker.t ..... ok # Failed test 'data' # at t/19_incr.t line 22. # Failed test 'data' # at t/19_incr.t line 22. # Failed test 'data' # at t/19_incr.t line 22. # Failed test 'data' # at t/19_incr.t line 22. # Failed test 'data' # at t/19_incr.t line 22. # Failed test 'data' # at t/19_incr.t line 22. # Failed test 'data' # at t/19_incr.t line 22. # Failed test 'data' # at t/19_incr.t line 22. # Failed test 'data' # at t/19_incr.t line 22. # Failed test 'data' # at t/19_incr.t line 22. # Failed test 'data' # at t/19_incr.t line 22. # Failed test 'data' # at t/19_incr.t line 22. # Failed test 'data' # at t/19_incr.t line 22. # Failed test 'data' # at t/19_incr.t line 22. # Failed test 'data' # at t/19_incr.t line 22. # Failed test 'data' # at t/19_incr.t line 22. # Failed test 'data' # at t/19_incr.t line 22. # Failed test 'data' # at t/19_incr.t line 22. # Failed test 'data' # at t/19_incr.t line 22. # Failed test 'data' # at t/19_incr.t line 22. # Failed test 'data' # at t/19_incr.t line 22. # Failed test 'data' # at t/19_incr.t line 22. # Failed test 'data' # at t/19_incr.t line 22. # Failed test 'data' # at t/19_incr.t line 22. # Failed test 'data' # at t/19_incr.t line 22. # Failed test 'data' # at t/19_incr.t line 22. # Failed test 'data' # at t/19_incr.t line 22. # Failed test 'data' # at t/19_incr.t line 22. # Failed test 'data' # at t/19_incr.t line 22. # Failed test 'data' # at t/19_incr.t line 22. # Failed test 'data' # at t/19_incr.t line 22. # Failed test 'data' # at t/19_incr.t line 22. # Failed test 'data' # at t/19_incr.t line 22. # Failed test 'data' # at t/19_incr.t line 22. # Failed test 'data' # at t/19_incr.t line 22. # Failed test 'data' # at t/19_incr.t line 22. # Failed test 'data' # at t/19_incr.t line 22. # Failed test 'data' # at t/19_incr.t line 22. # Failed test 'data' # at t/19_incr.t line 22. # Failed test 'data' # at t/19_incr.t line 22. # Failed test 'data' # at t/19_incr.t line 22. # Failed test 'data' # at t/19_incr.t line 22. # Failed test 'data' # at t/19_incr.t line 22. # Failed test 'data' # at t/19_incr.t line 22. # Failed test 'data' # at t/19_incr.t line 22. # Failed test 'data' # at t/19_incr.t line 22. # Failed test 'data' # at t/19_incr.t line 22. # Failed test 'data' # at t/19_incr.t line 22. # Failed test 'data' # at t/19_incr.t line 22. # Failed test 'data' # at t/19_incr.t line 22. # Failed test 'data' # at t/19_incr.t line 22. # Failed test 'data' # at t/19_incr.t line 22. # Looks like you failed 52 tests of 697. t/19_incr.t ............. Dubious, test returned 52 (wstat 13312, 0x3400) Failed 52/697 subtests t/20_faihu.t ............ ok t/21_evans.t ............ ok t/22_comment_at_eof.t ... ok t/99_binary.t ........... ok Test Summary Report ------------------- t/19_incr.t (Wstat: 13312 Tests: 697 Failed: 52) Failed tests: 11, 14, 41, 47, 50, 59, 62, 65, 68, 71 74, 77, 80, 83, 86, 92, 110, 116, 119, 122 125, 131, 137, 140, 143, 146, 149, 152 164, 173, 182, 191, 203, 209, 212, 215 218, 227, 242, 248, 251, 257, 260, 263 269, 272, 278, 281, 284, 287, 290, 296 Non-zero exit status: 52 Files=24, Tests=25564, 8 wallclock secs ( 2.66 usr 0.12 sys + 4.32 cusr 0.21 csys = 7.31 CPU) Result: FAIL Failed 1/24 test programs. 52/25564 subtests failed. make: *** [test_dynamic] Error 255 (/usr/bin/make test exited with 512) CPAN::Reporter: Test result is 'fail', One or more tests failed. CPAN::Reporter: preparing a CPAN Testers report for JSON-XS-2.33 CPAN::Reporter: error loading Test::Reporter::Transport::Metabase. Please install the missing module or choose a different transport mechanism. CPAN::Reporter: problem with Test::Reporter transport: Test::Reporter: could not load 'Test::Reporter::Transport::Metabase' Can't locate Test/Reporter/Transport/Metabase.pm in @INC (you may need to install the Test::Reporter::Transport::Metabase module) (@INC contains: /home/kevin/perl5/perlbrew/perls/perl-5.17.10/lib/site_perl/5.17.10/i686-linux-thread-multi /home/kevin/perl5/perlbrew/perls/perl-5.17.10/lib/site_perl/5.17.10 /home/kevin/perl5/perlbrew/perls/perl-5.17.10/lib/5.17.10/i686-linux-thread-multi /home/kevin/perl5/perlbrew/perls/perl-5.17.10/lib/5.17.10 /home/kevin) at (eval 99) line 1. at /home/kevin/perl5/perlbrew/perls/perl-5.17.10/lib/site_perl/5.17.10/CPAN/Reporter.pm line 461. Test report will not be sent MLEHMANN/JSON-XS-2.33.tar.gz /usr/bin/make test -- NOT OK //hint// to see the cpan-testers results for installing this module, try: reports MLEHMANN/JSON-XS-2.33.tar.gz Running make install make test had returned bad status, won't install without force
The problem looks to me like it is due to the fact that under 5.17.10 hash iteration is randomized on a per-hash basis (per perl51710delta). The failing tests appear to be round-trip tests that assume identical hashes serialize identically. The attached patch fixes the failures (for me) by calling ->canonical() on the JSON::XS objects involved.
Subject: JSON-XS.patch
--- t/19_incr.old 2008-06-22 08:05:49.000000000 -0400 +++ t/19_incr.t 2013-03-22 16:24:42.000000000 -0400 @@ -24,10 +24,10 @@ } } -splitter +JSON::XS->new , ' ["x\\"","\\u1000\\\\n\\nx",1,{"\\\\" :5 , "": "x"}]'; -splitter +JSON::XS->new , '[ "x\\"","\\u1000\\\\n\\nx" , 1,{"\\\\ " :5 , "": " x"} ] '; -splitter +JSON::XS->new->allow_nonref, '"test"'; -splitter +JSON::XS->new->allow_nonref, ' "5" '; +splitter +JSON::XS->new->canonical , ' ["x\\"","\\u1000\\\\n\\nx",1,{"\\\\" :5 , "": "x"}]'; +splitter +JSON::XS->new->canonical , '[ "x\\"","\\u1000\\\\n\\nx" , 1,{"\\\\ " :5 , "": " x"} ] '; +splitter +JSON::XS->new->allow_nonref->canonical, '"test"'; +splitter +JSON::XS->new->allow_nonref->canonical, ' "5" '; { my $text = '[5],{"":1} , [ 1,2, 3], {"3":null}';
CC: bowtie [...] cpan.org, ether [...] cpan.org
Subject: Re: [rt.cpan.org #84151] fails to install against perl 5.17.10
Date: Fri, 22 Mar 2013 20:44:01 +0000
To: bug-JSON-XS [...] rt.cpan.org
From: kevin dawson <kevin [...] dawson10.plus.com>
On 2013-03-22 20:30, Tom Wyant via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=84151 > > > The problem looks to me like it is due to the fact that under 5.17.10 hash iteration is randomized on a per-hash basis (per perl51710delta). The failing tests appear to be round-trip tests that assume identical hashes serialize identically. > > The attached patch fixes the failures (for me) by calling ->canonical() on the JSON::XS objects involved.
Tom I have applied patch ran tests with prove then forced JSON::XS now testing against perl-5.17.10 regards bowtie
On 2013-03-22 16:44:15, kevin@dawson10.plus.com wrote: Show quoted text
> now testing against perl-5.17.10
Did it work? Looking forward to a release with a fix. Thanks, David
Subject: Re: [rt.cpan.org #84151] fails to install against perl 5.17.10
Date: Mon, 08 Apr 2013 23:14:58 +0100
To: bug-JSON-XS [...] rt.cpan.org
From: kevin dawson <kevin [...] dawson10.plus.com>
On 2013-04-08 23:01, David Wheeler via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=84151 > > > On 2013-03-22 16:44:15, kevin@dawson10.plus.com wrote: >
>> now testing against perl-5.17.10
> Did it work? Looking forward to a release with a fix. > > Thanks, > > David > >
David wyant patch works, but you are not the only module to fall foul of this hash issue, https://rt.perl.org/rt3//Public/Bug/Display.html?id=115908 please release regards kevin
Subject: fails to install against perl 5.17.10 (and 5.18.0)
For the record: This problem persists under Perl 5.18.0. The patch that has been provided resolves the problem, and just needs to be applied to the next release. This bug will also cause JSON to fail to install, unless the user opts to install without JSON::XS (which is not the default).
MLEHMANN doesn't pay any attention to RT, I have emailed him to notify him of this.
Subject: Re: [rt.cpan.org #84151] fails to install against perl 5.17.10
Date: Tue, 21 May 2013 00:21:53 +0100
To: bug-JSON-XS [...] rt.cpan.org
From: kevin dawson <kevin [...] dawson10.plus.com>
On 21/05/13 00:12, David Cantrell via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=84151 > > > MLEHMANN doesn't pay any attention to RT, I have emailed him to notify him of this. >
Hi David, here are some snippets for you: I will send mark another reminder 10 days after first, regards kevin aka bowtie snippet 1, 2013-04-21 On Sun, Apr 21, 2013 at 05:53:44PM +0100, kevin dawson<kevin@dawson10.plus.com> wrote: Show quoted text
> hi mark
Marc btw. Show quoted text
> works in perl-5.17.10 and perl-5.17.11
5.17 is not a stable release - I will release a new version with a workaround for this bug when 5.18 is released and still has this bug. I do not work around perl bugs when they only affect unstable releasess of perl. -- The choice of a Deliantra, the free code+content MORPG -----==- _GNU_ http://www.deliantra.net ----==-- _ generation ---==---(_)__ __ ____ __ Marc Lehmann --==---/ / _ \/ // /\ \/ / schmorp@schmorp.de -=====/_/_//_/\_,_/ /_/\_\ Snippet 2, 2013-05-18 Hi Marc. I thought I would give you a nudge re: JSON::XS and perl-5.18.0 https://metacpan.org/module/RJBS/perl-5.18.0/pod/perl.pod regards kevin