Perlbal 1.41 crash with buffered uploads

Jay Buffington jaybuffington at gmail.com
Fri Jul 7 21:36:03 UTC 2006


Pressing the stop button in the browser while doing an upload to
perlbal consistently kills perlbal with my set up.  The error in
/var/log/messages is:

Jul  7 14:12:18 baker perlbal[12535]: crash log: Can't use string
("c") as a SCALAR ref while "strict refs" in use at
/usr/lib/perl5/site_perl/5.8.5/Perlbal/ClientProxy.pm line 923.

It looks like this is because of line 947 of ClientProxy.pm, it's
unshifting a string instead of a reference to a string into the
buffer.

I made this change and it stopped dying, but I got an error about an
undef $fh from AIO instead.
--- ClientProxy.pm      2006-01-19 21:33:52.000000000 -0800
+++ /usr/lib/perl5/site_perl/5.8.5/Perlbal/ClientProxy.pm
2006-07-07 14:23:49.000000000 -0700
@@ -944,7 +944,8 @@
         # written out and update as appropriate.
         if ($bytes < $len) {
             my $diff = $len - $bytes;
-            unshift @{$self->{read_buf}}, substr($$bref, $bytes, $diff);
+            my $b = substr($$bref, $bytes, $diff);
+            unshift @{$self->{read_buf}}, \$b;
             $self->{read_ahead} += $diff;
         }

Was that intentional?

Here is my config:
jay at baker:~$ cat /etc/perlbal/perlbal.conf
CREATE POOL my_apaches
  POOL my_apaches ADD 216.35.12.150:80

SERVER aio_mode = ioaio

CREATE SERVICE balancer
  SET listen          = 216.35.12.151:80
  SET role            = reverse_proxy
  SET pool            = my_apaches
  SET persist_client  = on
  SET persist_backend = on
  SET verify_backend  = on
  SET enable_reproxy  = true

  SET buffer_uploads               = true
  SET buffer_backend_connect       = 100000
  SET buffer_size                  = 256000
  SET buffer_upload_threshold_rate = 0
  SET buffer_upload_threshold_size = 250000
  SET buffer_upload_threshold_time = 5
  SET buffer_uploads_path          = /tmp/buffered_uploads/
ENABLE balancer

# management port
CREATE SERVICE mgmt
  SET role   = management
  SET listen = 127.0.0.1:60000
ENABLE mgmt


More information about the perlbal mailing list