Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

amanda-3.5.1 : amcheck segfault #94

Open
stefangweichinger opened this issue Dec 21, 2018 · 4 comments
Open

amanda-3.5.1 : amcheck segfault #94

stefangweichinger opened this issue Dec 21, 2018 · 4 comments

Comments

@stefangweichinger
Copy link
Contributor

Amanda-3.5.1 on latest Gentoo Linux.

I can load and unload tapes via amtape, I can even label tapes.
But amcheck fails as well as amflush or amdump.

$ amcheck -s abt
Amanda Tape Server Host Check
-----------------------------
NOTE: Holding disk '/mnt/amhold/abt': 169 GB disk space available, using 168 GB
ERROR: amcheck-device terminated with signal 11
Server check took 1.438 seconds
(brought to you by Amanda 3.5.1)
# dmesg
amcheck-device[31798]: segfault at 8 ip 00007f23c67c56e6 sp 00007ffc8ed07488 error 4 in libc-2.27.so[7f23c6727000+1be000]

#dmesg after failing amflush
[11729.998836] taper[32221]: segfault at 8 ip 00007f6af16e46e6 sp 00007fff5120d358 error 4 in libc-2.27.so[7f6af1646000+1be000]
@cswingley
Copy link

Latest amanda-server package on Debian Bullseye (1:3.5.1-7). I am also getting a segfault from amcheck-device. It had been working previously on this system, so it's a mystery what's going on. I'm rebuilding from source in case it's a linked library issue.

$ sudo -u backup amcheck -lt lto5
Amanda Tape Server Host Check
-----------------------------
NOTE: Holding disk '/scratch/amanda': 6784332 MB disk space available, using 4194304 MB as requested
ERROR: amcheck-device terminated with signal 11

$ sudo dmesg -T | tail
[Wed Feb  2 12:27:34 2022] amcheck-device[42852]: segfault at 0 ip 00007f50f277a846 sp 00007ffc58d1a538 error 4 in libc-2.31.so[7f50f2702000+14b000]
[Wed Feb  2 12:27:34 2022] Code: 0f 1f 40 00 66 0f ef c0 66 0f ef c9 66 0f ef d2 66 0f ef db 48 89 f8 48 89 f9 48 81 e1 ff 0f 00 00 48 81 f9 cf 0f 00 00 77 6a <f3> 0f 6f 20 66 0f 74 e0 66 0f d7 d4 85 d2 74 04 0f bc c2 c3 48 83

@cswingley
Copy link

cswingley commented Feb 3, 2022

It turned out that the issue had to do with some confusion related to the changer status file Amanda keeps so it doesn't have to inventory the tapes all the time. We had a changer error where the library had difficulty getting the tape out of the slot and I think this caused Amanda to corrupt the inventory file in some way. Unfortunately, amcheck-device handles this in the most ungraceful way possible by simply segfaulting. I figured it out by running amcheck-device through perl -d until it crashed, then adding print statements in the code to identify what it was seeing when it crashed.

For me, the fix was re-inventorying the tape changer with amtape lto5 update.

@stefangweichinger
Copy link
Contributor Author

hitting this one again today after an old server + library were moved from A to B. This might have lead to some inconsistent state as well. Updating now, we'll see.

@RobertPHeller
Copy link

RobertPHeller commented Jul 14, 2024

I am having this problem on a more or less fresh install under Debian 12 (bookworm) with amanda 3.5.1. amtape update is segfaulting on slot 1. And just fails on other slots. The changer is an Amazon S3:

`define changer backupdiskchanger {
tpchanger "chg-multi:"
device_property "S3_ACCESS_KEY" "XXXXX"
device_property "S3_SECRET_KEY" "XXXXXXXXXXXXXXXXXXXX"
changerfile "/etc/amanda/sharky5/changer.conf"
}

tpchanger "backupdiskchanger"
tapetype S3
`

This config was working on an older install (3.3.3 under CentOS 7).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants