Skip Menu |

This queue is for tickets about the Expect CPAN distribution.

Report information
The Basics
Id: 6369
Status: resolved
Priority: 0/
Queue: Expect

People
Owner: Nobody in particular
Requestors: tmcbrid [...] transunion.com
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in:
  • 1.16
  • 1.17
Fixed in: 1.18



Subject: make test hangus up for Expect 1.15
This version builds on AIX 5.2.0.0, but it hangs up on the first test, which is a simple spawn of the perl -v command. I have communicated with the author about this problem and am hoping for a resolution. This is how it hangs up: make test PERL_DL_NONLAZY=1 /pcom/perl/perl-5.8.4/bin/perl "-Iblib/lib" "-Iblib/arch" test.pl 1..36 Basic tests... If you look at test.pl, you'll see that it's hanging up at this line: my $exp = Expect->spawn("$Perl -v"); I debugged the module and found that it is hanging up at line 124 in Expect.pm. This is the line of code: my $errstatus = sysread(STAT_RDR, $errno, 256); Here's what happened at that line: DB<3> print "$errno\n"; Use of uninitialized value in concatenation (.) or string at (eval 7)[/pcom/perl/perl-5.8.4/lib/5.8.4/perl5db.pl:619] line 2. eval '($@, $!, $^E, $,, $/, $\\, $^W) = @saved;package Expect; $^D = $^D | $DB::db_stop; print "$errno\\n";; ;' called at /pcom/perl/perl-5.8.4/lib/5.8.4/perl5db.pl line 619 DB::eval called at /pcom/perl/perl-5.8.4/lib/5.8.4/perl5db.pl line 3349 DB::DB called at blib/lib/Expect.pm line 124 Expect::spawn('Expect', '/pcom/perl/perl-5.8.4/bin/perl -v') called at test.pl line 37 I have seen other complaints about either test failures or hang ups on bulletin boards. It seems a lot of people are having this problem, and not just on AIX. The Tty and Stty Perl modules built installed just fine, as far as I can tell. I can provide the installation details if necessary. (They have been provided to the author.) Here's the info from perl -V. 5.8.4 was built on AIX 5.2.0.0. perl -V Summary of my perl5 (revision 5 version 8 subversion 4) configuration: Platform: osname=aix, osvers=5.2.0.0, archname=aix uname='aix silver 2 5 00037d0f4c00 ' config_args='' hint=recommended, useposix=true, d_sigaction=define usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef useperlio=define d_sfio=undef uselargefiles=define usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='cc', ccflags ='-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=-1 -qnoansialias -DUSE_NATIVE_DLOPEN -q32 -D_LARGE_FILES -qlonglong', optimize='-O', cppflags='-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=-1 -qnoansialias -DUSE_NATIVE_DLOPEN' ccversion='6.0.0.7', gccversion='', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=8 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=8, prototype=define Linker and Libraries: ld='ld', ldflags =' -brtl -L/usr/local/lib -b32' libpth=/usr/local/lib /lib /usr/lib /usr/ccs/lib libs=-lbind -lnsl -ldbm -ldl -lld -lm -lcrypt -lc -lbsd perllibs=-lbind -lnsl -ldl -lld -lm -lcrypt -lc -lbsd libc=/lib/libc.a, so=a, useshrplib=false, libperl=libperl.a gnulibc_version='' Dynamic Linking: dlsrc=dl_aix.xs, dlext=so, d_dlsymun=undef, ccdlflags=' -bE:/pcom/perl/perl-5.8.4/lib/5.8.4/aix/CORE/perl.exp' cccdlflags=' ', lddlflags=' -bhalt:4 -bM:SRE -bI:$(PERL_INC)/perl.exp -bE:$(BASEEXT).exp -bnoentry -lc -L/usr/local/lib' Characteristics of this binary (from libperl): Compile-time options: USE_LARGE_FILES Built under aix Compiled at May 5 2004 13:49:53 @INC: /pcom/perl/perl-5.8.4/lib/5.8.4/aix /pcom/perl/perl-5.8.4/lib/5.8.4 /pcom/perl/perl-5.8.4/lib/site_perl/5.8.4/aix /pcom/perl/perl-5.8.4/lib/site_perl/5.8.4 /pcom/perl/perl-5.8.4/lib/site_perl .
Subject: make test hangus up for Expect 1.15 and Expect 1.14
From: wjmcelan [...] charter.net
This error also occurs on AIX 5.2 with Build 1.14 with the same config. [guest - Thu May 20 14:58:59 2004]: Show quoted text
> This version builds on AIX 5.2.0.0, but it hangs up on the first test, > which is a simple spawn of the perl -v command. I have communicated > with the author about this problem and am hoping for a resolution. > > This is how it hangs up: > > make test > PERL_DL_NONLAZY=1 /pcom/perl/perl-5.8.4/bin/perl "-Iblib/lib" > "-Iblib/arch" > > test.pl > 1..36 > > Basic tests... > > If you look at test.pl, you'll see that it's hanging up at this line: > > my $exp = Expect->spawn("$Perl -v"); > > I debugged the module and found that it is hanging up at line 124 in > Expect.pm. This is the line of code: > > my $errstatus = sysread(STAT_RDR, $errno, 256); > > Here's what happened at that line: > > DB<3> print "$errno\n"; > Use of uninitialized value in concatenation (.) or string at (eval > 7)[/pcom/perl/perl-5.8.4/lib/5.8.4/perl5db.pl:619] line 2. > eval '($@, $!, $^E, $,, $/, $\\, $^W) = @saved;package Expect; > $^D = $^D | $DB::db_stop; > print "$errno\\n";; > > ;' called at /pcom/perl/perl-5.8.4/lib/5.8.4/perl5db.pl line 619 > DB::eval called at /pcom/perl/perl-5.8.4/lib/5.8.4/perl5db.pl > line 3349 > DB::DB called at blib/lib/Expect.pm line 124 > Expect::spawn('Expect', '/pcom/perl/perl-5.8.4/bin/perl -v') > called at test.pl line 37 > > > I have seen other complaints about either test failures or hang ups > on bulletin boards. It seems a lot of people are having this > problem, and not just on AIX. > > The Tty and Stty Perl modules built installed just fine, as far as I > can tell. I can provide the installation details if necessary. (They > have been provided to the author.) > > Here's the info from perl -V. 5.8.4 was built on AIX 5.2.0.0. > > perl -V > Summary of my perl5 (revision 5 version 8 subversion 4) configuration: > Platform: > osname=aix, osvers=5.2.0.0, archname=aix > uname='aix silver 2 5 00037d0f4c00 ' > config_args='' > hint=recommended, useposix=true, d_sigaction=define > usethreads=undef use5005threads=undef useithreads=undef > usemultiplicity=undef > useperlio=define d_sfio=undef uselargefiles=define usesocks=undef > use64bitint=undef use64bitall=undef uselongdouble=undef > usemymalloc=n, bincompat5005=undef > Compiler: > cc='cc', ccflags ='-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE > -qmaxmem=-1 > > -qnoansialias -DUSE_NATIVE_DLOPEN -q32 -D_LARGE_FILES -qlonglong', > optimize='-O', > cppflags='-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE > -qmaxmem=-1 -qnoansialias > > -DUSE_NATIVE_DLOPEN' > ccversion='6.0.0.7', gccversion='', gccosandvers='' > intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321 > d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=8 > ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', > lseeksize=8 > alignbytes=8, prototype=define > Linker and Libraries: > ld='ld', ldflags =' -brtl -L/usr/local/lib -b32' > libpth=/usr/local/lib /lib /usr/lib /usr/ccs/lib > libs=-lbind -lnsl -ldbm -ldl -lld -lm -lcrypt -lc -lbsd > perllibs=-lbind -lnsl -ldl -lld -lm -lcrypt -lc -lbsd > libc=/lib/libc.a, so=a, useshrplib=false, libperl=libperl.a > gnulibc_version='' > Dynamic Linking: > dlsrc=dl_aix.xs, dlext=so, d_dlsymun=undef, ccdlflags=' > > -bE:/pcom/perl/perl-5.8.4/lib/5.8.4/aix/CORE/perl.exp' > cccdlflags=' ', lddlflags=' -bhalt:4 -bM:SRE > -bI:$(PERL_INC)/perl.exp > > -bE:$(BASEEXT).exp -bnoentry -lc -L/usr/local/lib' > > > Characteristics of this binary (from libperl): > Compile-time options: USE_LARGE_FILES > Built under aix > Compiled at May 5 2004 13:49:53 > @INC: > /pcom/perl/perl-5.8.4/lib/5.8.4/aix > /pcom/perl/perl-5.8.4/lib/5.8.4 > /pcom/perl/perl-5.8.4/lib/site_perl/5.8.4/aix > /pcom/perl/perl-5.8.4/lib/site_perl/5.8.4 > /pcom/perl/perl-5.8.4/lib/site_perl > .
From: wjmclean [...] charter.net
I had this same problem. I had to backlevel and use Expect V1.12 and it worked fine, except for some matching problems I had to work around. [guest - Thu May 20 14:58:59 2004]: Show quoted text
> This version builds on AIX 5.2.0.0, but it hangs up on the first test, > which is a simple spawn of the perl -v command. I have communicated > with the author about this problem and am hoping for a resolution. > > This is how it hangs up: > > make test > PERL_DL_NONLAZY=1 /pcom/perl/perl-5.8.4/bin/perl "-Iblib/lib" > "-Iblib/arch" > > test.pl > 1..36 > > Basic tests... > > If you look at test.pl, you'll see that it's hanging up at this line: > > my $exp = Expect->spawn("$Perl -v"); > > I debugged the module and found that it is hanging up at line 124 in > Expect.pm. This is the line of code: > > my $errstatus = sysread(STAT_RDR, $errno, 256); > > Here's what happened at that line: > > DB<3> print "$errno\n"; > Use of uninitialized value in concatenation (.) or string at (eval > 7)[/pcom/perl/perl-5.8.4/lib/5.8.4/perl5db.pl:619] line 2. > eval '($@, $!, $^E, $,, $/, $\\, $^W) = @saved;package Expect; > $^D = $^D | $DB::db_stop; > print "$errno\\n";; > > ;' called at /pcom/perl/perl-5.8.4/lib/5.8.4/perl5db.pl line 619 > DB::eval called at /pcom/perl/perl-5.8.4/lib/5.8.4/perl5db.pl > line 3349 > DB::DB called at blib/lib/Expect.pm line 124 > Expect::spawn('Expect', '/pcom/perl/perl-5.8.4/bin/perl -v') > called at test.pl line 37 > > > I have seen other complaints about either test failures or hang ups > on bulletin boards. It seems a lot of people are having this > problem, and not just on AIX. > > The Tty and Stty Perl modules built installed just fine, as far as I > can tell. I can provide the installation details if necessary. (They > have been provided to the author.) > > Here's the info from perl -V. 5.8.4 was built on AIX 5.2.0.0. > > perl -V > Summary of my perl5 (revision 5 version 8 subversion 4) configuration: > Platform: > osname=aix, osvers=5.2.0.0, archname=aix > uname='aix silver 2 5 00037d0f4c00 ' > config_args='' > hint=recommended, useposix=true, d_sigaction=define > usethreads=undef use5005threads=undef useithreads=undef > usemultiplicity=undef > useperlio=define d_sfio=undef uselargefiles=define usesocks=undef > use64bitint=undef use64bitall=undef uselongdouble=undef > usemymalloc=n, bincompat5005=undef > Compiler: > cc='cc', ccflags ='-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE > -qmaxmem=-1 > > -qnoansialias -DUSE_NATIVE_DLOPEN -q32 -D_LARGE_FILES -qlonglong', > optimize='-O', > cppflags='-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE > -qmaxmem=-1 -qnoansialias > > -DUSE_NATIVE_DLOPEN' > ccversion='6.0.0.7', gccversion='', gccosandvers='' > intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321 > d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=8 > ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', > lseeksize=8 > alignbytes=8, prototype=define > Linker and Libraries: > ld='ld', ldflags =' -brtl -L/usr/local/lib -b32' > libpth=/usr/local/lib /lib /usr/lib /usr/ccs/lib > libs=-lbind -lnsl -ldbm -ldl -lld -lm -lcrypt -lc -lbsd > perllibs=-lbind -lnsl -ldl -lld -lm -lcrypt -lc -lbsd > libc=/lib/libc.a, so=a, useshrplib=false, libperl=libperl.a > gnulibc_version='' > Dynamic Linking: > dlsrc=dl_aix.xs, dlext=so, d_dlsymun=undef, ccdlflags=' > > -bE:/pcom/perl/perl-5.8.4/lib/5.8.4/aix/CORE/perl.exp' > cccdlflags=' ', lddlflags=' -bhalt:4 -bM:SRE > -bI:$(PERL_INC)/perl.exp > > -bE:$(BASEEXT).exp -bnoentry -lc -L/usr/local/lib' > > > Characteristics of this binary (from libperl): > Compile-time options: USE_LARGE_FILES > Built under aix > Compiled at May 5 2004 13:49:53 > @INC: > /pcom/perl/perl-5.8.4/lib/5.8.4/aix > /pcom/perl/perl-5.8.4/lib/5.8.4 > /pcom/perl/perl-5.8.4/lib/site_perl/5.8.4/aix > /pcom/perl/perl-5.8.4/lib/site_perl/5.8.4 > /pcom/perl/perl-5.8.4/lib/site_perl > .
On 火曜日 5月 03 16:48:49 2005, guest wrote: Show quoted text
> This error also occurs on AIX 5.2 with Build 1.14 > > with the same config. > [guest - Thu May 20 14:58:59 2004]: >
> > This version builds on AIX 5.2.0.0, but it hangs up on the first
test, Show quoted text
> > which is a simple spawn of the perl -v command. I have
communicated Show quoted text
> > with the author about this problem and am hoping for a resolution. > > > > This is how it hangs up: > > > > make test > > PERL_DL_NONLAZY=1 /pcom/perl/perl-5.8.4/bin/perl "-
Iblib/lib" Show quoted text
> > "-Iblib/arch" > > > > test.pl > > 1..36 > > > > Basic tests... > > > > If you look at test.pl, you'll see that it's hanging up at this
line: Show quoted text
> > > > my $exp = Expect->spawn("$Perl -v"); > > > > I debugged the module and found that it is hanging up at line 124
in Show quoted text
> > Expect.pm. This is the line of code: > > > > my $errstatus = sysread(STAT_RDR, $errno, 256); > > > > Here's what happened at that line: > > > > DB<3> print "$errno\n"; > > Use of uninitialized value in concatenation (.) or string at (eval > > 7)[/pcom/perl/perl-5.8.4/lib/5.8.4/perl5db.pl:619] line 2. > > eval '($@, $!, $^E, $,, $/, $\\, $^W) = @saved;package
Expect; Show quoted text
> > $^D = $^D | $DB::db_stop; > > print "$errno\\n";; > > > > ;' called at /pcom/perl/perl-5.8.4/lib/5.8.4/perl5db.pl line 619 > > DB::eval called at /pcom/perl/perl-
5.8.4/lib/5.8.4/perl5db.pl Show quoted text
> > line 3349 > > DB::DB called at blib/lib/Expect.pm line 124 > > Expect::spawn('Expect', '/pcom/perl/perl-5.8.4/bin/perl -
v') Show quoted text
> > called at test.pl line 37 > > > > > > I have seen other complaints about either test failures or hang ups > > on bulletin boards. It seems a lot of people are having this > > problem, and not just on AIX. > > > > The Tty and Stty Perl modules built installed just fine, as far as
I Show quoted text
> > can tell. I can provide the installation details if necessary.
(They Show quoted text
> > have been provided to the author.) > > > > Here's the info from perl -V. 5.8.4 was built on AIX 5.2.0.0. > > > > perl -V > > Summary of my perl5 (revision 5 version 8 subversion 4)
configuration: Show quoted text
> > Platform: > > osname=aix, osvers=5.2.0.0, archname=aix > > uname='aix silver 2 5 00037d0f4c00 ' > > config_args='' > > hint=recommended, useposix=true, d_sigaction=define > > usethreads=undef use5005threads=undef useithreads=undef > > usemultiplicity=undef > > useperlio=define d_sfio=undef uselargefiles=define
usesocks=undef Show quoted text
> > use64bitint=undef use64bitall=undef uselongdouble=undef > > usemymalloc=n, bincompat5005=undef > > Compiler: > > cc='cc', ccflags ='-D_ALL_SOURCE -D_ANSI_C_SOURCE -
D_POSIX_SOURCE Show quoted text
> > -qmaxmem=-1 > > > > -qnoansialias -DUSE_NATIVE_DLOPEN -q32 -D_LARGE_FILES -qlonglong', > > optimize='-O', > > cppflags='-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE > > -qmaxmem=-1 -qnoansialias > > > > -DUSE_NATIVE_DLOPEN' > > ccversion='6.0.0.7', gccversion='', gccosandvers='' > > intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321 > > d_longlong=define, longlongsize=8, d_longdbl=define,
longdblsize=8 Show quoted text
> > ivtype='long', ivsize=4, nvtype='double', nvsize=8,
Off_t='off_t', Show quoted text
> > lseeksize=8 > > alignbytes=8, prototype=define > > Linker and Libraries: > > ld='ld', ldflags =' -brtl -L/usr/local/lib -b32' > > libpth=/usr/local/lib /lib /usr/lib /usr/ccs/lib > > libs=-lbind -lnsl -ldbm -ldl -lld -lm -lcrypt -lc -lbsd > > perllibs=-lbind -lnsl -ldl -lld -lm -lcrypt -lc -lbsd > > libc=/lib/libc.a, so=a, useshrplib=false, libperl=libperl.a > > gnulibc_version='' > > Dynamic Linking: > > dlsrc=dl_aix.xs, dlext=so, d_dlsymun=undef, ccdlflags=' > > > > -bE:/pcom/perl/perl-5.8.4/lib/5.8.4/aix/CORE/perl.exp' > > cccdlflags=' ', lddlflags=' -bhalt:4 -bM:SRE > > -bI:$(PERL_INC)/perl.exp > > > > -bE:$(BASEEXT).exp -bnoentry -lc -L/usr/local/lib' > > > > > > Characteristics of this binary (from libperl): > > Compile-time options: USE_LARGE_FILES > > Built under aix > > Compiled at May 5 2004 13:49:53 > > @INC: > > /pcom/perl/perl-5.8.4/lib/5.8.4/aix > > /pcom/perl/perl-5.8.4/lib/5.8.4 > > /pcom/perl/perl-5.8.4/lib/site_perl/5.8.4/aix > > /pcom/perl/perl-5.8.4/lib/site_perl/5.8.4 > > /pcom/perl/perl-5.8.4/lib/site_perl > > .
> >
From: rgiersig [...] cpan.org
On Thu May 20 14:58:59 2004, guest wrote: Show quoted text
> This version builds on AIX 5.2.0.0, but it hangs up on the first test, > which is a simple spawn of the perl -v command. I have communicated > with the author about this problem and am hoping for a resolution.
I tested it on AIX 5.3 and it worked. Seems it is a problem with pipes, it hangs upon synchronizing the spawned child with the parent via a pipe. Have to ask Google about changes to AIX in that regard... ... half an hour later... Got it (I think). Please try the patch below, I added a close-on-exit flag to the pipe handle. Feedback appreciated. *** Expect-1.15/Expect.pm Tue Mar 19 12:59:29 2002 --- Expect-1.16/Expect.pm Tue May 2 12:04:31 2006 *************** *** 105,108 **** --- 105,110 ---- pipe(STAT_RDR, STAT_WTR) or die "Cannot open pipe: $!"; STAT_WTR->autoflush(1); + use Fcntl; + fcntl(STAT_WTR, F_SETFD, FD_CLOEXEC); my $pid = fork; -- RGiersig@cpan.org