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

Bleadperl breaks Data-Printer-0.39 #16096

Closed
p5pRT opened this issue Aug 1, 2017 · 15 comments
Closed

Bleadperl breaks Data-Printer-0.39 #16096

p5pRT opened this issue Aug 1, 2017 · 15 comments
Labels
BBC Blead Breaks CPAN - changes in blead broke a cpan module(s)

Comments

@p5pRT
Copy link

p5pRT commented Aug 1, 2017

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

Searchable as RT131824$

@p5pRT
Copy link
Author

p5pRT commented Aug 1, 2017

From @jkeenan

Data-Printer-0.39 is failing on blead perl. Carlos Guevara called my
attention to these failures​:

http​://fast-matrix.cpantesters.org/?dist=Data-Printer;os=freebsd;perl=5.27.3;reports=1.

They persist as of commit 1fb2d10,
whereat I attempted to install via cpanm.

#####
$ /testing/blead/bin/prove -I/testing/blead/lib -vb t/19-tied.t
t/19-tied.t ..
ok 1 - untied scalar shows only the scalar
ok 2 - tied scalar contains tied message
ok 3 - cleared (untied) scalar again shows no tie information
ok 4 - untied array shows only the array
ok 5 - tied array contains tied message
ok 6 - cleared (untied) array again shows no tie information
ok 7 - untied hash shows only the hash
not ok 8 - tied hash contains tied message

# Failed test 'tied hash contains tied message'
# at t/19-tied.t line 139.
# got​: '{} (tied to Tie​::Fighter​::Hash)'
# expected​: '{
# test 42
# } (tied to Tie​::Fighter​::Hash)'
ok 9 - cleared (untied) hash again shows no tie information
ok 10 - untied handle properly referenced
ok 11 - untied handle shows only the handle itself
ok 12 - tied handle contains tied message
ok 13 - cleared (untied) handle again shows no tie information
1..13
# Looks like you failed 1 test of 13.
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/13 subtests

Test Summary Report


t/19-tied.t (Wstat​: 256 Tests​: 13 Failed​: 1)
  Failed test​: 8
  Non-zero exit status​: 1
Files=1, Tests=13, 0 wallclock secs ( 0.02 usr 0.00 sys + 0.06 cusr
0.01 csys = 0.09 CPU)
Result​: FAIL
#####

Not bisected, but damage occurred since July 21.

@p5pRT
Copy link
Author

p5pRT commented Aug 1, 2017

From @jkeenan

Summary of my perl5 (revision 5 version 27 subversion 3) configuration​:
  Commit id​: 1fb2d10
  Platform​:
  osname=linux
  osvers=4.4.0-87-generic
  archname=x86_64-linux
  uname='linux zareason 4.4.0-87-generic #110-ubuntu smp tue jul 18 12​:55​:35 utc 2017 x86_64 x86_64 x86_64 gnulinux '
  config_args='-des -Dusedevel -Uversiononly -Dprefix=/home/jkeenan/testing/blead -Dman1dir=none -Dman3dir=none'
  hint=recommended
  useposix=true
  d_sigaction=define
  useithreads=undef
  usemultiplicity=undef
  use64bitint=define
  use64bitall=define
  uselongdouble=undef
  usemymalloc=n
  default_inc_excludes_dot=define
  bincompat5005=undef
  Compiler​:
  cc='cc'
  ccflags ='-fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
  optimize='-O2'
  cppflags='-fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include'
  ccversion=''
  gccversion='5.4.0 20160609'
  gccosandvers=''
  intsize=4
  longsize=8
  ptrsize=8
  doublesize=8
  byteorder=12345678
  doublekind=3
  d_longlong=define
  longlongsize=8
  d_longdbl=define
  longdblsize=16
  longdblkind=3
  ivtype='long'
  ivsize=8
  nvtype='double'
  nvsize=8
  Off_t='off_t'
  lseeksize=8
  alignbytes=8
  prototype=define
  Linker and Libraries​:
  ld='cc'
  ldflags =' -fstack-protector-strong -L/usr/local/lib'
  libpth=/usr/local/lib /usr/lib/gcc/x86_64-linux-gnu/5/include-fixed /usr/include/x86_64-linux-gnu /usr/lib /lib/x86_64-linux-gnu /lib/../lib /usr/lib/x86_64-linux-gnu /usr/lib/../lib /lib /lib64 /usr/lib64
  libs=-lpthread -lnsl -ldb -ldl -lm -lcrypt -lutil -lc
  perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
  libc=libc-2.23.so
  so=so
  useshrplib=false
  libperl=libperl.a
  gnulibc_version='2.23'
  Dynamic Linking​:
  dlsrc=dl_dlopen.xs
  dlext=so
  d_dlsymun=undef
  ccdlflags='-Wl,-E'
  cccdlflags='-fPIC'
  lddlflags='-shared -O2 -L/usr/local/lib -fstack-protector-strong'

Characteristics of this binary (from libperl)​:
  Compile-time options​:
  HAS_TIMES
  PERLIO_LAYERS
  PERL_COPY_ON_WRITE
  PERL_DONT_CREATE_GVSV
  PERL_MALLOC_WRAP
  PERL_OP_PARENT
  PERL_PRESERVE_IVUV
  PERL_USE_DEVEL
  USE_64_BIT_ALL
  USE_64_BIT_INT
  USE_LARGE_FILES
  USE_LOCALE
  USE_LOCALE_COLLATE
  USE_LOCALE_CTYPE
  USE_LOCALE_NUMERIC
  USE_LOCALE_TIME
  USE_PERLIO
  USE_PERL_ATOF
  Built under linux
  Compiled at Jul 31 2017 19​:30​:11
  %ENV​:
  PERLBREW_BASHRC_VERSION="0.78"
  PERLBREW_HOME="/home/jkeenan/.perlbrew"
  PERLBREW_MANPATH="/home/jkeenan/perl5/perlbrew/perls/perl-5.26.0/man"
  PERLBREW_PATH="/home/jkeenan/perl5/perlbrew/bin​:/home/jkeenan/perl5/perlbrew/perls/perl-5.26.0/bin"
  PERLBREW_PERL="perl-5.26.0"
  PERLBREW_ROOT="/home/jkeenan/perl5/perlbrew"
  PERLBREW_VERSION="0.78"
  PERL_WORKDIR="/home/jkeenan/gitwork/perl"
  @​INC​:
  lib
  /home/jkeenan/testing/blead/lib/perl5/site_perl/5.27.3/x86_64-linux
  /home/jkeenan/testing/blead/lib/perl5/site_perl/5.27.3
  /home/jkeenan/testing/blead/lib/perl5/5.27.3/x86_64-linux
  /home/jkeenan/testing/blead/lib/perl5/5.27.3

@p5pRT
Copy link
Author

p5pRT commented Aug 1, 2017

From @jkeenan

On Tue, 01 Aug 2017 00​:09​:32 GMT, jkeenan@​pobox.com wrote​:

Data-Printer-0.39 is failing on blead perl. Carlos Guevara called my
attention to these failures​:

http​://fast-matrix.cpantesters.org/?dist=Data-
Printer;os=freebsd;perl=5.27.3;reports=1.

They persist as of commit 1fb2d10,
whereat I attempted to install via cpanm.

#####
$ /testing/blead/bin/prove -I/testing/blead/lib -vb t/19-tied.t
t/19-tied.t ..
ok 1 - untied scalar shows only the scalar
ok 2 - tied scalar contains tied message
ok 3 - cleared (untied) scalar again shows no tie information
ok 4 - untied array shows only the array
ok 5 - tied array contains tied message
ok 6 - cleared (untied) array again shows no tie information
ok 7 - untied hash shows only the hash
not ok 8 - tied hash contains tied message

# Failed test 'tied hash contains tied message'
# at t/19-tied.t line 139.
# got​: '{} (tied to Tie​::Fighter​::Hash)'
# expected​: '{
# test 42
# } (tied to Tie​::Fighter​::Hash)'
ok 9 - cleared (untied) hash again shows no tie information
ok 10 - untied handle properly referenced
ok 11 - untied handle shows only the handle itself
ok 12 - tied handle contains tied message
ok 13 - cleared (untied) handle again shows no tie information
1..13
# Looks like you failed 1 test of 13.
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/13 subtests

Test Summary Report
-------------------
t/19-tied.t (Wstat​: 256 Tests​: 13 Failed​: 1)
Failed test​: 8
Non-zero exit status​: 1
Files=1, Tests=13, 0 wallclock secs ( 0.02 usr 0.00 sys + 0.06
cusr
0.01 csys = 0.09 CPU)
Result​: FAIL
#####

Not bisected, but damage occurred since July 21.

Data-Printer was doing fine as of 0283ad9, so the breakage probably occurred during the large merge on July 27.

--
James E Keenan (jkeenan@​cpan.org)

@p5pRT
Copy link
Author

p5pRT commented Aug 1, 2017

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

@p5pRT
Copy link
Author

p5pRT commented Aug 1, 2017

From @jkeenan

On Tue, 01 Aug 2017 00​:19​:35 GMT, jkeenan wrote​:

On Tue, 01 Aug 2017 00​:09​:32 GMT, jkeenan@​pobox.com wrote​:

Data-Printer-0.39 is failing on blead perl. Carlos Guevara called my
attention to these failures​:

http​://fast-matrix.cpantesters.org/?dist=Data-
Printer;os=freebsd;perl=5.27.3;reports=1.

They persist as of commit 1fb2d10,
whereat I attempted to install via cpanm.

#####
$ /testing/blead/bin/prove -I/testing/blead/lib -vb t/19-tied.t
t/19-tied.t ..
ok 1 - untied scalar shows only the scalar
ok 2 - tied scalar contains tied message
ok 3 - cleared (untied) scalar again shows no tie information
ok 4 - untied array shows only the array
ok 5 - tied array contains tied message
ok 6 - cleared (untied) array again shows no tie information
ok 7 - untied hash shows only the hash
not ok 8 - tied hash contains tied message

# Failed test 'tied hash contains tied message'
# at t/19-tied.t line 139.
# got​: '{} (tied to Tie​::Fighter​::Hash)'
# expected​: '{
# test 42
# } (tied to Tie​::Fighter​::Hash)'
ok 9 - cleared (untied) hash again shows no tie information
ok 10 - untied handle properly referenced
ok 11 - untied handle shows only the handle itself
ok 12 - tied handle contains tied message
ok 13 - cleared (untied) handle again shows no tie information
1..13
# Looks like you failed 1 test of 13.
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/13 subtests

Test Summary Report
-------------------
t/19-tied.t (Wstat​: 256 Tests​: 13 Failed​: 1)
Failed test​: 8
Non-zero exit status​: 1
Files=1, Tests=13, 0 wallclock secs ( 0.02 usr 0.00 sys + 0.06
cusr
0.01 csys = 0.09 CPU)
Result​: FAIL
#####

Not bisected, but damage occurred since July 21.

Data-Printer was doing fine as of 0283ad9, so the breakage
probably occurred during the large merge on July 27.

This can be reduced to the program attached. Run with perl-5.26.0 or at commit 0283ad9 (before the MERGE), it produces​:

#####
BEFORE TIE​: foo
AFTER TIE​: test
string is empty, as expected
#####

Run at, say, commit 1fb2d10 (after the MERGE), it produces​:

#####
BEFORE TIE​: foo
AFTER TIE​: test
string is NOT empty​: <{}>
#####

Thank you very much.

--
James E Keenan (jkeenan@​cpan.org)

@p5pRT
Copy link
Author

p5pRT commented Aug 1, 2017

From @jkeenan

131824-keys-tied-hash.pl

@p5pRT
Copy link
Author

p5pRT commented Aug 1, 2017

From @iabyn

On Mon, Jul 31, 2017 at 06​:40​:19PM -0700, James E Keenan via RT wrote​:

This can be reduced to the program attached. Run with perl-5.26.0 or at commit 0283ad9 (before the MERGE), it produces​:

#####
BEFORE TIE​: foo
AFTER TIE​: test
string is empty, as expected
#####

Run at, say, commit 1fb2d10 (after the MERGE), it produces​:

#####
BEFORE TIE​: foo
AFTER TIE​: test
string is NOT empty​: <{}>
#####

Thanks for the reduction. It fails because the test file t/19-tied.t has
an invalid SCALAR() method.

Reducing it further to

  sub TIEHASH { bless { test => 1} }

  sub FIRSTKEY {
  my $self = shift;
  my $a = keys %$self; # reset each() iterator
  return each %$self;
  }

  sub NEXTKEY {
  my $self = shift;
  return each %$self;
  }

  sub SCALAR { }

  my %var;
  tie %var, 'main';
  print "NOT EMPTY (via hash test)\n" if %var;
  print "NOT EMPTY (via keys test)\n" if keys %var;

produces this output with 5.27.2​:

  NOT EMPTY (via keys test)

and produces no output on blead, because 'scalar(keys %tied)' in boolean
context now calls SCALAR() to determine whether the hash is empty, like
is already does with 'scalar(%h)' in boolean context.

A look on grep.cpan.me shows 3 distributions that have an empty SCALAR
method​:

  Data-Printer-0.39/t/19-tied.t
  Tie-TinyURL-0.02/lib/Tie/TinyURL.pm
  HTML-Template-Pro-0.9510/lib/HTML/Template/Pro/WrapAssociate.pm

--
Spock (or Data) is fired from his high-ranking position for not being able
to understand the most basic nuances of about one in three sentences that
anyone says to him.
  -- Things That Never Happen in "Star Trek" #19

@p5pRT
Copy link
Author

p5pRT commented Aug 1, 2017

From @jkeenan

On Tue, 01 Aug 2017 07​:48​:24 GMT, davem wrote​:

On Mon, Jul 31, 2017 at 06​:40​:19PM -0700, James E Keenan via RT wrote​:

This can be reduced to the program attached. Run with perl-5.26.0 or
at commit 0283ad9 (before the MERGE), it produces​:

#####
BEFORE TIE​: foo
AFTER TIE​: test
string is empty, as expected
#####

Run at, say, commit 1fb2d10 (after
the MERGE), it produces​:

#####
BEFORE TIE​: foo
AFTER TIE​: test
string is NOT empty​: <{}>
#####

Thanks for the reduction. It fails because the test file t/19-tied.t
has
an invalid SCALAR() method.

Reducing it further to

sub TIEHASH { bless { test => 1} }

sub FIRSTKEY {
my $self = shift;
my $a = keys %$self; # reset each() iterator
return each %$self;
}

sub NEXTKEY {
my $self = shift;
return each %$self;
}

sub SCALAR { }

my %var;
tie %var, 'main';
print "NOT EMPTY (via hash test)\n" if %var;
print "NOT EMPTY (via keys test)\n" if keys %var;

produces this output with 5.27.2​:

NOT EMPTY (via keys test)

and produces no output on blead, because 'scalar(keys %tied)' in
boolean
context now calls SCALAR() to determine whether the hash is empty,
like
is already does with 'scalar(%h)' in boolean context.

A look on grep.cpan.me shows 3 distributions that have an empty SCALAR
method​:

Data-Printer-0.39/t/19-tied.t
Tie-TinyURL-0.02/lib/Tie/TinyURL.pm
HTML-Template-Pro-0.9510/lib/HTML/Template/Pro/WrapAssociate.pm

So this is a case where "CPAN had suboptimal code and blead came along and understandably broke it." What is the fix which we should recommend to the CPAN maintainers?

--
James E Keenan (jkeenan@​cpan.org)

@p5pRT
Copy link
Author

p5pRT commented Aug 1, 2017

From zefram@fysh.org

James E Keenan via RT wrote​:

So this is a case where "CPAN had suboptimal code and blead came along
and understandably broke it."

CPAN was doing something that might have permitted and blead made it
tacitly not permitted. The documentation on it remains as ambiguous as
it was before, though Dave is due to change that imminently. This was
precisely one of the subjects of the dialogue between me and Dave of
about a week ago.

What is the fix which we should recommend to the CPAN maintainers?

Delete the empty SCALAR method. This (or any other fix acceptable to
blead) entails a change of behaviour for scalar(%tied), so check that
you haven't documented that scalar(%tied) for your class returns undef.

-zefram

@p5pRT
Copy link
Author

p5pRT commented Aug 1, 2017

From @jkeenan

On Tue, 01 Aug 2017 07​:48​:24 GMT, davem wrote​:

On Mon, Jul 31, 2017 at 06​:40​:19PM -0700, James E Keenan via RT wrote​:

This can be reduced to the program attached. Run with perl-5.26.0 or
at commit 0283ad9 (before the MERGE), it produces​:

#####
BEFORE TIE​: foo
AFTER TIE​: test
string is empty, as expected
#####

Run at, say, commit 1fb2d10 (after
the MERGE), it produces​:

#####
BEFORE TIE​: foo
AFTER TIE​: test
string is NOT empty​: <{}>
#####

Thanks for the reduction. It fails because the test file t/19-tied.t
has
an invalid SCALAR() method.

Reducing it further to

sub TIEHASH { bless { test => 1} }

sub FIRSTKEY {
my $self = shift;
my $a = keys %$self; # reset each() iterator
return each %$self;
}

sub NEXTKEY {
my $self = shift;
return each %$self;
}

sub SCALAR { }

my %var;
tie %var, 'main';
print "NOT EMPTY (via hash test)\n" if %var;
print "NOT EMPTY (via keys test)\n" if keys %var;

produces this output with 5.27.2​:

NOT EMPTY (via keys test)

and produces no output on blead, because 'scalar(keys %tied)' in
boolean
context now calls SCALAR() to determine whether the hash is empty,
like
is already does with 'scalar(%h)' in boolean context.

A look on grep.cpan.me shows 3 distributions that have an empty SCALAR
method​:

Data-Printer-0.39/t/19-tied.t
Tie-TinyURL-0.02/lib/Tie/TinyURL.pm

Tie-TinyURL fails tests against Perl 5 blead (v5.27.2-87-gdf84d7b) -- but the failures occur whether or not I comment out 'sub SCALAR {}'.

HTML-Template-Pro-0.9510/lib/HTML/Template/Pro/WrapAssociate.pm

HTML-Template-Pro tests and installs successfully against Perl 5 blead. (Of course, it may be the case that its test suite doesn't touch 'sub SCALAR {}'.)

Thank you very much.
Jim Keenan

--
James E Keenan (jkeenan@​cpan.org)

@p5pRT
Copy link
Author

p5pRT commented Aug 2, 2017

From @garu

Data-Printer 0.40 was just pushed to CPAN with the fix. Works on my blead now :)

Many thanks to Jim, Dave and Zefram for finding and debugging this.

Cheers!

garu

On Tue, 01 Aug 2017 07​:05​:53 -0700, zefram@​fysh.org wrote​:

James E Keenan via RT wrote​:

So this is a case where "CPAN had suboptimal code and blead came along
and understandably broke it."

CPAN was doing something that might have permitted and blead made it
tacitly not permitted. The documentation on it remains as ambiguous as
it was before, though Dave is due to change that imminently. This was
precisely one of the subjects of the dialogue between me and Dave of
about a week ago.

What is the fix which we should recommend to the CPAN maintainers?

Delete the empty SCALAR method. This (or any other fix acceptable to
blead) entails a change of behaviour for scalar(%tied), so check that
you haven't documented that scalar(%tied) for your class returns undef.

-zefram

@p5pRT
Copy link
Author

p5pRT commented Aug 2, 2017

From @jkeenan

On Wed, 02 Aug 2017 01​:16​:54 GMT, garu wrote​:

Data-Printer 0.40 was just pushed to CPAN with the fix. Works on my
blead now :)

Many thanks to Jim, Dave and Zefram for finding and debugging this.

Confirmed.

#####
./bin/cpanm Data​::Printer
--> Working on Data​::Printer
Fetching http​://www.cpan.org/authors/id/G/GA/GARU/Data-Printer-0.40.tar.gz ... OK
Configuring Data-Printer-0.40 ... OK
Building and testing Data-Printer-0.40 ... OK
Successfully installed Data-Printer-0.40
1 distribution installed
#####

Marking ticket Resolved.

Thank you very much.
--
James E Keenan (jkeenan@​cpan.org)

@p5pRT p5pRT closed this as completed Aug 2, 2017
@p5pRT
Copy link
Author

p5pRT commented Aug 2, 2017

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

@p5pRT
Copy link
Author

p5pRT commented Aug 4, 2017

From @iabyn

On Tue, Aug 01, 2017 at 03​:07​:49PM -0700, James E Keenan via RT wrote​:

Tie-TinyURL fails tests against Perl 5 blead (v5.27.2-87-gdf84d7b) -- but the failures occur whether or not I comment out 'sub SCALAR {}'.

It also fails against 5.27.2, so it isn't a regression.

--
My get-up-and-go just got up and went.

@p5pRT
Copy link
Author

p5pRT commented Aug 4, 2017

From @jkeenan

On Fri, 04 Aug 2017 11​:30​:43 GMT, davem wrote​:

On Tue, Aug 01, 2017 at 03​:07​:49PM -0700, James E Keenan via RT wrote​:

Tie-TinyURL fails tests against Perl 5 blead (v5.27.2-87-gdf84d7b) --
but the failures occur whether or not I comment out 'sub SCALAR {}'.

It also fails against 5.27.2, so it isn't a regression.

Agreed. The APIs used in the test file have probably changed since the tests were originally written. So not relevant to the subject of this RT.
--
James E Keenan (jkeenan@​cpan.org)

@p5pRT p5pRT added BBC Blead Breaks CPAN - changes in blead broke a cpan module(s) Severity Low labels Oct 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BBC Blead Breaks CPAN - changes in blead broke a cpan module(s)
Projects
None yet
Development

No branches or pull requests

1 participant