crash with Perlbal-1.41
dormando
dormando at rydia.net
Fri Jun 2 06:42:30 UTC 2006
Hey,
> ---------------------------------------------------------------
> beginning run
> Undef client_ip (Perlbal::ClientProxy=ARRAY(0xa1a5504)) in
> assign_client. Closing. at
> /home/calh/perlbal/lib/perl5/site_perl/5.8.6/Perlbal/BackendHTTP.pm
> line 179.
> Undef client_ip (Perlbal::ClientProxy=ARRAY(0xaefbe58)) in
> assign_client. Closing. at
> /home/calh/perlbal/lib/perl5/site_perl/5.8.6/Perlbal/BackendHTTP.pm
> line 179.
> crash log: Can't use string ("�") as a SCALAR ref while "strict
> refs" in use at
> /home/calh/perlbal/lib/perl5/site_perl/5.8.6/Perlbal/ClientProxy.pm
> line 923.
> ending run
I started getting this a ton depending on client connectios being weird.
Haven't had a moment to track down exactly why it's happening, but
there's a trivial fix for the problem. Your error's slightly different
though. In my case an empty IP address was being passed along, but in
your case it looks like 3 bytes of garbage. Just a case of an unhandled
error in the source code.
A badly formed trivial patch is as follows (and works, my perlbal
instances have been up for months at this point):
--- BackendHTTP.pm.1.39 2006-02-28 20:55:13.634135000 -0800
+++ BackendHTTP.pm 2006-02-28 20:52:59.805445000 -0800
@@ -70,7 +70,14 @@
}
IO::Handle::blocking($sock, 0);
- connect $sock, Socket::sockaddr_in($port, Socket::inet_aton($ip));
+
+ # Sometimes this dies. Unsure of the circumstances.
+ eval {
+ connect $sock, Socket::sockaddr_in($port, Socket::inet_aton($ip));
+ };
+ if ($@) { warn "Socket connect failed (probably due to sockaddr_in)
$@";
+ return undef;
+ }
my $self = fields::new($class);
$self->SUPER::new($sock);
More information about the perlbal
mailing list