Hello,

It looks like Bacula is attempting to do a double
free or has the malloc'ed buffer chain messed up.

The first thing I would do is turn of acl and xattr support in
your FileSet as this is where the problem seems to lie.

If this fixes your problem, please submit a bug report.

The second thing I would do is not put any of the following options:

-D_FORTIFY_SOURCE=2
-fexceptions -fstack-protector --param=ssp-buffer-size=4

on the compile.

I have never tried the stack protector options, and if it is written
anything like the fortify source code, it may cause Bacula to blow up,
because at least for the case of fortify source, they do not
properly (possibly cannot) detect "unusual" uses of certain features
of C that we use in Bacula.

Bacula has its own stack protection code, which seems to be triggering
here.  This code has been functional for
many years, and so in general things such as fortify source and stack
protection (other than what the OS provides for marking code read-only)
are redundant and only consume extra resources.

If turning off acl/xattr support and the above options (rather removing
them from the compile line) does not resolve the problem, your best bet is to 
submit
a bug report, and include your bacula-dir.conf file and in particular
the FileSet.

Regards,
Kern



On 05/23/2012 08:42 AM, Simone Caronni wrote:
> Hello,
>
> bacula-fd is crashing any time a backup is performed in Fedora 17.
>
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 0x7ffff13a0700 (LWP 15539)]
> sm_free (file=0x4277c8 "xattr.c", line=1323, fp=0x5555555555555555) at
> smartall.c:192
> 192      if (!head->abin_use) {
>
> (gdb) bt
> #0  sm_free (file=0x4277c8 "xattr.c", line=1323,
> fp=0x5555555555555555) at smartall.c:192
> #1  0x0000000000420a44 in generic_xattr_build_streams
> (jcr=0x7fffec0008e8, ff_pkt=<optimized out>) at xattr.c:1323
> #2  0x000000000040dc0b in save_file (jcr=0x7fffec0008e8,
> ff_pkt=0x7fffec0a62f8, top_level=<optimized out>) at backup.c:732
> #3  0x0000003ec5c0655f in find_one_file (jcr=jcr@entry=0x7fffec0008e8,
> ff_pkt=ff_pkt@entry=0x7fffec001278, handle_file=handle_file@entry=
>      0x3ec5c03c90<our_callback(JCR*, FF_PKT*, bool)>,
> fname=fname@entry=0x7fffec003448 "/home/fisia/.config/dconf",
> parent_device=140737153268920,
>      parent_device@entry=18, top_level=top_level@entry=false) at 
> find_one.c:780
> #4  0x0000003ec5c064dd in find_one_file (jcr=jcr@entry=0x7fffec0008e8,
> ff_pkt=ff_pkt@entry=0x7fffec001278, handle_file=handle_file@entry=
>      0x3ec5c03c90<our_callback(JCR*, FF_PKT*, bool)>,
> fname=fname@entry=0x7fffec003658 "/home/fisia/.config",
> parent_device=140737153489224, parent_device@entry=18,
>      top_level=top_level@entry=false) at find_one.c:763
> #5  0x0000003ec5c064dd in find_one_file (jcr=jcr@entry=0x7fffec0008e8,
> ff_pkt=ff_pkt@entry=0x7fffec001278, handle_file=handle_file@entry=
>      0x3ec5c03c90<our_callback(JCR*, FF_PKT*, bool)>,
> fname=fname@entry=0x7fffec003928 "/home/fisia",
> parent_device=140737153378264, parent_device@entry=18,
>      top_level=top_level@entry=false) at find_one.c:763
> #6  0x0000003ec5c064dd in find_one_file (jcr=0x7fffec0008e8,
> ff_pkt=0x7fffec001278, handle_file=0x3ec5c03c90<our_callback(JCR*,
> FF_PKT*, bool)>, fname=
>      0x7fffec002028 "/home", parent_device=140737153342968,
> top_level=<optimized out>) at find_one.c:763
> #7  0x0000003ec5c042fc in find_files (jcr=<optimized out>,
> ff=0x7fffec001278, file_save=<optimized out>, plugin_save=0x410420
> <plugin_save(JCR*, FF_PKT*, bool)>)
>      at find.c:217
> #8  0x000000000040b46e in blast_data_to_storage_daemon
> (jcr=0x7fffec0008e8, addr=<optimized out>) at backup.c:188
> #9  0x0000000000415bd3 in backup_cmd (jcr=0x7fffec0008e8) at job.c:1937
> #10 0x0000000000417934 in handle_client_request (dirp=0x853948) at job.c:289
> #11 0x0000003ec443ff7b in workq_server (arg=0x62ce20) at workq.c:346
> #12 0x0000003ec2c07d14 in start_thread (arg=0x7ffff13a0700) at
> pthread_create.c:309
> #13 0x0000003ec28f194d in clone () at
> ../sysdeps/unix/sysv/linux/x86_64/clone.S:115
>
> Various backtraces show it crashes on different files. The daemon is
> compiled with the following:
>
> Configuration on Fri Mar 16 13:40:44 UTC 2012:
>
>     Host:                  x86_64-redhat-linux-gnu -- redhat Miracle)
>     Bacula version:        Bacula 5.2.6 (21 February 2012)
>     Source code location:     .
>     Install binaries:      /usr/sbin
>     Install libraries:             /usr/lib64
>     Install config files:     /etc/bacula
>     Scripts directory:             /usr/libexec/bacula
>     Archive directory:             /tmp
>     Working directory:             /var/spool/bacula
>     PID directory:         /var/run
>     Subsys directory:      /var/lock/subsys
>     Man directory:         /usr/share/man
>     Data directory:        /usr/share
>     Plugin directory:      /usr/lib64/bacula
>     C Compiler:                    gcc 4.7.0
>     C++ Compiler:          /usr/bin/g++ 4.7.0
>     Compiler flags:         -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2
> -fexceptions -fstack-protector --param=ssp-buffer-size=4  -m64
> -mtune=generic -I/usr/include/ncurses -fno-strict-aliasing
> -fno-exceptions -fno-rtti
>     Linker flags:           -Wl,-z,relro
>     Libraries:                     -lpthread -ldl
>     Statically Linked Tools:  no
>     Statically Linked FD:     no
>     Statically Linked SD:     no
>     Statically Linked DIR:    no
>     Statically Linked CONS:   no
>     Database backends:             PostgreSQL MySQL SQLite3
>     Database port:    
>     Database name:         bacula
>     Database user:         bacula
>
>     Job Output Email:      root@localhost
>     Traceback Email:       root@localhost
>     SMTP Host Address:             localhost
>
>     Director Port:         9101
>     File daemon Port:      9102
>     Storage daemon Port:      9103
>
>     Director User:         bacula
>     Director Group:        bacula
>     Storage Daemon User:      bacula
>     Storage DaemonGroup:      disk
>     File Daemon User:      root
>     File Daemon Group:             root
>
>     Large file support:            yes
>     Bacula conio support:     no -lreadline -ltinfo
>     readline support:      yes
>     TCP Wrappers support:     yes -lwrap
>     TLS support:           yes
>     Encryption support:            yes
>     ZLIB support:          yes
>     LZO support:           yes
>     enable-smartalloc:             yes
>     enable-lockmgr:        no
>     bat support:           yes
>     enable-gnome:          no
>     enable-bwx-console:            no
>     enable-tray-monitor:      no
>     client-only:           no
>     build-dird:                    yes
>     build-stored:          yes
>     Plugin support:        yes
>     ACL support:           yes
>     XATTR support:         yes
>     Python support:        yes -lpthread -ldl -lutil -lm -lpython2.7 -lutil 
> -lrt
>     systemd support:       no
>     Batch insert enabled:     PostgreSQL MySQL SQLite3
>
> Any idea on what could cause the issue?
>
> Thanks,
> --Simone
>
>
>
>
>
>


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Bacula-devel mailing list
Bacula-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-devel

Reply via email to