Yiyi,

Try the attached patch

Jean-Louis

On 09/03/17 04:27 AM, Yiyi Hu wrote:
Hi,

After I upgraded to3.4.3 on my gentoo system,

I get errors when I try to do the backup.

The errors are

FAILURE DUMP SUMMARY:
chunker: FATAL Can't use an undefined value as a subroutine reference at /usr/lib64/perl5/vendor_perl/5.22.3/Amanda/Chunker/Scribe.pm line 580. chunker: FATAL Can't use an undefined value as a subroutine reference at /usr/lib64/perl5/vendor_perl/5.22.3/Amanda/Chunker/Scribe.pm line 580. localhost /srv/online_disk lev 0 FAILED [too many dumper retry: [request failed: error sending REQ: write error to: Broken pipe]]
  localhost /srv.data/ lev 0  FAILED [chunker0 died]
  localhost /srv/online_disk lev 0  FAILED [data timeout]
  localhost /srv.data/ lev 0  FAILED [data timeout]
  localhost /srv.data/ lev 0  FAILED [data timeout]

And when I check the lines in Scribe.pm

It seems the dump_cb is not passed in the _sump_done sub

sub _dump_done {
    my $self = shift;

    my $dump_cb = $self->{'dump_cb'};
    my %dump_cb_args = (
        result => $self->{'result'},
        header_size => $self->{'header_size'},
        data_size => $self->{'data_size'},
        total_duration => $self->{'total_duration'});

    # reset everything and let the original caller know we're done
    $self->{'xfer'} = undef;
    $self->{'xdh'} = undef;
    $self->{'dump_header'} = undef;
    $self->{'dump_cb'} = undef;
    $self->{'header_size'} = 0;
    $self->{'data_size'} = 0;
    $self->{'total_duration'} = 0.0;
    $self->{'dump_start_time'} = undef;

    # and call the callback
    $dump_cb->(%dump_cb_args);
}


Any ideas how to solve this?

Is it possible that the dump failure is caused by bind mount?

Thanks!

This message is the property of CARBONITE, INC. and may contain confidential or privileged information. If this message has been delivered to you by mistake, then do not copy or deliver this message to anyone. Instead, destroy it and notify me by reply e-mail.
diff --git a/perl/Amanda/Chunker/Controller.pm b/perl/Amanda/Chunker/Controller.pm
index a1f525a..9bda091 100644
--- a/perl/Amanda/Chunker/Controller.pm
+++ b/perl/Amanda/Chunker/Controller.pm
@@ -246,10 +246,11 @@ sub msg_PORT_WRITE {
         # if $err is set, cancel the dump, treating it as a input error
         if ($err) {
             push @{$self->{'input_errors'}}, $err;
-            return $self->{'scribe'}->cancel_dump(
-                xfer => $self->{'xfer'},
-                #dump_cb => sub { $self->dump_cb(@_); });
-                dump_cb => $dump_cb);
+	    $dump_cb->(result => "FAILED",
+		       size   => 0,
+		       total_duration => 0,
+		       nparts => 0);
+	    return;
         }
 
         # sanity check the header..
diff --git a/perl/Amanda/Chunker/Scribe.pm b/perl/Amanda/Chunker/Scribe.pm
index eb6338e..376d2f3 100644
--- a/perl/Amanda/Chunker/Scribe.pm
+++ b/perl/Amanda/Chunker/Scribe.pm
@@ -577,7 +577,7 @@ sub _dump_done {
     $self->{'dump_start_time'} = undef;
 
     # and call the callback
-    $dump_cb->(%dump_cb_args);
+    $dump_cb->(%dump_cb_args) if defined $dump_cb;
 }
 
 sub _get_new_holding {

Reply via email to