On Mon, Oct 12, 2020 at 22:22:45 -0400, Chris Hoogendyk wrote:
> Mon Oct 12 22:16:21.857347044 2020: pid 23996: thd-0x25c0800:
> amcheck-device: slot: 9 label:
> Bio-Research-011ds:
> Mon Oct 12 22:16:21.857380544 2020: pid 23996: thd-0x25c0800:
> amcheck-device: slot: 10 label:
> Bio-Research-012ds: 0
> Mon Oct 12 22:16:21.857471810 2020: pid 23996: thd-0x25c0800:
> amcheck-device: slot: 11 label:
> Bio-Research-028ds: 0
> Mon Oct 12 22:16:21.857580226 2020: pid 23996: thd-0x25c0800:
> amcheck-device: warning: Use of
> uninitialized value in concatenation (.) or string at
> /usr/local/share/perl/5.22.1/Amanda/Taper/Scan/lexical.pm line 102.
> Mon Oct 12 22:16:21.857607369 2020: pid 23996: thd-0x25c0800:
> amcheck-device: slot: 12 label: ds: 0
Progress!
This shows that the crash happens during processing of slot 12.
(Looking back through the output of "amtape inventory" you sent, it
appears that this slot contains a tape with barcode 000029L7.)
An interesting thing to note is that the *label* variable for that slot is
uninitialized -- perhaps that's what is causing the crash?
To test that theory a bit, I've attached another patch to try.
Unfortunately this one is in a file used by the oldest.pm algorithm,
too, so you'll probably want to revert the file back to the original as
soon as you've finished teating, to make sure that the patched version
doesn't affect an actual amanda run.
So, basically save a copy of the original
/usr/local/share/perl/5.22.1/Amanda/ScanInventory.pm
file, then apply the patch attached to this email in-place to that file,
and run the
amcheck -s -otaperscan=taper_lexical daily
test again. (I don't expect this patch to prevent the crash, but
hopefully the new log messages will narrow down exactly where it is crashing.)
Nathan
----------------------------------------------------------------------------
Nathan Stratton Treadway - [email protected] - Mid-Atlantic region
Ray Ontko & Co. - Software consulting services - http://www.ontko.com/
GPG Key: http://www.ontko.com/~nathanst/gpg_key.txt ID: 1023D/ECFB6239
Key fingerprint = 6AD8 485E 20B9 5C71 231C 0C32 15F3 ADCD ECFB 6239
--- ScanInventory.pm_orig_v3.5.1 2017-09-22 19:41:42.154305907 -0400
+++ ScanInventory.pm 2020-10-13 00:53:04.662721210 -0400
@@ -684,6 +684,7 @@
my $chg = $self->{'chg'};
my $autolabel = $chg->{'autolabel'};
+ debug("volume_is_labelable start: label: $label barcode: $barcode");
if (!defined $dev_status) {
return 0;
} elsif ($dev_status & $DEVICE_STATUS_VOLUME_UNLABELED and
@@ -723,8 +724,10 @@
return 0;
} elsif ($dev_status == $DEVICE_STATUS_SUCCESS and
$f_type == $Amanda::Header::F_TAPESTART) {
+ debug("volume_is_labelable pre-matchlabel call");
if (!match_labelstr($self->{'labelstr'}, $autolabel, $label,
$barcode, $meta,
$self->{'chg'}->{'storage'}->{'storage_name'})) {
+ debug("volume_is_labelable post-matchlabel call");
if (!$autolabel->{'other_config'}) {
# $self->_user_msg(slot_result => 1,
# label => $label,
@@ -734,7 +737,9 @@
return 0;
}
} else {
+ debug("volume_is_labelable pre-lookup_tapelabel call");
my $vol_tle = $self->{'tapelist'}->lookup_tapelabel($label);
+ debug("volume_is_labelable post-lookup_tapelabel call");
if (!$vol_tle) {
# $self->_user_msg(slot_result => 1,
# label => $label,