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

dist/IO/t/cachepropagate-unix.t AIX 5.3 failure in blead feca1a #15892

Closed
p5pRT opened this issue Feb 25, 2017 · 11 comments
Closed

dist/IO/t/cachepropagate-unix.t AIX 5.3 failure in blead feca1a #15892

p5pRT opened this issue Feb 25, 2017 · 11 comments

Comments

@p5pRT
Copy link

p5pRT commented Feb 25, 2017

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

Searchable as RT130856$

@p5pRT
Copy link
Author

p5pRT commented Feb 25, 2017

From @jhi

The test dist/IO/t/cachepropagate-unix.t fails with blead feca1a
with the following error​:

dist/IO/t/cachepropagate-unix .................................. Invalid
arg sun_len field for Socket​::unpack_sockaddr_un, length is 1025, but
sun_len is 1 at t/cachepropagate-unix.t line 27.
FAILED--no leader found

(the host is Merijn's i3.procura.nl)

Perl Info

Flags:
     category=core
     severity=medium

Site configuration information for perl 5.25.11:

Configured by jhi at Sat Feb 25 01:52:43 MET 2017.

Summary of my perl5 (revision 5 version 25 subversion 11) configuration:

   Platform:
     osname=aix
     osvers=5.3.0.0
     archname=aix
     uname='aix i3 3 5 0004898ad300 '
     config_argommended
     useposix=true
     d_sigaction=define
     useithreads=undef
     usemultiplicity=undef
     use64bitint=undef
     use64bitall=undef
     uselongdouble=undef
     usemymalloc=n
     bincompat5005=undef
   Compiler:
     cc='cc -q32'
     ccflags ='-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE 
-qmaxmem=-1 -qnoansialias -qlanglvl=extc99 -DUSE_NATIVE_DLOPEN 
-I/usr/local/include -q32 -D_LARGE_FILES'
     optimize='-O'
     cppflags='-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE 
-DUSE_NATIVE_DLOPEN -I/usr/local/include'
     ccversion='12.1.0.12'
     gccversion=''
     gccosandvers=''
     intsize=4
     longsize=4
     ptrsize=4
     doublesize=8
     byteorder=4321
     doublekind=4
     d_longlong=define
     longlongsize=8
     d_longdbl=define
     longdblsize=8
     longdblkind=0
     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 -bdynamic axdata:0x80000000'
     libpth=/usr/local/lib /lib /usr/lib /usr/ccs/lib /usr/lib64
     libs=-lpthread -lbind -lnsl -ldbm -ldl -lld -lm -lcrypt -lc
     perllibs=-lpthread -lbind -lnsl -ldl -lld -lm -lcrypt -lc
     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:/usr/local/lib/perl5/5.25.11/aix/CORE/perl.exp'
     cccdlflags=' '
     lddlflags='  -bhalt:4 -G -bI:$(PERL_INC)/perl.exp 
-bE:$(BASEEXT).exp -bnoentry -lc -lm  -L/usr/local/lib'



@INC for perl 5.25.11:
     lib
     /usr/local/lib/perl5/site_perl/5.25.11/aix
     /usr/local/lib/perl5/site_perl/5.25.11
     /usr/local/lib/perl5/5.25.11/aix
     /usr/local/lib/perl5/5.25.11


Environment for perl 5.25.11:
     HOME=/perl/usr/jhi
     LANG=en_US
     LANGUAGE (unset)
     LC__FASTMSG=true
     LD_LIBRARY_PATH (unset)
     LIBPATH (unset)
     LOGDIR (unset)
 
PATH=/usr/bin:/etc:/usr/sbin:/pro/local/bin:/pro/bin:/usr/local/bin:/usr/vac/bin:/usr/local/sbin:/usr/ucb:/usr/bin/X11:/sbin:/usr/java14/jre/bin:/usr/java14/bin
     PERL_BADLANG (unset)
     SHELL=/pro/local/bin/bash

@p5pRT
Copy link
Author

p5pRT commented Feb 26, 2017

From @jkeenan

On Sat, 25 Feb 2017 02​:43​:17 GMT, jhi wrote​:

-----------------------------------------------------------------
[Please describe your issue here]

The test dist/IO/t/cachepropagate-unix.t fails with blead feca1a
with the following error​:

dist/IO/t/cachepropagate-unix ..................................
Invalid
arg sun_len field for Socket​::unpack_sockaddr_un, length is 1025, but
sun_len is 1 at t/cachepropagate-unix.t line 27.
FAILED--no leader found

(the host is Merijn's i3.procura.nl)

Example smoke report​:

http​://perl5.test-smoke.org/report/54324

#####
Test failures​:
~~ ../dist/IO/t/cachepropagate-unix.t .......................... FAILED Non-zero exit status​: 255 No plan found in TAP output
  [stdio/perlio/locale​:EN_US.UTF-8] -Duseithreads -Duse64bitint DEBUGGING
  [stdio/perlio/locale​:EN_US.UTF-8]
  [stdio/perlio/locale​:EN_US.UTF-8] -Duseithreads DEBUGGING
  [stdio/perlio/locale​:EN_US.UTF-8] -Duseithreads -Duse64bitall DEBUGGING
  [stdio/perlio/locale​:EN_US.UTF-8] -Duse64bitall DEBUGGING
  [stdio/perlio/locale​:EN_US.UTF-8] DEBUGGING
  [stdio/perlio/locale​:EN_US.UTF-8] -Duseithreads -Duse64bitint
  [stdio/perlio/locale​:EN_US.UTF-8] -Duse64bitint DEBUGGING
  [stdio/perlio/locale​:EN_US.UTF-8] -Duse64bitint
  [stdio/perlio/locale​:EN_US.UTF-8] -Duseithreads
  [stdio/perlio/locale​:EN_US.UTF-8] -Duseithreads -Duse64bitall
  [stdio/perlio/locale​:EN_US.UTF-8] -Duse64bitall
#####

However, this is not the only test failure on this platform, and it's not a new test failure, either. It's present in the oldest test report I can find from this host​:

http​://perl5.test-smoke.org/report/471

... which is dated 2012-05-13.

So I'm wondering why you've failed this report at this time. Is there something I'm missing?

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

@p5pRT
Copy link
Author

p5pRT commented Feb 26, 2017

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

@p5pRT
Copy link
Author

p5pRT commented Feb 26, 2017

From @jhi

So I'm wondering why you've failed this report at this time. Is there
something I'm missing?

I don't understand what you are asking.

I run a build with the arguments you can see in the report, that test failed.

@p5pRT
Copy link
Author

p5pRT commented Feb 27, 2017

From @tonycoz

On Fri, 24 Feb 2017 18​:43​:17 -0800, jhi wrote​:

-----------------------------------------------------------------
[Please describe your issue here]

The test dist/IO/t/cachepropagate-unix.t fails with blead feca1a
with the following error​:

dist/IO/t/cachepropagate-unix ..................................
Invalid
arg sun_len field for Socket​::unpack_sockaddr_un, length is 1025, but
sun_len is 1 at t/cachepropagate-unix.t line 27.
FAILED--no leader found

(the host is Merijn's i3.procura.nl)

How big is the sun_len field in struct sockaddr_un on AIX?

Given the error it sounds like it might be byte-sized, despite sun_path being larger.

I'd only expect to see this error if TMPDIR is around 1000 characters long, which seems excessive.

The attached might fix this for you.

Tony

@p5pRT
Copy link
Author

p5pRT commented Feb 27, 2017

From @tonycoz

0001-perl-130856-deal-with-unpack_sockaddr_un-croaking.patch
From aa9ac6cf00899a6f55881d4ca6c1214215dc83ee Mon Sep 17 00:00:00 2001
From: Tony Cook <tony@develop-help.com>
Date: Mon, 27 Feb 2017 11:03:06 +1100
Subject: (perl #130856) deal with unpack_sockaddr_un() croaking

because pack_sockaddr_un() returned an invalid address.
---
 dist/IO/t/cachepropagate-unix.t | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/dist/IO/t/cachepropagate-unix.t b/dist/IO/t/cachepropagate-unix.t
index 20c70dd..9ec42b0 100644
--- a/dist/IO/t/cachepropagate-unix.t
+++ b/dist/IO/t/cachepropagate-unix.t
@@ -24,8 +24,12 @@ my $socketpath = catfile(tempdir( CLEANUP => 1 ), 'testsock');
 # https://rt.cpan.org/Ticket/Display.html?id=116819
 
 my $name = eval { pack_sockaddr_un($socketpath) };
-defined $name && (unpack_sockaddr_un($name))[0] eq $socketpath
-  or plan skip_all => "socketpath too long for sockaddr_un";
+if (defined $name) {
+    my ($packed_name) = eval { unpack_sockaddr_un($name) };
+    if (!defined $packed_name || $packed_name ne $socketpath) {
+        plan skip_all => "socketpath too long for sockaddr_un";
+    }
+}
 
 plan tests => 15;
 
-- 
2.1.4

@p5pRT
Copy link
Author

p5pRT commented Feb 27, 2017

From @jhi

How big is the sun_len field in struct sockaddr_un on AIX?

Given the error it sounds like it might be byte-sized, despite

Yup, sizeof() for sun_len seems to be only one. The <sys/un.h> has​:

#if defined(COMPAT_43) && !defined(_KERNEL)
struct sockaddr_un {
  ushort_t sun_family; /* AF_UNIX */
  char sun_path[1024]; /* changed from 104 to PATH_MAX to support long user names. This value should be changed manually if PATH_MAX changes in future */
};
#else
struct sockaddr_un {
  uchar_t sun_len; /* sockaddr len including null */
  sa_family_t sun_family; /* AF_UNIX */
  char sun_path[1023]; /* changed from 104 to PATH_MAX to support long user names. This value should be changed manually if PATH_MAX changes in future */
};
#endif /* COMPAT_43 && !_KERNEL */

sun_path being larger.

I'd only expect to see this error if TMPDIR is around 1000 characters
long, which seems excessive.

The attached might fix this for you.

Indeed it does​:

./perl -Ilib dist/IO/t/cachepropagate-unix.t
1..0 # SKIP socketpath too long for sockaddr_un

Tony

@p5pRT
Copy link
Author

p5pRT commented Feb 27, 2017

From @tonycoz

On Sun, 26 Feb 2017 16​:46​:54 -0800, jhi wrote​:

How big is the sun_len field in struct sockaddr_un on AIX?

Given the error it sounds like it might be byte-sized, despite

Yup, sizeof() for sun_len seems to be only one. The <sys/un.h> has​:

...

struct sockaddr_un {
uchar_t sun_len; /* sockaddr len including null
*/
...

I've added a note to https://rt.cpan.org/Ticket/Display.html?id=116819 about the possibility of the length being too large for sun_len.

sun_path being larger.

I'd only expect to see this error if TMPDIR is around 1000 characters
long, which seems excessive.

The attached might fix this for you.

Indeed it does​:

./perl -Ilib dist/IO/t/cachepropagate-unix.t
1..0 # SKIP socketpath too long for sockaddr_un

Thanks, patch applied to blead as aa9ac6c.

Tony

@p5pRT
Copy link
Author

p5pRT commented Feb 27, 2017

@tonycoz - Status changed from 'open' to 'pending release'

@p5pRT
Copy link
Author

p5pRT commented May 30, 2017

From @khwilliamson

Thank you for filing this report. You have helped make Perl better.

With the release today of Perl 5.26.0, this and 210 other issues have been
resolved.

Perl 5.26.0 may be downloaded via​:
https://metacpan.org/release/XSAWYERX/perl-5.26.0

If you find that the problem persists, feel free to reopen this ticket.

@p5pRT
Copy link
Author

p5pRT commented May 30, 2017

@khwilliamson - Status changed from 'pending release' to 'resolved'

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

1 participant