Hello everyone,
I have identified an issue with file extraction using Bextract.
A segmentation fault occurs, and according to the logs, it fails to open the Bareos-sd backend device that it needs to read from.
However, I have not been able to find similar cases in the same version. In particular, this issue started occurring after upgrading to Bareos 25.0.3.
Previously, I was using version 24.0.7, where everything worked as expected.
The only difference in the environment is the version upgrade.
Here is my analysis so far: Thank you.
---
Failed = bareos-sd(27.0.7) media type dedupable bextrext(25.0.3)
Failed = bareos-sd(27.0.7) media type dedupable bextrext(24.0.7)
OK = bareos-sd(27.0.7) media type file bextrext(24.0.7)
OK = bareos-sd(24.0.7) media dedupable bextrext(24.0.7)
Failed = bareos-sd(27.0.7) media type dedupable bextrext(25.0.3)
Detail Log D level 200
—
/usr/sbin/bextract -d 200 -v -i ./include-list -V vol-1 /stg/backup /usr/local/test
bextract (100): findlib/match.cc:408-0 add_fname_to_include prefix=0 compress=0 alg= 0 fname=/rear-output/iso/*/*.iso
bextract (10): lib/parse_conf.h:460-0 ConfigResourcesContainer: new configuration_resources_ 0x563f51fdc1d0
bextract (100): lib/parse_conf.cc:181-0 config file = /etc/bareos/bareos-sd.d/*/*.conf
bextract (100): lib/lex.cc:295-0 glob /etc/bareos/bareos-sd.d/*/*.conf: 9 files
~~~~~
bextract (10): stored/stored_conf.cc:458-0 : Device resource "b247360d-c13b-4d6b-a8be-334192d78fc6" will not implicitly create autochanger "b247360d-c13b-4d6b-a8be-334192d78fc6" resource since it is already used by autochanger resource "b247360d-c13b-4d6b-a8be-334192d78fc6".
02-Apr 17:31 bextract: Device resource "b247360d-c13b-4d6b-a8be-334192d78fc6" will not implicitly create autochanger "b247360d-c13b-4d6b-a8be-334192d78fc6" resource since it is already used by autochanger resource "b247360d-c13b-4d6b-a8be-334192d78fc6".
bextract (10): stored/stored_conf.cc:458-0 : Device resource "58655fe7-5feb-46a4-ae60-ccc3cccff6f8" will not implicitly create autochanger "58655fe7-5feb-46a4-ae60-ccc3cccff6f8" resource since it is already used by autochanger resource "58655fe7-5feb-46a4-ae60-ccc3cccff6f8".
02-Apr 17:31 bextract: Device resource "58655fe7-5feb-46a4-ae60-ccc3cccff6f8" will not implicitly create autochanger "58655fe7-5feb-46a4-ae60-ccc3cccff6f8" resource since it is already used by autochanger resource "58655fe7-5feb-46a4-ae60-ccc3cccff6f8".
bextract (10): stored/stored_conf.cc:458-0 : Device resource "39e4b2b9-ffbb-4687-be73-f481222cfb2d" will not implicitly create autochanger "39e4b2b9-ffbb-4687-be73-f481222cfb2d" resource since it is already used by autochanger resource "39e4b2b9-ffbb-4687-be73-f481222cfb2d".
02-Apr 17:31 bextract: Device resource "39e4b2b9-ffbb-4687-be73-f481222cfb2d" will not implicitly create autochanger "39e4b2b9-ffbb-4687-be73-f481222cfb2d" resource since it is already used by autochanger resource "39e4b2b9-ffbb-4687-be73-f481222cfb2d".
bextract (50): stored/sd_backends_dynamic.cc:46-0 Loaded dynamic library /usr/lib64/bareos/backends/libbareossd-dedupable.so
bextract (8): lib/crypto_cache.cc:55-0 Could not open crypto cache file. /var/lib/bareos/bareos-sd.9103.cryptoc ERR=No such file or directory
bextract (100): lib/jcr.cc:185-0 Construct JobControlRecord
bextract: stored/butil.cc:327-0 Using device: "/stg/backup" for reading.
bextract (100): lib/implementation_factory.h:63-0 Creating Instance for 'dedupable'
bextract (100): stored/dev.cc:325-0 FactoryCreateDevice: tape=0 archive_device_string=/stg/backup
bextract (100): stored/dev.cc:328-0 dev=/stg/backup dev_max_bs=1048576 max_bs=1048576
bextract (100): stored/block.cc:140-0 created new block of blocksize 1048576 (dev->max_block_size)
bextract (200): stored/acquire.cc:736-0 Attach Jid=0 dcr=0x563f51ff27a0 size=0 dev="$b247360d-c13b-4d6b-a8be-334192d78fc6" (/stg/backup)
bextract (150): stored/vol_mgr.cc:174-0 add_read_vol=vol-1 JobId=0
bextract (100): stored/butil.cc:219-0 Acquire device for read
bextract (100): stored/acquire.cc:106-0 dcr=0x563f51ff27a0 dev=0x563f51ff4570
bextract (100): stored/acquire.cc:107-0 MediaType dcr= dev=Dedup
bextract (100): stored/acquire.cc:137-0 Want Vol=vol-1 Slot=0
bextract (100): stored/acquire.cc:149-0 MediaType dcr= dev=Dedup
bextract (100): stored/acquire.cc:214-0 MediaType dcr= dev=Dedup
bextract (100): stored/acquire.cc:232-0 DirGetVolumeInfo vol=vol-1
bextract (100): stored/askdir.cc:712-0 Fake DirGetVolumeInfo
bextract (100): stored/mount.cc:608-0 No swap_dev set
bextract (100): stored/mount.cc:562-0 Must load "$b247360d-c13b-4d6b-a8be-334192d78fc6" (/stg/backup)
bextract (100): stored/autochanger.cc:125-0 Device "$b247360d-c13b-4d6b-a8be-334192d78fc6" (/stg/backup) is not attached to an autochanger
bextract (100): stored/acquire.cc:266-0 stored: open vol=vol-1
bextract (100): stored/dev.cc:538-0 open dev: type=dedupable archive_device_string="$b247360d-c13b-4d6b-a8be-334192d78fc6" (/stg/backup) vol=vol-1 mode=OPEN_READ_ONLY
bextract (100): stored/dev.cc:556-0 call OpenDevice mode=OPEN_READ_ONLY
Segmentation fault (core dumped)
---------------------------------------Thank you for your response.
It seems that my previous test records caused some confusion.
I installed the community distribution from:
https://download.bareos.org/current/EL_8/
Version: 25.0.3
OS: Rocky Linux 8.10
All observations below are based on the same version.
I also tested using the method you suggested (su bareos -c "..."), but it did not work.
The segmentation fault occurs only on version 25.0.3 under the same configuration, and according to the logs, it fails to open the device.
Based on this, I suspect that the Bareos-sd backend may have changed after the version upgrade, and that Bextract might no longer be compatible with it.
Additionally, it seems that the issue may also be related to the Bareos-sd media type (file/dedupe).
Are there any alternative approaches?
Or would it be better to build and test from the current master branch on GitHub?
Any suggestions would be greatly appreciated.