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 v5.21.1-127-g29e61fd breaks MBARBON/Module-Info-0.35.tar.gz #13974

Closed
p5pRT opened this issue Jul 9, 2014 · 16 comments
Closed

Bleadperl v5.21.1-127-g29e61fd breaks MBARBON/Module-Info-0.35.tar.gz #13974

p5pRT opened this issue Jul 9, 2014 · 16 comments

Comments

@p5pRT
Copy link

p5pRT commented Jul 9, 2014

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

Searchable as RT122251$

@p5pRT
Copy link
Author

p5pRT commented Jul 9, 2014

From @andk

git bisect


commit 29e61fd
Author​: David Mitchell <davem@​iabyn.com>
Date​: Fri Jun 27 11​:52​:44 2014 +0100

  add op_lastsib and -DPERL_OP_PARENT

diagnostics


Running Build test
t/Module-Info.t .......... 1/59 # Failed test (t/Module-Info.t at line 82)
# got​: '4'
# expected​: '3'
# Failed test (t/Module-Info.t at line 83)
# Structures begin differing at​:
# $got->[3] = 'Subroutine B​::OP​::parent redefined at blib/lib/B/BUtils.pm line 217.'
# $expected->[3] = Does not exist
# Failed test (t/Module-Info.t at line 88)
# got​: '4'
# expected​: '3'
# Failed test (t/Module-Info.t at line 89)
# got​: undef
# expected​: '0.35'
t/Module-Info.t .......... 14/59 # Failed test (t/Module-Info.t at line 185)
# got​: '3'
# expected​: '2'
# Failed test (t/Module-Info.t at line 186)
# Failed test (t/Module-Info.t at line 189)
# got​: '3'
# expected​: '2'
# Failed test (t/Module-Info.t at line 190)
# got​: 'Illegal division by zero at -e line 1.'
# expected​: '7.254'
t/Module-Info.t .......... 56/59 # Looks like you failed 8 tests of 59.
t/Module-Info.t .......... Dubious, test returned 8 (wstat 2048, 0x800)
Failed 8/59 subtests

perl -V


Summary of my perl5 (revision 5 version 21 subversion 2) configuration​:
  Commit id​: 29e61fd
  Platform​:
  osname=linux, osvers=3.14-1-amd64, archname=x86_64-linux
  uname='linux k83 3.14-1-amd64 #1 smp debian 3.14.5-1 (2014-06-05) x86_64 gnulinux '
  config_args='-Dprefix=/home/sand/src/perl/repoperls/installed-perls/perl/v5.21.1-127-g29e61fd/165a -Dmyhostname=k83 -Dinstallusrbinperl=n -Uversiononly -Dusedevel -des -Ui_db -Uuseithreads -Uuselongdouble -DDEBUGGING=-g'
  hint=recommended, useposix=true, d_sigaction=define
  useithreads=undef, usemultiplicity=undef
  use64bitint=define, use64bitall=define, uselongdouble=undef
  usemymalloc=n, bincompat5005=undef
  Compiler​:
  cc='cc', ccflags ='-fwrapv -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2',
  optimize='-O2 -g',
  cppflags='-fwrapv -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include'
  ccversion='', gccversion='4.8.3', 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='cc', ldflags =' -fstack-protector -L/usr/local/lib'
  libpth=/usr/local/lib /usr/lib/gcc/x86_64-linux-gnu/4.8/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
  libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc -lgdbm_compat
  perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc
  libc=libc-2.19.so, so=so, useshrplib=false, libperl=libperl.a
  gnulibc_version='2.19'
  Dynamic Linking​:
  dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
  cccdlflags='-fPIC', lddlflags='-shared -O2 -g -L/usr/local/lib -fstack-protector'

Characteristics of this binary (from libperl)​:
  Compile-time options​: HAS_TIMES PERLIO_LAYERS PERL_DONT_CREATE_GVSV
  PERL_HASH_FUNC_ONE_AT_A_TIME_HARD PERL_MALLOC_WRAP
  PERL_NEW_COPY_ON_WRITE 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_PERLIO
  USE_PERL_ATOF
  Built under linux
  Compiled at Jul 9 2014 07​:53​:35
  @​INC​:
  /home/sand/src/perl/repoperls/installed-perls/perl/v5.21.1-127-g29e61fd/165a/lib/site_perl/5.21.2/x86_64-linux
  /home/sand/src/perl/repoperls/installed-perls/perl/v5.21.1-127-g29e61fd/165a/lib/site_perl/5.21.2
  /home/sand/src/perl/repoperls/installed-perls/perl/v5.21.1-127-g29e61fd/165a/lib/5.21.2/x86_64-linux
  /home/sand/src/perl/repoperls/installed-perls/perl/v5.21.1-127-g29e61fd/165a/lib/5.21.2
  .

--
andreas

@p5pRT
Copy link
Author

p5pRT commented Jul 9, 2014

From @jkeenan

On Tue Jul 08 23​:39​:34 2014, andreas.koenig.7os6VVqR@​franz.ak.mind.de wrote​:

git bisect
----------
commit 29e61fd
Author​: David Mitchell <davem@​iabyn.com>
Date​: Fri Jun 27 11​:52​:44 2014 +0100

add op_lastsib and -DPERL_OP_PARENT

diagnostics
-----------
Running Build test
t/Module-Info.t .......... 1/59 # Failed test (t/Module-Info.t at
line 82)
# got​: '4'
# expected​: '3'
# Failed test (t/Module-Info.t at line 83)
# Structures begin differing at​:
# $got->[3] = 'Subroutine B​::OP​::parent redefined at
blib/lib/B/BUtils.pm line 217.'
# $expected->[3] = Does not exist
# Failed test (t/Module-Info.t at line 88)
# got​: '4'
# expected​: '3'
# Failed test (t/Module-Info.t at line 89)
# got​: undef
# expected​: '0.35'
t/Module-Info.t .......... 14/59 # Failed test (t/Module-Info.t at
line 185)
# got​: '3'
# expected​: '2'
# Failed test (t/Module-Info.t at line 186)
# Failed test (t/Module-Info.t at line 189)
# got​: '3'
# expected​: '2'
# Failed test (t/Module-Info.t at line 190)
# got​: 'Illegal division by zero at -e line 1.'
# expected​: '7.254'
t/Module-Info.t .......... 56/59 # Looks like you failed 8 tests of
59.
t/Module-Info.t .......... Dubious, test returned 8 (wstat 2048,
0x800)
Failed 8/59 subtests

I tried to confirm this failure and could not, even though I tried building with both Makefile and Build.PL. Please see attachment.

Moreover, as Module-Info contains no .xs that I could locate, I would not expect it to show new failures at the commit in question.

Thank you very much.
Jim Keenan

@p5pRT
Copy link
Author

p5pRT commented Jul 9, 2014

From @jkeenan

[perl] 10 $ ~/gitwork/test-against-blead/have_blead_run_cpanm_only.sh Module​::Info
Testing Module​::Info against Perl 5 blead
++ chmod 0755 /home/jkeenan/testing/blead/bin/cpanm
++ /home/jkeenan/testing/blead/bin/cpanm --installdeps --local-lib-contained=/home/jkeenan/testing/blead Module​::Info
--> Working on Module​::Info
Fetching http​://www.cpan.org/authors/id/M/MB/MBARBON/Module-Info-0.35.tar.gz ... OK
Configuring Module-Info-0.35 ... OK
<== Installed dependencies for Module​::Info. Finishing.
++ set +x
About to cd a work space directory
From there, run '/home/jkeenan/testing/blead/bin/perl Makefile.PL'
And then, probably 'make test'
--> Working on Module​::Info
Fetching http​://www.cpan.org/authors/id/M/MB/MBARBON/Module-Info-0.35.tar.gz ... OK
Entering /home/jkeenan/.cpanm/work/1404906583.3623/Module-Info-0.35 with /bin/bash

[Module-Info-0.35] 1 $ /home/jkeenan/testing/blead/bin/perl Makefile.PL
Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for Module​::Info
Writing MYMETA.yml and MYMETA.json

[Module-Info-0.35] 2 $ make test
cp lib/B/Module/Info.pm blib/lib/B/Module/Info.pm
cp lib/Module/Info.pm blib/lib/Module/Info.pm
cp lib/B/BUtils.pm blib/lib/B/BUtils.pm
cp bin/pfunc blib/script/pfunc
/home/jkeenan/testing/blead/bin/perl -MExtUtils​::MY -e 'MY->fixin(shift)' -- blib/script/pfunc
cp bin/module_info blib/script/module_info
/home/jkeenan/testing/blead/bin/perl -MExtUtils​::MY -e 'MY->fixin(shift)' -- blib/script/module_info
PERL_DL_NONLAZY=1 /home/jkeenan/testing/blead/bin/perl "-MExtUtils​::Command​::MM" "-MTest​::Harness" "-e" "undef *Test​::Harness​::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/Module-Info.t .......... ok
t/n0_die_on_error.t ...... ok
t/n1_modules_required.t .. ok
t/n2_safe.t .............. ok
t/n3_version.t ........... ok
t/zy_pod_coverage.t ...... skipped​: Test​::Pod​::Coverage 1.00 required for testing POD coverage
t/zz_pod.t ............... skipped​: Test​::Pod 1.00 required for testing POD
All tests successful.
Files=7, Tests=88, 1 wallclock secs ( 0.04 usr 0.00 sys + 1.09 cusr 0.08 csys = 1.21 CPU)
Result​: PASS

[Module-Info-0.35] 5 $ /home/jkeenan/testing/blead/bin/perl Build.PL
Created MYMETA.yml and MYMETA.json
Creating new 'Build' script for 'Module-Info' version '0.35'

[Module-Info-0.35] 6 $ ./Build
Building Module-Info

[Module-Info-0.35] 7 $ ./Build test
t/Module-Info.t .......... ok
t/n0_die_on_error.t ...... ok
t/n1_modules_required.t .. ok
t/n2_safe.t .............. ok
t/n3_version.t ........... ok
t/zy_pod_coverage.t ...... skipped​: Test​::Pod​::Coverage 1.00 required for testing POD coverage
t/zz_pod.t ............... skipped​: Test​::Pod 1.00 required for testing POD
All tests successful.
Files=7, Tests=88, 1 wallclock secs ( 0.04 usr 0.00 sys + 1.07 cusr 0.08 csys = 1.19 CPU)
Result​: PASS

@p5pRT
Copy link
Author

p5pRT commented Jul 9, 2014

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

@p5pRT
Copy link
Author

p5pRT commented Jul 9, 2014

From @ilmari

"James E Keenan via RT" <perlbug-followup@​perl.org> writes​:

On Tue Jul 08 23​:39​:34 2014, andreas.koenig.7os6VVqR@​franz.ak.mind.de wrote​:

git bisect
----------
commit 29e61fd
Author​: David Mitchell <davem@​iabyn.com>
Date​: Fri Jun 27 11​:52​:44 2014 +0100

add op_lastsib and -DPERL_OP_PARENT

diagnostics
-----------
Running Build test
t/Module-Info.t .......... 1/59 # Failed test (t/Module-Info.t at
line 82)
# got​: '4'
# expected​: '3'
# Failed test (t/Module-Info.t at line 83)
# Structures begin differing at​:
# $got->[3] = 'Subroutine B​::OP​::parent redefined at
blib/lib/B/BUtils.pm line 217.'

https://metacpan.org/source/MBARBON/Module-Info-0.35/lib/B/BUtils.pm#L217

Moreover, as Module-Info contains no .xs that I could locate, I would
not expect it to show new failures at the commit in question.

Well, it does define its own B​::OP​::parent method, which was also added
in the offending commit, so it's not really surprising if you actually
read the warning and the line of code it's coming from. Because of the
way it calls a separate perl process​:

  @​out = `$command 2>&1`;

(https://metacpan.org/source/MBARBON/Module-Info-0.35/lib/B/BUtils.pm#L217)

that warning will be intermingled with the normal output.

--
"A disappointingly low fraction of the human race is,
at any given time, on fire." - Stig Sandbeck Mathisen

@p5pRT
Copy link
Author

p5pRT commented Jul 9, 2014

From @iabyn

On Wed, Jul 09, 2014 at 02​:40​:14PM +0100, Dagfinn Ilmari Mannsåker wrote​:

"James E Keenan via RT" <perlbug-followup@​perl.org> writes​:

On Tue Jul 08 23​:39​:34 2014, andreas.koenig.7os6VVqR@​franz.ak.mind.de wrote​:

git bisect
----------
commit 29e61fd
Author​: David Mitchell <davem@​iabyn.com>
Date​: Fri Jun 27 11​:52​:44 2014 +0100

add op_lastsib and -DPERL_OP_PARENT

diagnostics
-----------
Running Build test
t/Module-Info.t .......... 1/59 # Failed test (t/Module-Info.t at
line 82)
# got​: '4'
# expected​: '3'
# Failed test (t/Module-Info.t at line 83)
# Structures begin differing at​:
# $got->[3] = 'Subroutine B​::OP​::parent redefined at
blib/lib/B/BUtils.pm line 217.'

https://metacpan.org/source/MBARBON/Module-Info-0.35/lib/B/BUtils.pm#L217

Moreover, as Module-Info contains no .xs that I could locate, I would
not expect it to show new failures at the commit in question.

Well, it does define its own B​::OP​::parent method, which was also added
in the offending commit, so it's not really surprising

Looking a bit further, it appears that the B​::Util in Module-Info is a
fork of the CPAN B​::Util module, and both define a B​::OP​::parent method,
which is a bit naughty of them.

Perhaps the best approach is for the B​::Util author(s) to make their
B​::OP​::parent method available only if the same method doesn't already
exist in B, or if it exists but perl was'nt built with -DPERL_OP_PARENT
(in which case the builtin B​::OP​::parent always just returns NULL.)

--
"Do not dabble in paradox, Edward, it puts you in danger of fortuitous wit."
  -- Lady Croom, "Arcadia"

@p5pRT
Copy link
Author

p5pRT commented Jul 12, 2014

From @rurban

On Fri, Jul 11, 2014 at 6​:02 AM, Dave Mitchell <davem@​iabyn.com> wrote​:

On Thu, Jul 10, 2014 at 09​:11​:55AM -0500, Reini Urban wrote​:

On Wed, Jul 9, 2014 at 9​:40 AM, Dave Mitchell <davem@​iabyn.com> wrote​:

Looking a bit further, it appears that the B​::Util in Module-Info is a
fork of the CPAN B​::Util module, and both define a B​::OP​::parent method,
which is a bit naughty of them.

Perhaps the best approach is for the B​::Util author(s) to make their
B​::OP​::parent method available only if the same method doesn't already
exist in B, or if it exists but perl was'nt built with -DPERL_OP_PARENT
(in which case the builtin B​::OP​::parent always just returns NULL.)

Fixed with mgruberman/B-Utils#10

Thanks.

Note that the builtin B​::OP​::parents deviates slightly from B​::Utils
that it returns B​::NULL instead of undef.
See https://github.com/rurban/B-Utils/commit/cf506c3a3fa40287fbd01bd24194770fe09d8700#diff-8036def766d91d6bd1d95741933c4a4dR59

I have no particular opinion on whether it's best to return undef or B​::NULL;
if you have a preference for undef, I can easily change B.xs.

I've checked a bit. Returning B​::NULL seems to be more consistent
across the board and is better.
E.g. an empty main_root is B​::NULL and not undef, similar to other
ops. All the compilers and
walkers assume B​::NULL

It would argue it's B​::Utils fault here, even if undef is easier to
use in such loops.
However this typical B loop works fine, because $$kid will be 0​:
  for (my $kid = $op-&gt;first; $$kid; $kid = $kid->sibling) {

DB<1> x $op->first->sibling
0 B​::NULL=SCALAR(0x1e09658)
  -> 0

We (jjore and me) should note it in the B​::Utils docs.
Josh?

PS​: My
if ($] >= 5.021002 and $Config​::Config{ccflags} =~ /-DPERL_OP_PARENT/) {
  is( ref $parent, 'B​::NULL', "No parent for root " . $op->stringify );
check in my first patch is highly fragile, and we rather should check
for ok $$parent.
I'll come up with better patches.

--
Reini Urban
http​://cpanel.net/ http​://www.perl-compiler.org/

@p5pRT
Copy link
Author

p5pRT commented Jul 13, 2014

From @iabyn

On Sat, Jul 12, 2014 at 11​:40​:35AM -0500, Reini Urban wrote​:

PS​: My
if ($] >= 5.021002 and $Config​::Config{ccflags} =~ /-DPERL_OP_PARENT/) {
is( ref $parent, 'B​::NULL', "No parent for root " . $op->stringify );
check in my first patch is highly fragile, and we rather should check
for ok $$parent.
I'll come up with better patches.

Thinking about this,

  $Config​::Config{ccflags} =~ /-DPERL_OP_PARENT/

probably isn't a good way of checking for this feature; eventually it
should become the default and not appear in ccflags.

Perhaps I should add a global var to B​: $B​::OP​::does_parent, say, which is​:

  undef on older perls
  0 on perls that have the parent() method but not -DPERL_OP_PARENT
  1 on perls that have the parent() method and -DPERL_OP_PARENT

--
Any [programming] language that doesn't occasionally surprise the
novice will pay for it by continually surprising the expert.
  -- Larry Wall

@p5pRT
Copy link
Author

p5pRT commented Jul 14, 2014

From @rurban

On Sun, Jul 13, 2014 at 8​:44 AM, Dave Mitchell <davem@​iabyn.com> wrote​:

On Sat, Jul 12, 2014 at 11​:40​:35AM -0500, Reini Urban wrote​:

PS​: My
if ($] >= 5.021002 and $Config​::Config{ccflags} =~ /-DPERL_OP_PARENT/) {
is( ref $parent, 'B​::NULL', "No parent for root " . $op->stringify );
check in my first patch is highly fragile, and we rather should check
for ok $$parent.
I'll come up with better patches.

Thinking about this,

$Config&#8203;::Config\{ccflags\} =~ /\-DPERL\_OP\_PARENT/

probably isn't a good way of checking for this feature; eventually it
should become the default and not appear in ccflags.

Yes. That was my concern.

Perhaps I should add a global var to B​: $B​::OP​::does_parent, say, which is​:

undef on older perls
0     on perls that have the parent\(\) method but not \-DPERL\_OP\_PARENT
1     on perls that have the parent\(\) method and \-DPERL\_OP\_PARENT

Yes, something like this.

@p5pRT
Copy link
Author

p5pRT commented Sep 26, 2014

From @cpansprout

On Sun Jul 13 06​:45​:16 2014, davem wrote​:

Perhaps I should add a global var to B​: $B​::OP​::does_parent, say, which is​:

undef on older perls
0     on perls that have the parent\(\) method but not \-DPERL\_OP\_PARENT
1     on perls that have the parent\(\) method and \-DPERL\_OP\_PARENT

Has this happened yet?

--

Father Chrysostomos

@p5pRT
Copy link
Author

p5pRT commented Sep 29, 2014

From @iabyn

On Fri, Sep 26, 2014 at 10​:47​:57AM -0700, Father Chrysostomos via RT wrote​:

On Sun Jul 13 06​:45​:16 2014, davem wrote​:

Perhaps I should add a global var to B​: $B​::OP​::does_parent, say, which is​:

undef on older perls
0     on perls that have the parent\(\) method but not \-DPERL\_OP\_PARENT
1     on perls that have the parent\(\) method and \-DPERL\_OP\_PARENT

Has this happened yet?

No, its still on my TODO list

--
I before E. Except when it isn't.

@p5pRT
Copy link
Author

p5pRT commented Feb 2, 2015

From @iabyn

On Mon, Sep 29, 2014 at 12​:10​:30PM +0100, Dave Mitchell wrote​:

On Fri, Sep 26, 2014 at 10​:47​:57AM -0700, Father Chrysostomos via RT wrote​:

On Sun Jul 13 06​:45​:16 2014, davem wrote​:

Perhaps I should add a global var to B​: $B​::OP​::does_parent, say, which is​:

undef on older perls
0     on perls that have the parent\(\) method but not \-DPERL\_OP\_PARENT
1     on perls that have the parent\(\) method and \-DPERL\_OP\_PARENT

Has this happened yet?

No, its still on my TODO list

Now done with

commit c3890f9
Author​: David Mitchell <davem@​iabyn.com>
AuthorDate​: Mon Feb 2 17​:05​:23 2015 +0000
Commit​: David Mitchell <davem@​iabyn.com>
CommitDate​: Mon Feb 2 17​:05​:23 2015 +0000

  add $B​::OP​::does_parent variable
 
  This will help people write B​:: code that can, in a backwards-compatible way,
  handle the parent method that has recently been added, and whose behaviour
  varies depending on whether perl was built with PERL_OP_PARENT.

--
"Emacs isn't a bad OS once you get used to it.
It just lacks a decent editor."

@p5pRT
Copy link
Author

p5pRT commented Apr 2, 2015

From @tonycoz

There are two modules mentioned in this ticket, neither has had a release since this was reported​:

MBARBON/Module-Info-0.35.tar.gz - cpan #97105

JJORE/B-Utils-0.25.tar.gz - cpan #100251

For both the current maintainer has responded either to the cpan ticket
(Module-Info by NEILB) or to this ticket (JJORE).

Tony

@p5pRT
Copy link
Author

p5pRT commented Apr 20, 2015

From @iabyn

On Wed, Apr 01, 2015 at 09​:28​:10PM -0700, Tony Cook via RT wrote​:

There are two modules mentioned in this ticket, neither has had a release since this was reported​:

MBARBON/Module-Info-0.35.tar.gz - cpan #97105

JJORE/B-Utils-0.25.tar.gz - cpan #100251

For both the current maintainer has responded either to the cpan ticket
(Module-Info by NEILB) or to this ticket (JJORE).

Any remaining issues are with the author's modules, so I'm removing as a
5.22 blocker.

--
"There's something wrong with our bloody ships today, Chatfield."
  -- Admiral Beatty at the Battle of Jutland, 31st May 1916.

@p5pRT
Copy link
Author

p5pRT commented Nov 9, 2015

From @tonycoz

On Wed Apr 01 21​:28​:10 2015, tonyc wrote​:

There are two modules mentioned in this ticket, neither has had a
release since this was reported​:

MBARBON/Module-Info-0.35.tar.gz - cpan #97105

Fixed in 0.36.

JJORE/B-Utils-0.25.tar.gz - cpan #100251

Fixed in 0.27.

Resolved.

Tony

@p5pRT
Copy link
Author

p5pRT commented Nov 9, 2015

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

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

No branches or pull requests

1 participant