Segmentation violation in Director

248 views
Skip to first unread message

desar...@opcode.cl

unread,
May 18, 2017, 12:25:05 AM5/18/17
to bareos-users
Hi all, I'm new to Bareos and want to start using it. Currently with a "hello world" example I have a segmentation violation in Director.

i) My environment is:

Director, Storage and File daemons:
KVM guest opensuse Leap 42.2, using Leap 42.1 repo (bareos 16.2.4-12.1)
Host is a openSUSE Leap 42.2, own "command" laptop

Database is other computer with openSUSE Leap 42.2, using one instance of MySQL, but for bareos I have a MySQL 5.6 in a fresh docker container using https://hub.docker.com/_/mysql/ and executed with:

docker run --name mysql56 \
-e MYSQL_ROOT_PASSWORD=mysql \
-e MYSQL_ONETIME_PASSWORD=yes \
-v /media/Data/docker_mysql56/databases:/var/lib/mysql \
-v /media/Data/docker_mysql56/conf.d:/etc/mysql/conf.d \
-d \
-p 3307:3306 \
mysql:5.6

after configuring root, created a 'bareos@%' pass:'bareos' to database:'bareos_test' access only

ii) Can't create db, already exists. I realize that creation scripts for mysql only create database, so skiped this step. Run table creation scripts and finish without errors. No scripts after this.

iii) As a single test, I followed tutorial from Bareos manual and works OK for "own command" laptop recovery and restore example. Both are openSUSE.

iv) Tryed to use it with a Windows File daemon (Windows 7), and I did this (connected to the Guest VM):
a) configured Director as
bareostest:/etc/bareos/bareos-dir.d # cat catalog/MyCatalog.conf
Catalog {
Name = MyCatalog
# Uncomment the following lines if you want the dbi driver
# dbdriver = "dbi:postgresql"; dbaddress = 127.0.0.1; dbport =
#dbdriver = "postgresql"
dbdriver = "mysql"
dbaddress = "192.168.1.10"
dbport = "3307"
dbname = "bareos_test"
dbuser = "bareos"
dbpassword = "bareos"
}

b) created files
bareostest:/etc/bareos/bareos-dir.d # cat fileset/Windows7-Usuarios.conf
FileSet {
Name = "Windows7-Usuarios"
Enable VSS = yes
Include {
Options {
Signature = MD5
Drive Type = fixed
IgnoreCase = yes
WildFile = "[A-Z]:/pagefile.sys"
WildDir = "[A-Z]:/RECYCLER"
WildDir = "[A-Z]:/$RECYCLE.BIN"
WildDir = "[A-Z]:/System Volume Information"
Exclude = yes
}
File = "C:/"
}
}

bareostest:/etc/bareos/bareos-dir.d # cat client/patriciodesktop-fd.conf
Client {
Name = patriciodesktop-fd
Description = "Windows 7 Desktop Patricio"
Address = 192.168.1.21
Password = "bareospatricio" # password for FileDaemon
}

bareostest:/etc/bareos/bareos-dir.d/job # cat patriciodesktop-fd.conf
Job {
Name = "Patricio Desktop"
File Set = "Windows7-Usuarios"
Client = "patriciodesktop-fd"
}

c) bareostest:/etc/bareos/bareos-dir.d/job # bconsole
Connecting to Director localhost:9101
1000 OK: bareos-dir Version: 16.2.4 (01 July 2016)
Enter a period to cancel a command.
*reload
bareostest:/etc/bareos/bareos-dir.d/job #

suddenly crash, logs say:

may 18 00:35:46 bareostest bareos-dir[3646]: BAREOS interrupted by signal 11: Segmentation violation

Everything is repeatable, because I've retryed creating docker mysql container again, VM Guest again, example from tutorial step by step, but can't find the way to know what I missing, or if is a bug.

Hope you can help me. Thanks in advance.
Patricio Mercado G.

Bruno Friedmann

unread,
May 18, 2017, 3:02:18 AM5/18/17
to bareos...@googlegroups.com
Known segfault for experimented users ;-)

You normally have a Description field or another one that is missing it's
ending quote.

You can try

/usr/sbin/bareos-dir -t -d 200 -u bareos -g bareos

to find the culprit.


--

Bruno Friedmann
Ioda-Net Sàrl www.ioda-net.ch
Bareos Partner, openSUSE Member, fsfe fellowship
GPG KEY : D5C9B751C4653227
irc: tigerfoot

openSUSE Tumbleweed
Linux 4.10.13-1-default x86_64 GNU/Linux, nvidia: 375.66
Qt: 5.7.1, KDE Frameworks: 5.33.0, Plasma: 5.9.5, kmail2 5.5.0

Stephan Duehr

unread,
May 19, 2017, 4:51:42 AM5/19/17
to bareos...@googlegroups.com
Also please install the package bareos-director-debuginfo and gdb:
zypper install bareos-director-debuginfo gdb
so when the segmentation fault happens, it will create a traceback
file in /var/lib/bareos

Regards,
--
Stephan Dühr stepha...@bareos.com
Bareos GmbH & Co. KG Phone: +49 221-630693-90
http://www.bareos.com

Sitz der Gesellschaft: Köln | Amtsgericht Köln: HRA 29646
Komplementär: Bareos Verwaltungs-GmbH
Geschäftsführer: S. Dühr, M. Außendorf, J. Steffens, Philipp Storz

desar...@opcode.cl

unread,
May 19, 2017, 12:44:28 PM5/19/17
to bareos...@googlegroups.com
Uhm, thanks for your reply, but don't get the point, *.conf files have "
char surrounding value. Even more, when creating a job inside bconsole,
file is made without ". Files that I've been written are
copy/paste/modify versions of current example files inside
fileset/job/clients folders.

Doing

/usr/sbin/bareos-dir -t -d 200 -u bareos -g bareos

only show

bareostest:/etc/bareos/bareos-dir.d # /usr/sbin/bareos-dir -t -d 200 -u
bareos -g bareos
bareos-dir (10): dird.c:243-0 Debug level = 200
bareos-dir (100): parse_conf.c:151-0 config file =
/etc/bareos/bareos-dir.d/*/*.conf
bareos-dir (100): lex.c:356-0 glob /etc/bareos/bareos-dir.d/*/*.conf: 25
files
bareos-dir (100): lex.c:250-0 open config file:
/etc/bareos/bareos-dir.d/catalog/MyCatalog.conf
bareos-dir (100): lex.c:250-0 open config file:
/etc/bareos/bareos-dir.d/client/bareos-fd.conf
bareos-dir (100): lex.c:250-0 open config file:
/etc/bareos/bareos-dir.d/client/patriciodesktop-fd.conf
bareos-dir (100): lex.c:250-0 open config file:
/etc/bareos/bareos-dir.d/console/bareos-mon.conf
bareos-dir (100): lex.c:250-0 open config file:
/etc/bareos/bareos-dir.d/director/bareos-dir.conf
bareos-dir (100): lex.c:250-0 open config file:
/etc/bareos/bareos-dir.d/fileset/Catalog.conf
bareos-dir (100): lex.c:250-0 open config file:
/etc/bareos/bareos-dir.d/fileset/LinuxAll.conf
bareos-dir (100): lex.c:250-0 open config file:
/etc/bareos/bareos-dir.d/fileset/SelfTest.conf
bareos-dir (100): lex.c:250-0 open config file:
/etc/bareos/bareos-dir.d/fileset/Windows7Usuarios.conf
bareos-dir (100): lex.c:250-0 open config file:
/etc/bareos/bareos-dir.d/fileset/Windows All Drives.conf
bareos-dir (100): lex.c:250-0 open config file:
/etc/bareos/bareos-dir.d/job/backup-bareos-fd.conf
bareos-dir (100): lex.c:250-0 open config file:
/etc/bareos/bareos-dir.d/job/BackupCatalog.conf
bareos-dir (100): lex.c:250-0 open config file:
/etc/bareos/bareos-dir.d/jobdefs/DefaultJob.conf
bareos-dir (100): lex.c:250-0 open config file:
/etc/bareos/bareos-dir.d/job/patriciodesktopjob.conf
bareos-dir (100): lex.c:250-0 open config file:
/etc/bareos/bareos-dir.d/job/RestoreFiles.conf
bareos-dir (100): lex.c:250-0 open config file:
/etc/bareos/bareos-dir.d/messages/Daemon.conf
bareos-dir (100): lex.c:250-0 open config file:
/etc/bareos/bareos-dir.d/messages/Standard.conf
bareos-dir (100): lex.c:250-0 open config file:
/etc/bareos/bareos-dir.d/pool/Differential.conf
bareos-dir (100): lex.c:250-0 open config file:
/etc/bareos/bareos-dir.d/pool/Full.conf
bareos-dir (100): lex.c:250-0 open config file:
/etc/bareos/bareos-dir.d/pool/Incremental.conf
bareos-dir (100): lex.c:250-0 open config file:
/etc/bareos/bareos-dir.d/pool/Scratch.conf
bareos-dir (100): lex.c:250-0 open config file:
/etc/bareos/bareos-dir.d/profile/operator.conf
bareos-dir (100): lex.c:250-0 open config file:
/etc/bareos/bareos-dir.d/schedule/WeeklyCycleAfterBackup.conf
bareos-dir (100): lex.c:250-0 open config file:
/etc/bareos/bareos-dir.d/schedule/WeeklyCycle.conf
bareos-dir (100): lex.c:250-0 open config file:
/etc/bareos/bareos-dir.d/storage/File.conf
bareos-dir (9): inc_conf.c:380-0 set wildfile 21e7d98 size=1
[A-Z]:/pagefile.sys
bareos-dir (9): inc_conf.c:380-0 set wilddir 21e7d98 size=1 [A-Z]:/RECYCLER
bareos-dir (9): inc_conf.c:380-0 set wilddir 21e7d98 size=2
[A-Z]:/$RECYCLE.BIN
bareos-dir (9): inc_conf.c:380-0 set wilddir 21e7d98 size=3
[A-Z]:/System Volume Information
bareos-dir (9): inc_conf.c:380-0 set wildfile 21e7498 size=1
[A-Z]:/pagefile.sys
bareos-dir (9): inc_conf.c:380-0 set wilddir 21e7498 size=1 [A-Z]:/RECYCLER
bareos-dir (9): inc_conf.c:380-0 set wilddir 21e7498 size=2
[A-Z]:/$RECYCLE.BIN
bareos-dir (9): inc_conf.c:380-0 set wilddir 21e7498 size=3
[A-Z]:/System Volume Information
bareos-dir (100): lex.c:356-0 glob /etc/bareos/bareos-dir.d/*/*.conf: 25
files
bareos-dir (100): lex.c:250-0 open config file:
/etc/bareos/bareos-dir.d/catalog/MyCatalog.conf
bareos-dir (100): lex.c:250-0 open config file:
/etc/bareos/bareos-dir.d/client/bareos-fd.conf
bareos-dir (100): lex.c:250-0 open config file:
/etc/bareos/bareos-dir.d/client/patriciodesktop-fd.conf
bareos-dir (100): lex.c:250-0 open config file:
/etc/bareos/bareos-dir.d/console/bareos-mon.conf
bareos-dir (100): lex.c:250-0 open config file:
/etc/bareos/bareos-dir.d/director/bareos-dir.conf
bareos-dir (100): lex.c:250-0 open config file:
/etc/bareos/bareos-dir.d/fileset/Catalog.conf
bareos-dir (100): lex.c:250-0 open config file:
/etc/bareos/bareos-dir.d/fileset/LinuxAll.conf
bareos-dir (100): lex.c:250-0 open config file:
/etc/bareos/bareos-dir.d/fileset/SelfTest.conf
bareos-dir (100): lex.c:250-0 open config file:
/etc/bareos/bareos-dir.d/fileset/Windows7Usuarios.conf
bareos-dir (100): lex.c:250-0 open config file:
/etc/bareos/bareos-dir.d/fileset/Windows All Drives.conf
bareos-dir (100): lex.c:250-0 open config file:
/etc/bareos/bareos-dir.d/job/backup-bareos-fd.conf
bareos-dir (100): lex.c:250-0 open config file:
/etc/bareos/bareos-dir.d/job/BackupCatalog.conf
bareos-dir (100): lex.c:250-0 open config file:
/etc/bareos/bareos-dir.d/jobdefs/DefaultJob.conf
bareos-dir (100): lex.c:250-0 open config file:
/etc/bareos/bareos-dir.d/job/patriciodesktopjob.conf
bareos-dir (100): lex.c:250-0 open config file:
/etc/bareos/bareos-dir.d/job/RestoreFiles.conf
bareos-dir (100): lex.c:250-0 open config file:
/etc/bareos/bareos-dir.d/messages/Daemon.conf
bareos-dir (100): lex.c:250-0 open config file:
/etc/bareos/bareos-dir.d/messages/Standard.conf
bareos-dir (100): lex.c:250-0 open config file:
/etc/bareos/bareos-dir.d/pool/Differential.conf
bareos-dir (100): lex.c:250-0 open config file:
/etc/bareos/bareos-dir.d/pool/Full.conf
bareos-dir (100): lex.c:250-0 open config file:
/etc/bareos/bareos-dir.d/pool/Incremental.conf
bareos-dir (100): lex.c:250-0 open config file:
/etc/bareos/bareos-dir.d/pool/Scratch.conf
bareos-dir (100): lex.c:250-0 open config file:
/etc/bareos/bareos-dir.d/profile/operator.conf
bareos-dir (100): lex.c:250-0 open config file:
/etc/bareos/bareos-dir.d/schedule/WeeklyCycleAfterBackup.conf
bareos-dir (100): lex.c:250-0 open config file:
/etc/bareos/bareos-dir.d/schedule/WeeklyCycle.conf
bareos-dir (100): lex.c:250-0 open config file:
/etc/bareos/bareos-dir.d/storage/File.conf
bareos-dir (200): runscript.c:334-0 runscript: debug
bareos-dir (200): runscript.c:335-0 --> RunScript
bareos-dir (200): runscript.c:336-0 -->
Command=/usr/lib/bareos/scripts/make_catalog_backup.pl MyCatalog
bareos-dir (200): runscript.c:337-0 --> Target=
bareos-dir (200): runscript.c:338-0 --> RunOnSuccess=1
bareos-dir (200): runscript.c:339-0 --> RunOnFailure=0
bareos-dir (200): runscript.c:340-0 --> FailJobOnError=1
bareos-dir (200): runscript.c:341-0 --> RunWhen=2
bareos-dir (200): runscript.c:334-0 runscript: debug
bareos-dir (200): runscript.c:335-0 --> RunScript
bareos-dir (200): runscript.c:336-0 -->
Command=/usr/lib/bareos/scripts/delete_catalog_backup
bareos-dir (200): runscript.c:337-0 --> Target=
bareos-dir (200): runscript.c:338-0 --> RunOnSuccess=1
bareos-dir (200): runscript.c:339-0 --> RunOnFailure=0
bareos-dir (200): runscript.c:340-0 --> FailJobOnError=0
bareos-dir (200): runscript.c:341-0 --> RunWhen=1
BAREOS interrupted by signal 11: Segmentation violation
Kaboom! bareos-dir, bareos-dir got signal 11 - Segmentation violation.
Attempting traceback.
Kaboom! exepath=/usr/sbin/
Calling: /usr/sbin/btraceback /usr/sbin/bareos-dir 1896 /var/lib/bareos
bsmtp: bsmtp.c:501-62 Failed to connect to mailhost localhost
The btraceback call returned 1
Dumping: /var/lib/bareos/bareos-dir.1896.bactrace

bareostest:/etc/bareos/bareos-dir.d # cat
/var/lib/bareos/bareos-dir.1896.bactrace
Attempt to dump locks
Attempt to dump current JCRs. njcrs=0
bareostest:/etc/bareos/bareos-dir.d #

and journalctl log say:

may 18 12:10:42 bareostest bareos-dir[1896]: BAREOS interrupted by
signal 11: Segmentation violation

What else should I try ?, thanks in advance.



El 18/05/17 a las 03:02, Bruno Friedmann escribió:

desar...@opcode.cl

unread,
May 19, 2017, 4:03:13 PM5/19/17
to bareos...@googlegroups.com
Hi, but issue is solved, I think, putting all key=values required. I
mean, file is:

Job {
Name = "Patricio Desktop"
File Set = "Windows7-Usuarios"
Client = "patriciodesktop-fd"
}

but for Job resource require Messages, Name, Pool and Type directives.
Examples from bareos installation works because JobDefs already define
those values, and examples jobs use JobDefs previously defined. But
customizing while learning I got that error.

Is possible to validate them and throw an exception/error
message/log/etc... instead of a crash? Seems tutorial
http://doc.bareos.org/master/html/bareos-manual-main-reference.html#x1-890006.8
for add a new client doesn't reflect this.


El 19/05/17 a las 04:51, Stephan Duehr escribió:
Reply all
Reply to author
Forward
0 new messages