Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Storable - storing 'code' test failure #12012

Closed
p5pRT opened this issue Mar 22, 2012 · 12 comments
Closed

Storable - storing 'code' test failure #12012

p5pRT opened this issue Mar 22, 2012 · 12 comments

Comments

@p5pRT
Copy link

p5pRT commented Mar 22, 2012

Migrated from rt.perl.org#111936 (status was 'resolved')

Searchable as RT111936$

@p5pRT
Copy link
Author

p5pRT commented Mar 22, 2012

From samuel.ferencik@barclays.com

This is a bug report for perl from sferencik@​gmail.com,
generated with the help of perlbug 1.35 running under perl v5.8.5.

I'm installing Storable 2.30. Here are some observations from t/code.t​:

1) I get test failures when freezing/thawing Test​::More​::ok​:

  not ok 44
  # Failed test (t/code.t at line 269)
  # got​: 'code sub ($;$) {
  # package Test​::More;
  # use strict 'refs';
  # my($test, $name) = @​_;
  # $Test->ok($test, $name);
  # } caused an error​: Global symbol "$Test" requires explicit package name at (eval 85)[t/code.t​:259] line 5, at t/code.t line 268
  # '
  # expected​: ''

  Obviously, $Test, a my variable in t/compat/Test/More.pm, is not frozen well
  into thte code reference.

  Tests 45-49 fail too.

  This works better on my Perl 5.8.8 on Windows, where it's frozen like so​:
 
  sub {
  package Test​::More;
  use strict \'refs\';
  my($test, $name) = @​_;
  my $tb = \'Test​::More\'->builder;
  $tb->ok($test, $name);
  }';

  In both cases it's Storable 2.30. Either the test should be skipped, or a
  dependency added to the package so it would succeed.

2) There is error output from code.t, observable only when code.t is run with
  the debugger. Also observable when I run the same test on my Perl 5.8.8 on
  Windows​:

  perl -d -Iblib/lib -Iblib/arch t/code.t
  DB<1> c

  ...
  ok 33
  ok 34
  ok 35
  Can't store item CODE(0xf41830) at blib/lib/Storable.pm line 338.
  at blib/lib/Storable.pm line 338
  eval {...} called at blib/lib/Storable.pm line 338
  Storable​::_freeze('CODE(0xeb6640)', 'CODE(0xf41830)') called at blib/lib/Storable.pm line 317
  Storable​::freeze('CODE(0xf41830)') called at t/code.t line 197
  eval {...} called at t/code.t line 197
  ok 36
  ok 37
  ok 38

  I didn't investigate closer, since the tests pass.



Flags​:
  category=library
  severity=low


This perlbug was built using Perl v5.8.5 in the Red Hat build system.
It is being executed now by Perl v5.8.5 - Thu Mar 5 11​:03​:09 EST 2009.

Site configuration information for perl v5.8.5​:

Configured by Red Hat, Inc. at Thu Mar 5 11​:03​:09 EST 2009.

Summary of my perl5 (revision 5 version 8 subversion 5) configuration​:
  Platform​:
  osname=linux, osvers=2.6.18-128.1.1.el5, archname=x86_64-linux-thread-multi
  uname='linux ls20-bc1-14.build.redhat.com 2.6.18-128.1.1.el5 #1 smp mon jan 26 13​:58​:24 est 2009 x86_64 x86_64 x86_64 gnulinux '
  config_args='-des -Doptimize=-O2 -g -pipe -m64 -Dversion=5.8.5 -Dmyhostname=localhost -Dperladmin=root@​localhost -Dcc=gcc -Dcf_by=Red Hat, Inc. -Dinstallprefix=/usr -Dprefix=/usr -Dlibpth=/usr/local/lib64 /lib64 /usr/lib64 -Dprivlib=/usr/lib/perl5/5.8.5 -Dsitelib=/usr/lib/perl5/site_perl/5.8.5 -Dvendorlib=/usr/lib/perl5/vendor_perl/5.8.5 -Darchlib=/usr/lib64/perl5/5.8.5/x86_64-linux-thread-multi -Dsitearch=/usr/lib64/perl5/site_perl/5.8.5/x86_64-linux-thread-multi -Dvendorarch=/usr/lib64/perl5/vendor_perl/5.8.5/x86_64-linux-thread-multi -Darchname=x86_64-linux-thread-multi -Dvendorprefix=/usr -Dsiteprefix=/usr -Duseshrplib -Dusethreads -Duseithreads -Duselargefiles -Dd_dosuid -Dd_semctl_semun -Di_db -Ui_ndbm -Di_gdbm -Di_shadow -Di_syslog -Dman3ext=3pm -Duseperlio -Dinstallusrbinperl -Ubincompat5005 -Uversiononly -Dpager=/usr/bin/less -isr -Dinc_version_list=5.8.4 5.8.3 5.8.2 5.8.1 5.8.0'
  hint=recommended, useposix=true, d_sigaction=define
  usethreads=define use5005threads=undef useithreads=define usemultiplicity=define
  useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
  use64bitint=define use64bitall=define uselongdouble=undef
  usemymalloc=n, bincompat5005=undef
  Compiler​:
  cc='gcc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DDEBUGGING -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm',
  optimize='-O2 -g -pipe -m64',
  cppflags='-D_REENTRANT -D_GNU_SOURCE -DDEBUGGING -fno-strict-aliasing -pipe -I/usr/local/include -I/usr/include/gdbm'
  ccversion='', gccversion='3.4.6 20060404 (Red Hat 3.4.6-10)', gccosandvers=''
  intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
  d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
  ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
  alignbytes=8, prototype=define
  Linker and Libraries​:
  ld='gcc', ldflags =''
  libpth=/usr/local/lib64 /lib64 /usr/lib64
  libs=-lresolv -lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lpthread -lc
  perllibs=-lresolv -lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
  libc=/lib/libc-2.3.3.so, so=so, useshrplib=true, libperl=libperl.so
  gnulibc_version='2.3.4'
  Dynamic Linking​:
  dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E -Wl,-rpath,/usr/lib64/perl5/5.8.5/x86_64-linux-thread-multi/CORE'
  cccdlflags='-fPIC', lddlflags='-shared'

Locally applied patches​:
 


@​INC for perl v5.8.5​:
  /usr/lib64/perl5/5.8.5/x86_64-linux-thread-multi
  /usr/lib/perl5/5.8.5
  /usr/lib64/perl5/site_perl/5.8.5/x86_64-linux-thread-multi
  /usr/lib/perl5/site_perl/5.8.5
  /usr/lib/perl5/site_perl
  /usr/lib64/perl5/vendor_perl/5.8.5/x86_64-linux-thread-multi
  /usr/lib/perl5/vendor_perl/5.8.5
  /usr/lib64/perl5/vendor_perl/5.8.3/x86_64-linux-thread-multi
  /usr/lib/perl5/vendor_perl
  .


Environment for perl v5.8.5​:
  HOME=/apps/users/sysQuant
  LANG=C
  LANGUAGE (unset)
  LD_LIBRARY_PATH (unset)
  LOGDIR (unset)
  PATH=/ns/local/apps/internal/QA.PLATFORM/lib/freetds/bin​:/apps/users/sysQuant/jdk64/bin​:/apps/users/sysQuant/swig/bin​:/apps/users/sysQuant/bin​:/home/share/gcc/bin​:/home/share/tools/bin​:/usr/kerberos/bin​:/bin​:/sbin​:/usr/bin​:/usr/sbin​:/usr/bin/X11​:/usr/X11R6/bin​:/usr/local/bin​:/usr/local/sbin​:/opt/quest/bin​:/opt/quest/sbin​:/opt/csw/bin​:/opt/csw/sbin
  PERL_BADLANG (unset)
  SHELL=/bin/bash
_______________________________________________

This e-mail may contain information that is confidential, privileged or otherwise protected from
disclosure. If you are not an intended recipient of this e-mail, do not duplicate or redistribute
it by any means. Please delete it and any attachments and notify the sender that you have received
it in error. Unless specifically indicated, this e-mail is not an offer to buy or sell or a
solicitation to buy or sell any securities, investment products or other financial product or
service, an official confirmation of any transaction, or an official statement of Barclays. Any
views or opinions presented are solely those of the author and do not necessarily represent those
of Barclays. This e-mail is subject to terms available at the following link​: www.barcap.com/emaildisclaimer.
By messaging with Barclays you consent to the foregoing. Barclays offers premier investment banking
products and services to its clients through Barclays Bank PLC, a company registered in England
(number 1026167) with its registered office at 1 Churchill Place, London, E14 5HP. This email may
relate to or be sent from other members of the Barclays Group.

_______________________________________________

@p5pRT
Copy link
Author

p5pRT commented Mar 24, 2012

From @jkeenan

On Thu Mar 22 07​:59​:46 2012, samuel.ferencik@​barclays.com wrote​:

This is a bug report for perl from sferencik@​gmail.com,
generated with the help of perlbug 1.35 running under perl v5.8.5.

I'm installing Storable 2.30. Here are some observations from
t/code.t​:

1) I get test failures when freezing/thawing Test​::More​::ok​:

Perl 5.8.5 is no longer supported. Can you try this with the current
supported version of Perl, 5.14.2? If you install that, you will
probably also get Storable version 2.34 along with it.

Thank you very much.
Jim Keenan

@p5pRT
Copy link
Author

p5pRT commented Mar 24, 2012

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Mar 24, 2012

From @cpansprout

On Fri Mar 23 18​:04​:54 2012, jkeenan wrote​:

On Thu Mar 22 07​:59​:46 2012, samuel.ferencik@​barclays.com wrote​:

This is a bug report for perl from sferencik@​gmail.com,
generated with the help of perlbug 1.35 running under perl v5.8.5.

I'm installing Storable 2.30. Here are some observations from
t/code.t​:

1) I get test failures when freezing/thawing Test​::More​::ok​:

Perl 5.8.5 is no longer supported. Can you try this with the current
supported version of Perl, 5.14.2? If you install that, you will
probably also get Storable version 2.34 along with it.

In any case, the tests for the CPAN Storable distribution shouldn’t be
making unsafe assumptions.

--

Father Chrysostomos

@p5pRT
Copy link
Author

p5pRT commented Mar 24, 2012

From @cpansprout

On Sat Mar 24 09​:38​:15 2012, sprout wrote​:

On Fri Mar 23 18​:04​:54 2012, jkeenan wrote​:

On Thu Mar 22 07​:59​:46 2012, samuel.ferencik@​barclays.com wrote​:

This is a bug report for perl from sferencik@​gmail.com,
generated with the help of perlbug 1.35 running under perl v5.8.5.

I'm installing Storable 2.30. Here are some observations from
t/code.t​:

1) I get test failures when freezing/thawing Test​::More​::ok​:

Perl 5.8.5 is no longer supported. Can you try this with the current
supported version of Perl, 5.14.2? If you install that, you will
probably also get Storable version 2.34 along with it.

In any case, the tests for the CPAN Storable distribution shouldn’t be
making unsafe assumptions.

Also, I don’t think the lack of support for 5.8.x (in the sense of there
being new maintenance releases coming) should affect the support of CPAN
modules for existing 5.8.x distributions. This ticket is, of course
about the CPAN distribution, for which blead is upstream.

--

Father Chrysostomos

@p5pRT
Copy link
Author

p5pRT commented Apr 23, 2012

From @cpansprout

On Sat Mar 24 09​:39​:38 2012, sprout wrote​:

On Sat Mar 24 09​:38​:15 2012, sprout wrote​:

On Fri Mar 23 18​:04​:54 2012, jkeenan wrote​:

On Thu Mar 22 07​:59​:46 2012, samuel.ferencik@​barclays.com wrote​:

This is a bug report for perl from sferencik@​gmail.com,
generated with the help of perlbug 1.35 running under perl v5.8.5.

I'm installing Storable 2.30. Here are some observations from
t/code.t​:

1) I get test failures when freezing/thawing Test​::More​::ok​:

Perl 5.8.5 is no longer supported. Can you try this with the current
supported version of Perl, 5.14.2? If you install that, you will
probably also get Storable version 2.34 along with it.

In any case, the tests for the CPAN Storable distribution shouldn’t be
making unsafe assumptions.

Also, I don’t think the lack of support for 5.8.x (in the sense of there
being new maintenance releases coming) should affect the support of CPAN
modules for existing 5.8.x distributions. This ticket is, of course
about the CPAN distribution, for which blead is upstream.

Actually, I can’t reproduce this at all. The t/code.t that comes with
Storable 2.30 doesn’t try to freeze Test​::More​::ok at all. So I can
only ask where this distribution came from. And was it really 2.30?

--

Father Chrysostomos

@p5pRT
Copy link
Author

p5pRT commented Apr 23, 2012

From samuel.ferencik@barclays.com

Actually, I can’t reproduce this at all. The t/code.t that comes with
Storable 2.30 doesn’t try to freeze Test​::More​::ok at all. So I can
only ask where this distribution came from. And was it really 2.30?

It is Storable 2.30 from CPAN. Are you running it on Perl 5.8.5 on Linux? (I've also tried 5.8.8 on both Linux and Windows, and t/code.t passed.)

Here is how I'm running it; the failure is reproducible consistently​:

  .../src$ perl t/code.t
  1..63
  ok 1
  ok 2
  ...
  ok 42
  ok 43
  Variable "$Test" is not imported at (eval 79) line 5.
  not ok 44
  # Failed test (t/code.t at line 269)
  # got​: 'code sub ($;$) {
  # package Test​::More;
  # use strict 'refs';
  # my($test, $name) = @​_;
  # $Test->ok($test, $name);
  # } caused an error​: Global symbol "$Test" requires explicit package name at (eval 79) line 5, at t/code.t line 268
  # '
  # expected​: ''
  not ok 45
  # Failed test (t/code.t at line 272)
  not ok 46
  # Failed test (t/code.t at line 272)
  not ok 47
  # Failed test (t/code.t at line 272)
  not ok 48
  # Failed test (t/code.t at line 272)
  not ok 49
  # Failed test (t/code.t at line 272)
  ok 50
  ok 51
  ...
  ok 62
  ok 63
  # Looks like you failed 6 tests of 63.

My version of code.t has this​:

  56 @​obj =
  57 ([\&code, # code reference
  58 sub { 6*7 },
  59 $blessed_code, # blessed code reference
  60 \&Another​::Package​::foo, # code in another package
  61 sub ($$;$) { 0 }, # prototypes
  62 sub { print "test\n" },
  63 \&Test​::More​::ok, # large scalar
  64 ],
...
267 $freezed = freeze $obj[0];
268 eval { $thawed = thaw $freezed };
269 is($@​, "");

Test​::More​::ok is frozen as $obj[0]->[6] on line 267, and the subsequent thawing fails on line 269.

Is your source different?

Sam

_______________________________________________

This e-mail may contain information that is confidential, privileged or otherwise protected from
disclosure. If you are not an intended recipient of this e-mail, do not duplicate or redistribute
it by any means. Please delete it and any attachments and notify the sender that you have received
it in error. Unless specifically indicated, this e-mail is not an offer to buy or sell or a
solicitation to buy or sell any securities, investment products or other financial product or
service, an official confirmation of any transaction, or an official statement of Barclays. Any
views or opinions presented are solely those of the author and do not necessarily represent those
of Barclays. This e-mail is subject to terms available at the following link​: www.barcap.com/emaildisclaimer.
By messaging with Barclays you consent to the foregoing. Barclays offers premier investment banking
products and services to its clients through Barclays Bank PLC, a company registered in England
(number 1026167) with its registered office at 1 Churchill Place, London, E14 5HP. This email may
relate to or be sent from other members of the Barclays Group.

_______________________________________________

@p5pRT
Copy link
Author

p5pRT commented Apr 23, 2012

From @cpansprout

On Mon Apr 23 03​:46​:18 2012, samuel.ferencik@​barclays.com wrote​:

Actually, I can’t reproduce this at all. The t/code.t that comes
with
Storable 2.30 doesn’t try to freeze Test​::More​::ok at all. So
I can
only ask where this distribution came from. And was it
really 2.30?

It is Storable 2.30 from CPAN. Are you running it on
Perl 5.8.5 on Linux? (I've also tried 5.8.8 on both Linux and Windows,
and t/code.t passed.)

Here is how I'm running it; the failure is
reproducible consistently​:

Is your source different?

Sorry for the noise. I must have been half asleep and confused two
different code.t files. Anyway I was probably looking at the one in
blead and thinking I was looking at the one on CPAN.

This problem was fixed in bleadperl by commit 89fa409 back in
September. So it just looks as though we need a new CPAN release.

--

Father Chrysostomos

@p5pRT
Copy link
Author

p5pRT commented Jun 6, 2012

From @cpansprout

On Mon Apr 23 06​:20​:33 2012, sprout wrote​:

So it just looks as though we need a new CPAN release.

rjbs​: Could you use your powers of persuasion and try to find a victim
to make a new Storable release? (I’m not volunteering.)

--

Father Chrysostomos

@p5pRT
Copy link
Author

p5pRT commented Jun 6, 2012

From [Unknown Contact. See original ticket]

On Mon Apr 23 06​:20​:33 2012, sprout wrote​:

So it just looks as though we need a new CPAN release.

rjbs​: Could you use your powers of persuasion and try to find a victim
to make a new Storable release? (I’m not volunteering.)

--

Father Chrysostomos

@p5pRT
Copy link
Author

p5pRT commented Jun 7, 2012

From @cpansprout

Resolved by the released of Storable 2.35.

@p5pRT
Copy link
Author

p5pRT commented Jun 7, 2012

@cpansprout - Status changed from 'open' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant