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

testsuite lib/Benchmark unresponsive on older SPARC Solaris 10 server #16003

Closed
p5pRT opened this issue Jun 7, 2017 · 8 comments
Closed

testsuite lib/Benchmark unresponsive on older SPARC Solaris 10 server #16003

p5pRT opened this issue Jun 7, 2017 · 8 comments

Comments

@p5pRT
Copy link

p5pRT commented Jun 7, 2017

Migrated from rt.perl.org#131531 (status was 'open')

Searchable as RT131531$

@p5pRT
Copy link
Author

p5pRT commented Jun 7, 2017

From dclarke@blastwave.org

Created by dclarke@blastwave.org

Please ignore the version of perlbug used to submit this bug.

I performed a normal compile of Perl 5.26.0 from the release
tarball. No issues seen during compile.

Ran the testsuite and the process seemed fine until the Benchmark
test ../lib/Benchmark.t which seemed to become nonresponsive and
sat running for two days before I hit CTRL-C to stop it.

CPU usage was seen to be at 98% for the entire duration.

Some details here are the environment variables in place during
the compile and then testsuite run :

mimas$ env | sort
AR=/usr/ccs/bin/ar
AS=/usr/ccs/bin/as
AWK=/usr/local/bin/gawk
BUILD=/usr/local/build
CC=/opt/solarisstudio12.4/bin/cc
CFLAGS=-errfmt=error -erroff=%none -errshort=full -xstrconst -xildoff -m64 -xmemalign=8s -xnolibmil -Xa -xcode=pic32 -xregs=no%appl -xlibmieee -mc -g -xs -ftrap=%none -Qy -xbuiltin=%none -xdebugformat=dwarf -xunroll=1 -D_TS_ERRNO -D_POSIX_PTHREAD_SEMANTICS -D_LARGEFILE64_SOURCE
COLUMNS=132
CONFIG_SHELL=/usr/local/bin/bash
CPPFLAGS=-I/usr/local/include -D_TS_ERRNO -D_POSIX_PTHREAD_SEMANTICS -D_LARGEFILE64_SOURCE
CXX=/opt/solarisstudio12.4/bin/CC
CXXFLAGS=-dalign -erroff=%none -errtags=yes -ftrap=%none -g -xcode=pic32 -m64 -mc -xunroll=1 -xbuiltin=%none -xdepend=no -xnolibmopt -xlinkopt=0 -xnolibmil -xregs=no%appl -xs -D_POSIX_PTHREAD_SEMANTICS -D_LARGEFILE64_SOURCE -D_TS_ERRNO
EDITOR=/usr/xpg6/bin/vi
GREP=/usr/xpg4/bin/grep
HOME=/export/home/dclarke
JAVA_HOME=/usr/jdk/latest
LANG=C
LC_ALL=C
LC_COLLATE=C
LC_CTYPE=C
LC_MESSAGES=C
LC_MONETARY=C
LC_NUMERIC=C
LC_TIME=C
LD=/usr/ccs/bin/sparcv9/ld
LD_OPTIONS=-64 -R/usr/local/lib -L/usr/local/lib
LD_RUN_PATH=/usr/local/lib
LINES=43
LOGNAME=dclarke
M4=/usr/local/bin/m4
MACHTYPE=sparc-sun-solaris
MAIL=/usr/mail/dclarke
MAKE=/usr/local/bin/gmake
NM=/usr/ccs/bin/sparcv9/nm -p
OLDPWD=/usr/local/build
OSTYPE=solaris
PATH=/usr/local/bin​:/usr/local/sbin​:/usr/local/openssl/bin​:/usr/xpg6/bin​:/usr/xpg4/bin​:/usr/ccs/bin​:/opt/developerstudio12.5/bin​:/usr/bin​:/sbin​:/bin​:/usr/sbin​:/usr/dt/bin​:/usr/openwin/bin​:/opt/schily/bin
PERL=/usr/local/bin/perl
PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
POSIXLY_CORRECT=1
PWD=/usr/local/build/perl-5.26.0_SunOS_5.10.001
SED=/usr/local/bin/sed
SHELL=/bin/bash
SHLVL=2
SRC=/usr/local/src
SSH_CLIENT=99.253.103.29 40168 443
SSH_CONNECTION=99.253.103.29 40168 68.179.116.203 443
SSH_TTY=/dev/pts/1
STY=2411.pts-1.mimas
TERM=xterm
TZ=GMT0
USER=dclarke
VISUAL=/usr/xpg6/bin/vi
WINDOW=7
XTERM_LOCALE=C
_=/usr/xpg4/bin/env

I then tried to run the test in a more verbose manner :

$ LD_LIBRARY_PATH=/usr/local/build/perl-5.26.0_SunOS_5.10.001 ./perl harness -v ../lib/Benchmark.t
../lib/Benchmark.t ..
1..213
ok 1 - 'Ensure we can create a benchmark object' isa 'Benchmark'

While this was running and seemingly wedged I ran truss also :

mimas # ps -ef | grep perl
dclarke 18648 13068 0 17​:16​:55 pts/11 0​:00 ./perl harness -v ../lib/Benchmark.t
  root 18650 13332 0 17​:20​:11 pts/2 0​:00 grep perl
dclarke 18649 18648 97 17​:16​:58 pts/11 0​:00 ./perl -I.. -MTestInit=U1 ../lib/Benchmark.t
mimas #
mimas # truss -faeild -p 18649
Base time stamp​: 1496856031.9867 [ Wed Jun 7 17​:20​:31 GMT 2017 ]
18649/1​: psargs​: ./perl -I.. -MTestInit=U1 ../lib/Benchmark.t
18649/1​: 11.2054 time() = 1496856043
18649/1​: 11.2070 times(0xFFFFFFFF7FFFEFA0) = 170345051
18649/1​: 33.5034 time() = 1496856065
18649/1​: 33.5049 times(0xFFFFFFFF7FFFEFA0) = 170347281
18649/1​: 57.6346 time() = 1496856089
18649/1​: 57.6360 times(0xFFFFFFFF7FFFEFA0) = 170349694
18649/1​: 84.5803 time() = 1496856116
18649/1​: 84.5817 times(0xFFFFFFFF7FFFEFA0) = 170352389
18649/1​: 114.3768 time() = 1496856146
18649/1​: 114.3782 times(0xFFFFFFFF7FFFEFA0) = 170355368
18649/1​: 146.8824 time() = 1496856178
18649/1​: 146.8838 times(0xFFFFFFFF7FFFEFA0) = 170358619
18649/1​: 183.2270 time() = 1496856215
18649/1​: 183.2284 times(0xFFFFFFFF7FFFEFA0) = 170362253
18649/1​: 222.5844 time() = 1496856254
18649/1​: 222.5859 times(0xFFFFFFFF7FFFEFA0) = 170366189
18649/1​: 265.6841 time() = 1496856297
18649/1​: 265.6855 times(0xFFFFFFFF7FFFEFA0) = 170370499
18649/1​: 313.7977 time() = 1496856345
18649/1​: 313.7991 times(0xFFFFFFFF7FFFEFA0) = 170375310
mimas #
mimas #

Seemed to be in a loop doing not very much.

On the advice of some folks in the perl IRC chan p5p we ran a
smaller test :

$ /usr/local/bin/wget https://rt-archive.perl.org/perl5/Ticket/Attachment/1463473/794827/xBenchmark.t
--2017-06-07 18​:14​:14-- https://rt-archive.perl.org/perl5/Ticket/Attachment/1463473/794827/xBenchmark.t
Resolving rt.perl.org (rt.perl.org)... 207.171.7.176
Connecting to rt.perl.org (rt.perl.org)|207.171.7.176|​:443... connected.
HTTP request sent, awaiting response... 302 Found
Location​: /Public/Ticket/Attachment/1463473/794827/xBenchmark.t [following]
--2017-06-07 18​:14​:16-- https://rt-archive.perl.org/perl5/Ticket/Attachment/1463473/794827/xBenchmark.t
Connecting to rt.perl.org (rt.perl.org)|207.171.7.176|​:443... connected.
HTTP request sent, awaiting response... 200 OK
Length​: unspecified [text/plain]
Saving to​: 'xBenchmark.t'

  0K 3.16M=0.001s

2017-06-07 18​:14​:16 (3.16 MB/s) - 'xBenchmark.t' saved [2711]

dclarke@​mimas_$ file xBenchmark.t
xBenchmark.t​: executable ./perl script

dclarke@​mimas_$ cd ../t
dclarke@​mimas_$ LD_LIBRARY_PATH=/usr/local/build/perl-5.26.0_SunOS_5.10.001 ./perl harness -v ../lib/xBenchmark.t
../lib/xBenchmark.t ..
1..10
ok 1 - 'Ensure we can create a benchmark object' isa 'Benchmark'

Again this seemed wedged and nonresponsive.

Here is some data from the built perl 5.26.0 :

mimas$ pwd
/usr/local/build/perl-5.26.0_SunOS_5.10.001
mimas$ cd ..
mimas$ LD_LIBRARY_PATH=/usr/local/lib /usr/local/bin/perl -Ilib -V
Summary of my perl5 (revision 5 version 20 subversion 1) configuration​:
 
  Platform​:
  osname=solaris, osvers=2.10, archname=sun4-solaris-64
  uname='sunos ns1 5.10 generic_148888-05 sun4u sparc sunw,ultraax-i2 '
  config_args='-Dprefix=/usr/local -Dmksymlinks -Accflags=-errfmt=error -erroff=%none -errshort=full -xstrconst -xildoff -m64 -xmemalign=8s -xnolibmil -Xa -xcode=pic32 -xregs=no%appl -xlibmieee -mc -g -xs -ftrap=%none -Qy -xbuiltin=%none -xdebugformat=dwarf -xunroll=1 -xtarget=ultra2'
  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 ='-errfmt=error -erroff=%none -errshort=full -xstrconst -xildoff -m64 -xmemalign=8s -xnolibmil -Xa -xcode=pic32 -xregs=no%appl -xlibmieee -mc -g -xs -ftrap=%none -Qy -xbuiltin=%none -xdebugformat=dwarf -xunroll=1 -xtarget=ultra2 -I/usr/local/include -m64 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
  optimize='-xO1',
  cppflags='-errfmt=error -erroff=%none -errshort=full -xstrconst -xildoff -m64 -xmemalign=8s -xnolibmil -Xa -xcode=pic32 -xregs=no%appl -xlibmieee -mc -g -xs -ftrap=%none -Qy -xbuiltin=%none -xdebugformat=dwarf -xunroll=1 -xtarget=ultra2 -I/usr/local/include'
  ccversion='Sun C 5.9 SunOS_sparc Patch 124867-16 2010/08/11', gccversion='', gccosandvers=''
  intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=87654321
  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 =' -L/opt/studio/SOS12/SUNWspro/prod/lib/sparcvis/64 -L/opt/studio/SOS12/SUNWspro/prod/lib/v9 -L/lib/sparcv9 -L/usr/local/lib -m64 '
  libpth=/usr/lib/sparcv9 /usr/ccs/lib/sparcv9 /opt/studio/SOS12/SUNWspro/prod/lib/sparcvis/64 /opt/studio/SOS12/SUNWspro/prod/lib/v9 /lib/sparcv9 /usr/local/lib
  libs=-lsocket -lnsl -ldl -lm -lc
  perllibs=-lsocket -lnsl -ldl -lm -lc
  libc=/usr/lib/sparcv9/libc.so, so=so, useshrplib=false, libperl=libperl.a
  gnulibc_version=''
  Dynamic Linking​:
  dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
  cccdlflags='-xregs=no%appl -xmemalign=8s -xnolibmil -xcode=pic32 -mc -g -xs -Qy -KPIC', lddlflags=' -G -m64 -L/opt/studio/SOS12/SUNWspro/prod/lib/sparcvis/64 -L/opt/studio/SOS12/SUNWspro/prod/lib/v9 -L/lib/sparcv9 -L/usr/local/lib'

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
  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 solaris
  Compiled at Nov 11 2014 22​:23​:10
  %ENV​:
  PERL="/usr/local/bin/perl"
  @​INC​:
  lib
  /usr/local/lib/perl5/site_perl/5.20.1/sun4-solaris-64
  /usr/local/lib/perl5/site_perl/5.20.1
  /usr/local/lib/perl5/5.20.1/sun4-solaris-64
  /usr/local/lib/perl5/5.20.1
  .
mimas$

Seems to be a single test failure on a machine which is older and slower
and with limited memory. In this case 1536MB of memory. However the
system is on contract and is entirely up to date patchwise and the
compiler is Oracle Studio 12.4 cc with CFLAGS seen above. Note the
debug options are used to allow later single stepping and debugging of
downstream projects if needed.

Dennis Clarke
dclarke@​blastwave.org

Perl Info

Flags:
    category=install
    severity=medium

Site configuration information for perl 5.20.1:

Configured by root at Tue Nov 11 21:30:40 GMT 2014.

Summary of my perl5 (revision 5 version 20 subversion 1) configuration:
   
  Platform:
    osname=solaris, osvers=2.10, archname=sun4-solaris-64
    uname='sunos ns1 5.10 generic_148888-05 sun4u sparc sunw,ultraax-i2 '
    config_args='-Dprefix=/usr/local -Dmksymlinks -Accflags=-errfmt=error -erroff=%none -errshort=full -xstrconst -xildoff -m64 -xmemalign=8s -xnolibmil -Xa -xcode=pic32 -xregs=no%appl -xlibmieee -mc -g -xs -ftrap=%none -Qy -xbuiltin=%none -xdebugformat=dwarf -xunroll=1 -xtarget=ultra2'
    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 ='-errfmt=error -erroff=%none -errshort=full -xstrconst -xildoff -m64 -xmemalign=8s -xnolibmil -Xa -xcode=pic32 -xregs=no%appl -xlibmieee -mc -g -xs -ftrap=%none -Qy -xbuiltin=%none -xdebugformat=dwarf -xunroll=1 -xtarget=ultra2 -I/usr/local/include -m64 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
    optimize='-xO1',
    cppflags='-errfmt=error -erroff=%none -errshort=full -xstrconst -xildoff -m64 -xmemalign=8s -xnolibmil -Xa -xcode=pic32 -xregs=no%appl -xlibmieee -mc -g -xs -ftrap=%none -Qy -xbuiltin=%none -xdebugformat=dwarf -xunroll=1 -xtarget=ultra2 -I/usr/local/include'
    ccversion='Sun C 5.9 SunOS_sparc Patch 124867-16 2010/08/11', gccversion='', gccosandvers=''
    intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=87654321
    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 =' -L/opt/studio/SOS12/SUNWspro/prod/lib/sparcvis/64 -L/opt/studio/SOS12/SUNWspro/prod/lib/v9 -L/lib/sparcv9 -L/usr/local/lib -m64 '
    libpth=/usr/lib/sparcv9 /usr/ccs/lib/sparcv9 /opt/studio/SOS12/SUNWspro/prod/lib/sparcvis/64 /opt/studio/SOS12/SUNWspro/prod/lib/v9 /lib/sparcv9 /usr/local/lib
    libs=-lsocket -lnsl -ldl -lm -lc
    perllibs=-lsocket -lnsl -ldl -lm -lc
    libc=/usr/lib/sparcv9/libc.so, so=so, useshrplib=false, libperl=libperl.a
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
    cccdlflags='-xregs=no%appl -xmemalign=8s -xnolibmil -xcode=pic32 -mc -g -xs -Qy -KPIC', lddlflags=' -G -m64 -L/opt/studio/SOS12/SUNWspro/prod/lib/sparcvis/64 -L/opt/studio/SOS12/SUNWspro/prod/lib/v9 -L/lib/sparcv9 -L/usr/local/lib'



@INC for perl 5.20.1:
    /usr/local/lib/perl5/site_perl/5.20.1/sun4-solaris-64
    /usr/local/lib/perl5/site_perl/5.20.1
    /usr/local/lib/perl5/5.20.1/sun4-solaris-64
    /usr/local/lib/perl5/5.20.1
    .


Environment for perl 5.20.1:
    HOME=/export/home/dclarke
    LANG=C
    LANGUAGE (unset)
    LC_ALL=C
    LC_COLLATE=C
    LC_CTYPE=C
    LC_MESSAGES=C
    LC_MONETARY=C
    LC_NUMERIC=C
    LC_TIME=C
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/usr/local/bin:/usr/local/sbin:/usr/local/openssl/bin:/usr/xpg6/bin:/usr/xpg4/bin:/usr/ccs/bin:/opt/developerstudio12.5/bin:/usr/bin:/sbin:/bin:/usr/sbin:/usr/dt/bin:/usr/openwin/bin:/opt/schily/bin
    PERL=/usr/local/bin/perl
    PERL_BADLANG (unset)
    SHELL=/bin/bash

@p5pRT
Copy link
Author

p5pRT commented Jun 8, 2017

From @jkeenan

On Wed, 07 Jun 2017 19​:57​:52 GMT, dclarke@​blastwave.org wrote​:

I performed a normal compile of Perl 5.26.0 from the release
tarball. No issues seen during compile.

Ran the testsuite and the process seemed fine until the Benchmark
test ../lib/Benchmark.t which seemed to become nonresponsive and
sat running for two days before I hit CTRL-C to stop it.

More diagnostic suggestions. Two possible approaches​:

1. via 'git'

If you have 'git' on the machine in question, do a checkout of the 'jkeenan/131531-benchmark' from our repository. (Call​: 'perldoc perlhack' and 'perldoc perlgit' for more details.) Configure as you normally would. Call 'make' as you normally would. Then run (I'm guessing somewhat here)​:

LD_LIBRARY_PATH=`pwd` ./perl -Ilib lib/yBenchmark.t

'yBenchmark.t' is a very stripped-down version of lib/Benchmark.t.

2. via already-checked-out tarball

Store the version of 'lib/Benchmark.pm' in build directory someplace safe. Replace it with the 'Benchmark.pm' attached, to which I have added extra debugging statements. Place attached 'yBenchmark.t' in lib/. Call the same command as (1) above.

In either approach, assuming you get the inordinate slowness, you can try to use the Perl debugger to step through the test file, probably like this​:

#####
LD_LIBRARY_PATH=`pwd` ./perl -Ilib -d lib/yBenchmark.t
#####

Good luck!

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

@p5pRT
Copy link
Author

p5pRT commented Jun 8, 2017

From @jkeenan

Benchmark.pm

@p5pRT
Copy link
Author

p5pRT commented Jun 8, 2017

From @jkeenan

#!./perl -w
# https://rt-archive.perl.org/perl5/Ticket/Display.html?id=131531
BEGIN {
  chdir 't' if -d 't';
  @​INC = ('../lib');
}

use warnings;
use strict;

use Benchmark qw(​:all);
$Benchmark​::Debug++;

my $foo = 0;
my $reps = 5;
my $coderef = sub {++$foo};
my $t = timeit($reps, $coderef);
($t->isa('Benchmark'))
  ? print "timeit CODEREF returned a Benchmark object\n"
  : print "timeit CODEREF did NOT return a Benchmark object\n";
($foo == $reps)
  ? print "benchmarked code was run $reps times\n"
  : print "FAIL​: requested $reps reps, but $foo were run\n";

@p5pRT
Copy link
Author

p5pRT commented Jun 8, 2017

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

@jkeenan
Copy link
Contributor

jkeenan commented Mar 2, 2020

Emailed original poster today to inform re issue tracker change.

jkeenan added a commit to jkeenan/perl5 that referenced this issue May 8, 2021
What was bug report RT #131531 is now GH issue
Perl#16003.
@jkeenan
Copy link
Contributor

jkeenan commented Nov 13, 2021

From dclarke@blastwave.org

Created by dclarke@blastwave.org

Please ignore the version of perlbug used to submit this bug.

I performed a normal compile of Perl 5.26.0 from the release tarball. No issues seen during compile.

Ran the testsuite and the process seemed fine until the Benchmark test ../lib/Benchmark.t which seemed to become nonresponsive and sat running for two days before I hit CTRL-C to stop it.

CPU usage was seen to be at 98% for the entire duration.

We haven't heard from the original poster since June 2017. I am taking this ticket for the purpose of closing it (and corresponding p.r. #18777) at the end of this month unless we get a response.

Thank you very much.
Jim Keenan

@jkeenan jkeenan self-assigned this Nov 13, 2021
@xenu xenu removed the affects-5.20 label Nov 19, 2021
@jkeenan
Copy link
Contributor

jkeenan commented Dec 1, 2021

From dclarke@blastwave.org

Created by dclarke@blastwave.org

Please ignore the version of perlbug used to submit this bug.
I performed a normal compile of Perl 5.26.0 from the release tarball. No issues seen during compile.
Ran the testsuite and the process seemed fine until the Benchmark test ../lib/Benchmark.t which seemed to become nonresponsive and sat running for two days before I hit CTRL-C to stop it.
CPU usage was seen to be at 98% for the entire duration.

We haven't heard from the original poster since June 2017. I am taking this ticket for the purpose of closing it (and corresponding p.r. #18777) at the end of this month unless we get a response.

Closing ticket as per schedule.

@jkeenan jkeenan closed this as completed Dec 1, 2021
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

3 participants