Subject: | Net::OpenSSH bug report |
Date: | Wed, 29 Apr 2020 12:47:48 +0200 |
To: | bug-Net-OpenSSH [...] rt.cpan.org |
From: | rpfact [...] aoi.sk |
Hello, me again, after a while.
I have used your Net::OpenSSH in one tool we are using to connect to
multiple servers (>100k) in parallel way and execute whatever commands
system administrator decides to run. It works great, so seriously good
work man. During past two years working with this, i found one another,
minor issue.
I'm using version 0.78 .
Sometimes when connecting to some servers which are in various hung
stages, from time to time i'm encountering :
Use of uninitialized value $_[0] in join or string at
/.../lib/Net/OpenSSH.pm line 122, <STDIN> line 1.
The part of the code on that particular line seems to be related to
handling errors:
sub _set_error {
my $self = shift;
my $code = shift || 0;
my $err = $self->{_error} = ( $code
? Scalar::Util::dualvar($code, join(':
', @{$self->{_error_prefix}},
(@_ ? @_ : "Unknown error $code")))
: 0 );
$debug and $debug & 1 and _debug "set_error($code - $err)";
return $err
}
Seems like some undef value is being used as string in join. I'm not
getting any other visible error and i can't even link the issue to the
particular connection/session im trying to establish, it happens very
rarely usually when doing like 100 parallel workers for connecting, so
i'm unable to reproduce it. Fix i'm suggesting is simply to make sure
all join variables are defined.
Regards
Jaroslav Reindl
Slovakia