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

BBC: blead breaks YOHEIMUTA/Linux-GetPidstat-0.09.tar.gz #16905

Closed
p5pRT opened this issue Mar 24, 2019 · 8 comments
Closed

BBC: blead breaks YOHEIMUTA/Linux-GetPidstat-0.09.tar.gz #16905

p5pRT opened this issue Mar 24, 2019 · 8 comments
Labels
BBC Blead Breaks CPAN - changes in blead broke a cpan module(s) distro-Linux
Milestone

Comments

@p5pRT
Copy link

p5pRT commented Mar 24, 2019

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

Searchable as RT133953$

@p5pRT
Copy link
Author

p5pRT commented Mar 24, 2019

From @eserte

This is a bug report for perl from slaven@​rezic.de,
generated with the help of perlbug 1.41 running under perl 5.29.9.


The test suite of Linux-GetPidstat-0.09 fails since perl 5.29.2​:

# Failed test at t/08_collector_parser.t line 47.
# Structures begin differing at​:
# $got->{memory_percent} = '42.14'
# $expected->{memory_percent} = '42.15'
# {
# 'cpu' => '42.48',
# 'cswch_per_sec' => '33.54',
# 'disk_read_per_sec' => '500',
# 'disk_write_per_sec' => '-500',
# 'memory_percent' => '42.14',
# 'memory_rss' => '13532901250',
# 'nvcswch_per_sec' => '44.04',
# 'stk_ref' => '39500',
# 'stk_size' => '190000'
# }
# Looks like you failed 1 test of 5.
t/08_collector_parser.t ..
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/5 subtests

This looks like floating point inaccuracy, but inequality
happens already with two digits after the dot.



Flags​:
  category=core
  severity=low


Site configuration information for perl 5.29.9​:

Configured by eserte at Thu Mar 21 21​:10​:55 UTC 2019.

Summary of my perl5 (revision 5 version 29 subversion 9) configuration​:
 
  Platform​:
  osname=linux
  osvers=4.15.0-46-generic
  archname=x86_64-linux
  uname='linux ubuntu18 4.15.0-46-generic #49-ubuntu smp wed feb 6 09​:33​:07 utc 2019 x86_64 x86_64 x86_64 gnulinux '
  config_args='-ds -e -Dprefix=/opt/perl-5.29.9 -Dusedevel -Dusemallocwrap=no -Dcf_email=srezic@​cpan.org'
  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='7.3.0'
  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/7/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=-lpthread -lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc
  perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
  libc=libc-2.27.so
  so=so
  useshrplib=false
  libperl=libperl.a
  gnulibc_version='2.27'
  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'


@​INC for perl 5.29.9​:
  /opt/perl-5.29.9/lib/site_perl/5.29.9/x86_64-linux
  /opt/perl-5.29.9/lib/site_perl/5.29.9
  /opt/perl-5.29.9/lib/5.29.9/x86_64-linux
  /opt/perl-5.29.9/lib/5.29.9


Environment for perl 5.29.9​:
  HOME=/home/eserte
  LANG=en_US.UTF-8
  LANGUAGE (unset)
  LC_ALL=de_DE.UTF-8
  LD_LIBRARY_PATH (unset)
  LOGDIR (unset)
  PATH=/usr/local/bin​:/usr/bin​:/bin​:/usr/local/sbin​:/usr/sbin​:/sbin​:/home/eserte/bin/linux-gnu​:/home/eserte/bin/sh​:/home/eserte/bin​:/home/eserte/bin/pistachio-perl/bin​:/usr/games​:/home/eserte/devel
  PERLDOC=-MPod​::Perldoc​::ToTextOverstrike
  PERL_BADLANG (unset)
  SHELL=/usr/bin/zsh

@p5pRT
Copy link
Author

p5pRT commented Mar 24, 2019

From @jkeenan

On Sun, 24 Mar 2019 09​:55​:16 GMT, slaven@​rezic.de wrote​:

This is a bug report for perl from slaven@​rezic.de,
generated with the help of perlbug 1.41 running under perl 5.29.9.

-----------------------------------------------------------------
The test suite of Linux-GetPidstat-0.09 fails since perl 5.29.2​:

# Failed test at t/08_collector_parser.t line 47.
# Structures begin differing at​:
# $got->{memory_percent} = '42.14'
# $expected->{memory_percent} = '42.15'
# {
# 'cpu' => '42.48',
# 'cswch_per_sec' => '33.54',
# 'disk_read_per_sec' => '500',
# 'disk_write_per_sec' => '-500',
# 'memory_percent' => '42.14',
# 'memory_rss' => '13532901250',
# 'nvcswch_per_sec' => '44.04',
# 'stk_ref' => '39500',
# 'stk_size' => '190000'
# }
# Looks like you failed 1 test of 5.
t/08_collector_parser.t ..
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/5 subtests

This looks like floating point inaccuracy, but inequality
happens already with two digits after the dot.

This module has a ton of prerequisites, but the problem ultimately has nothing to do with either Linux or PID statistics. Bisection -- on FreeBSD! -- with attached program 133953-pid.pl, pointed to this commit​:

#####
ce6f496 is the first bad commit
commit ce6f496
Author​: sisyphus <sisyphus1@​optusnet.com.au>
Date​: Wed Aug 1 22​:33​:38 2018 +1000

PATCH​: [perl #41202] text->float gives wrong answer

This changes to use Perl_strtod() when available, and that
turns out to be the key to fixing this bug.

S_mulexp10() is removed from embed.fnc to avoid repeating
the complicated prerequisites for defining Perl_strtod().
This works because this static function already was defined
before use in numeric.c, and always called in full form
without using a macro.
#####

I was ultimately able to further reduce it to attached program y133953.pl and reconfirm the breaking commit.

However, given that the commit in question fixed a bug in perl, we should reject this ticket and advise the downstream CPAN maintainer to revise his test data.

Thank you very much.

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

@p5pRT
Copy link
Author

p5pRT commented Mar 24, 2019

From @jkeenan

133953-pid.pl

@p5pRT
Copy link
Author

p5pRT commented Mar 24, 2019

From @jkeenan

y133953.pl

@p5pRT
Copy link
Author

p5pRT commented Mar 24, 2019

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

@p5pRT
Copy link
Author

p5pRT commented Mar 25, 2019

From @tonycoz

On Sun, 24 Mar 2019 08​:30​:57 -0700, jkeenan wrote​:

On Sun, 24 Mar 2019 09​:55​:16 GMT, slaven@​rezic.de wrote​:

This is a bug report for perl from slaven@​rezic.de,
generated with the help of perlbug 1.41 running under perl 5.29.9.

-----------------------------------------------------------------
The test suite of Linux-GetPidstat-0.09 fails since perl 5.29.2​:

# Failed test at t/08_collector_parser.t line 47.
# Structures begin differing at​:
# $got->{memory_percent} = '42.14'
# $expected->{memory_percent} = '42.15'
# {
# 'cpu' => '42.48',
# 'cswch_per_sec' => '33.54',
# 'disk_read_per_sec' => '500',
# 'disk_write_per_sec' => '-500',
# 'memory_percent' => '42.14',
# 'memory_rss' => '13532901250',
# 'nvcswch_per_sec' => '44.04',
# 'stk_ref' => '39500',
# 'stk_size' => '190000'
# }
# Looks like you failed 1 test of 5.
t/08_collector_parser.t ..
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/5 subtests

This looks like floating point inaccuracy, but inequality
happens already with two digits after the dot.

This module has a ton of prerequisites, but the problem ultimately has
nothing to do with either Linux or PID statistics. Bisection -- on
FreeBSD! -- with attached program 133953-pid.pl, pointed to this
commit​:

#####
ce6f496 is the first bad commit
commit ce6f496
Author​: sisyphus <sisyphus1@​optusnet.com.au>
Date​: Wed Aug 1 22​:33​:38 2018 +1000

PATCH​: [perl #41202] text->float gives wrong answer

This changes to use Perl_strtod() when available, and that
turns out to be the key to fixing this bug.

S_mulexp10() is removed from embed.fnc to avoid repeating
the complicated prerequisites for defining Perl_strtod().
This works because this static function already was defined
before use in numeric.c, and always called in full form
without using a macro.
#####

I was ultimately able to further reduce it to attached program
y133953.pl and reconfirm the breaking commit.

However, given that the commit in question fixed a bug in perl, we
should reject this ticket and advise the downstream CPAN maintainer to
revise his test data.

Thank you very much.

Leaving the rounding to the final step would help too.

If I add some debug output to _mean​:

mean 34.62 34.62 34.65 34.65 => 34.635 => 34.63
mean 7.33 7.33 7.59 7.81 => 7.515 => 7.51

The second last number is the raw mean, the last number the rounded value.

Rounding at this point simply accumulates errors.

If you remove the rounding in _mean and do it only as the final step the result is the expected value.

Tony

@p5pRT
Copy link
Author

p5pRT commented Apr 14, 2019

From @jkeenan

The author of Linux​::GetPidstat released a new version to CPAN in late March which addresses the issues raised in this ticket.

Marking this ticket Resolved.
--
James E Keenan (jkeenan@​cpan.org)

@p5pRT p5pRT closed this as completed Apr 14, 2019
@p5pRT
Copy link
Author

p5pRT commented Apr 14, 2019

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

@p5pRT p5pRT added BBC Blead Breaks CPAN - changes in blead broke a cpan module(s) Severity Low distro-Linux labels Oct 19, 2019
@toddr toddr added this to the 5.30.0 milestone Oct 26, 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) distro-Linux
Projects
None yet
Development

No branches or pull requests

2 participants