bareos-dir, Segmentation violation

118 views
Skip to first unread message

bareos-user

unread,
May 27, 2019, 8:46:21 AM5/27/19
to bareos-users
Hello.
I'm trying to test bareos-18.2.6 on ArchLinux.
And I have two questions:
1. When I try to run bareos-dir with the -d option (for example -d
2000), bareos-dir fails with the error:
----
[root@a10 ~]# systemctl status bareos-dir
* bareos-dir.service - Bareos Director Daemon service
Loaded: loaded (/etc/systemd/system/bareos-dir.service; enabled;
vendor preset: disabled)
Active: active (running) since Mon 2019-05-27 15:32:33 +05; 7s ago
Docs: man:bareos-dir(8)
Process: 933 ExecStartPre=/usr/bin/bareos-dir -t -f (code=exited,
status=0/SUCCESS)
Process: 934 ExecStart=/usr/bin/bareos-dir -d 2000 (code=exited,
status=0/SUCCESS)
Main PID: 935 (bareos-dir)
Tasks: 5 (limit: 2133)
Memory: 20.1M
CGroup: /system.slice/bareos-dir.service
|-935 /usr/bin/bareos-dir -d 2000
|-938 /bin/sh /usr/bin/btraceback /usr/bin/bareos-dir 935
/var/lib/bareos
`-952 /usr/bin/gdb -quiet -batch -x
/usr/lib/bareos/scripts/btraceback.gdb /usr/bin/bareos-dir
/var/lib/bareos/bareos-dir.core.935
May 27 15:32:33 a10.domain.tld bareos-dir[934]: BAREOS interrupted by
signal 11: Segmentation violation
May 27 15:32:33 a10.domain.tld bareos-dir[934]: bareos-dir, a10-director
got signal 11 - Segmentation violation. Attempting traceback.
May 27 15:32:33 a10.domain.tld bareos-dir[934]: exepath=/usr/bin/
May 27 15:32:33 a10.domain.tld bareos-dir[934]: a10-director (300):
lib/signal.cc:207-0 Working=/var/lib/bareos
May 27 15:32:33 a10.domain.tld bareos-dir[934]: a10-director (300):
lib/signal.cc:208-0 btpath=/usr/bin/btraceback
May 27 15:32:33 a10.domain.tld bareos-dir[934]: a10-director (300):
lib/signal.cc:209-0 exepath=/usr/bin/bareos-dir
May 27 15:32:33 a10.domain.tld bareos-dir[934]: a10-director (500):
lib/signal.cc:240-0 Doing waitpid
May 27 15:32:33 a10.domain.tld bareos-dir[934]: a10-director (800):
lib/watchdog.cc:255-0 NicB-reworked watchdog thread entered
May 27 15:32:33 a10.domain.tld bareos-dir[935]: BAREOS interrupted by
signal 11: Segmentation violation
May 27 15:32:33 a10.domain.tld bareos-dir[934]: Calling:
/usr/bin/btraceback /usr/bin/bareos-dir 935 /var/lib/bareos
----
Has anyone tried running bareos-dir with the -d option and for it to work?

2. In the event of an abnormal shutdown, the bareos-dir starts the
wrapper for the gdb debugger, and the file
/usr/lib/bareos/scripts/btraceback.gdb with the gdb commands is included
(ie: print my_name, print exename, ..). In my case, gdb cannot execute a
series of commands:
-----
[root@a10 ~]# cat /var/lib/bareos/bareos.935.traceback
Created /var/lib/bareos/bareos-dir.core.935 for doing postmortem debugging
[New LWP 935]
[New LWP 936]
[New LWP 937]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Core was generated by `/usr/bin/bareos-dir'.
#0 0xb6c5b32c in waitpid () from /usr/lib/libpthread.so.0
[Current thread is 1 (Thread 0xb6fafd40 (LWP 935))]
/usr/lib/bareos/scripts/btraceback.gdb:1: Error in sourced command file:
'my_name' has unknown type; cast it to its declared type
-----
and I would like to understand: is this my particular case like this or
is it all so?

Thank you.

Frank Ueberschar

unread,
May 27, 2019, 9:15:19 AM5/27/19
to bareos...@googlegroups.com
Could you try running the director in the foreground with 'bareos-dir -f
-d 1000' or 'bareos-dir -f -d 2000'.

.. frank

Am 27.05.19 um 14:43 schrieb bareos-user:

bareos-user

unread,
May 28, 2019, 2:47:52 AM5/28/19
to bareos...@googlegroups.com
> Could you try running the director in the foreground with 'bareos-dir -f
> -d 1000' or 'bareos-dir -f -d 2000'.

Thank you for your attention and your response.
I started the bareos-dir in foreground mode (/usr/bin/bareos-dir -d 2000
-f), I added the startup log to the attachment. The log is large enough,
and I pre-compressed it with a gzip compressor. I would be very grateful
if you find the opportunity to look into it. The error record is in the
last 10 lines, I will give them here:
---
a10-director (900): lib/signal.cc:137-0 sig=11 Segmentation violation
a10-director (300): lib/signal.cc:207-0 Working=/var/lib/bareos
a10-director (300): lib/signal.cc:208-0 btpath=/usr/bin/btraceback
a10-director (300): lib/signal.cc:209-0 exepath=/usr/bin/bareos-dir
a10-director (500): lib/signal.cc:240-0 Doing waitpid
a10-director (800): lib/watchdog.cc:255-0 NicB-reworked watchdog thread
entered
... skipped ..
---

I also tried to run bareos-dir in the gdb debugger (my bareos build is
done with debug info) like this:
$ gdb / usr / bin / bareos-dir -d 2000 -f
and I got some information about the location of the error:
---------
(gdb) run
Starting program: /usr/bin/bareos-dir
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Program received signal SIGILL, Illegal instruction.
0xb6cff4a8 in ?? () from /usr/lib/libcrypto.so.1.1
(gdb) bt
#0 0xb6cff4a8 in ?? () from /usr/lib/libcrypto.so.1.1
#1 0xb6cf918c in ?? () from /usr/lib/libcrypto.so.1.1
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb) quit
---------

It is not clear for me how to unwind the stack, I do not have enough
knowledge. If you tell me, then I can try to rebuild bareos or openssl,
for example, with debug information.

Thank you.
dir.debug.txt.gz

Frank Ueberschar

unread,
May 28, 2019, 5:51:51 AM5/28/19
to bareos...@googlegroups.com
It looks as if you screwed up your build with incompatible libraries.

Building bareos from scratch on a not yet supported platform may be
tricky even for experiences developers. However, there is a dedicated
mailing list for developers.

Please switch over to the developer mailing list:
bareos...@googlegroups.com.

You may want to explain more detailed about your build environment and
the way you built bareos for ArchLinux.


Am 28.05.19 um 08:47 schrieb bareos-user:
--
Mit freundlichen Grüßen

Frank Ueberschar frank.ue...@bareos.com
Bareos GmbH & Co. KG Phone: +49 221 63 06 93-88
http://www.bareos.com Fax: +49 221 63 06 93-10

Sitz der Gesellschaft: Köln | Amtsgericht Köln: HRA 29646
Geschäftsführer: Stephan Dühr, M. Außendorf, J. Steffens, P. Storz

Reply all
Reply to author
Forward
0 new messages