Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 683438

Summary: dev-perl/Socket6-0.280.0 fails tests (Use of uninitialized value in subroutine entry at t/use.t line 46)
Product: Gentoo Linux Reporter: Kent Fredric (IRC: kent\n) (RETIRED) <kentnl>
Component: Current packagesAssignee: Gentoo Perl team <perl>
Status: RESOLVED WORKSFORME    
Severity: normal Keywords: TESTFAILURE
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=683444
https://bugs.gentoo.org/show_bug.cgi?id=683442
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 300119    

Description Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2019-04-16 07:07:51 UTC
Not sure what's going on here, triage later.

The offending line is:

my($addr, $port) = getnameinfo($sin, NI_NUMERICHOST | NI_NUMERICSERV);

and the "Use of unit value in subroutine entry" typically indicates an XS function getting passed an undef, so its likely that either the constant is somehow evaluating to undef, or $sin is undef.

$sin is derived via:

my @tmp = getaddrinfo("localhost", "", AF_INET, SOCK_STREAM, 0, 0);
if ($#tmp >= 1) {
    ok(2);
}
my($family, $socktype, $protocol, $sin, $canonname) = splice(@tmp, $[, 5);

Which suggests that getaddrinfo() is returning undef for the resolved packed address for the name.

Given that implies "localhost" doesn't resolve to an IP, possibly network-sandbox to blame, or something in my local /etc/hosts or /etc/nsswitch.conf is to blame.

( Hopefully that also encompasses why I have a test failure for perl 5.28 ... )
Comment 1 Andreas K. Hüttel archtester gentoo-dev 2021-05-21 20:02:20 UTC
Works fine now