Re: 3.4.5 amcheck segfault in try_match with cleaning tape in library

Jason L Tibbitts III <[email protected]> Mon, 31 Jul 2017 14:25:48 -0500
Newsgroups gmane.comp.archivers.amanda.devel
Message-ID <[email protected]>
For some more information, I traced this to a volume_is_labelable call
in Taper/Scan/oldest.pm::analyze().  Specifically, this one:

        } elsif ($self->volume_is_labelable($sl)) {
            $sl->{'label'} = $self->{'chg'}->make_new_tape_label(
                                        barcode => $sl->{'barcode'},
                                        slot => $sl->{'slot'},
                                        meta => $sl->{'meta'});
            push @new_volume, $sl;


At this point, $sl->{'state'} is 1 (SLOT_FULL) and $sl->{'label'} is
empty.  If add "0 &&" in the appropriate place so that's not executed
and run amcheck then things appear to work as expected.  (If I add
'1 ||' so that block is always executed then it loads the cleaning tape
and things don't work so well.  Note that I don't have any type of
automatic labeling setup, so I don't know why it would load an unlabeled
tape at all.)

 - J<