crash on Perlbal 1.51

Brad Fitzpatrick brad at danga.com
Mon Dec 4 07:00:22 UTC 2006


Can you guys test this patch?

$ svn diff
Index: lib/Perlbal/ClientProxy.pm
===================================================================
--- lib/Perlbal/ClientProxy.pm  (revision 611)
+++ lib/Perlbal/ClientProxy.pm  (working copy)
@@ -444,9 +444,16 @@

     print "ClientProxy::http_response_sent -- resetting state\n" if Perlbal::DEBUG >= 3;

+    if (my $be = $self->{backend}) {
+        $self->{backend} = undef;
+        if ($be->{client}) {
+            Perlbal::log('warning', "Backend had a client: $be->{client}, we are $self");
+            $be->{client} = undef;
+        }
+    }
+
     # if we get here we're being persistent, reset our state
     $self->{backend_requested} = 0;
-    $self->{backend} = undef;
     $self->{high_priority} = 0;
     $self->{reproxy_uris} = undef;
     $self->{reproxy_expected_size} = undef;


And then the key thing to watch is if there's any output from that
debugging statement.  If you see anything, then this is probably the
correct fix.


On Wed, 29 Nov 2006, dormando wrote:

> Kevin Rosenberg wrote:
> > Del Raco wrote:
> >> Has anyone seen the following error on Perlbal 1.51?
> >> Nov 28 03:10:37 app-200 perlbal[16356]: crash log:
> >> Can't call method "req_keep_alive" on an undefined
> >> value at
> >> /usr/local/share/perl/5.8.7/Perlbal/ClientHTTPBase.pm
> >> line 124.
> >
> > Yes.
> >
> >> Any help would be appreciated.  Thanks.
> >
> > I quickly hacked a workaround, but I don't understand the true cause of
> > the error:
> >
>
> We had the same issue back in october, fixed with a slightly different
> patch (and a little insight as to what might've been happening). But I
> don't have the time to dig into it further right now.
>
> http://lists.danga.com/pipermail/perlbal/2006-October/000328.html
>
> The root of the problem appears to be a few cases where the code allows
> a client to reset without telling its attached backend that it's reset.
> The backend object blindly uses its reference to the client once the
> next event happens. I don't think I properly caught all of the cases
> where that happens, so I submitted a kludge patch instead.
>
> -Dormando
>
>


More information about the perlbal mailing list