View Issue Details

IDProjectCategoryView StatusLast Update
0000281bareos-corefile daemonpublic2015-03-25 19:19
Reportermaik Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version14.1.0 
Fixed in Version14.2.0 
Summary0000281: fd crashes when trying to execute a python plugin as option plugin
DescriptionWhile python command plugins work well, option plugins let the fd crash.

Config:
FileSet {
  Name = "Full Set"
  Include {
    Options {
        signature = MD5
        Plugin = "python:module_path=/usr/lib64/bareos/plugins:module_name=bareos-fd:filename=/tmp/datafile"
        }
    File = /root
   }
}
----
Output (fd running with -d 200):
puck-fd: fd_plugins.c:404-0 plugin cmd=python:module_path=/usr/lib64/bareos/plugins:module_name=bareos-fd:filename=/tmp/datafile
puck-fd: fd_plugins.c:502-0 plugin=bpipe-fd.so plen=5 cmd=python:module_path=/usr/lib64/bareos/plugins:module_name=bareos-fd:filename=/tmp/datafile len=6
puck-fd: fd_plugins.c:164-0 name=python:module_path=/usr/lib64/bareos/plugins:module_name=bareos-fd:filename=/tmp/datafile len=6 plugin=bpipe-fd.so plen=5
puck-fd: fd_plugins.c:502-0 plugin=python-fd.so plen=6 cmd=python:module_path=/usr/lib64/bareos/plugins:module_name=bareos-fd:filename=/tmp/datafile len=6
puck-fd: fd_plugins.c:164-0 name=python:module_path=/usr/lib64/bareos/plugins:module_name=bareos-fd:filename=/tmp/datafile len=6 plugin=python-fd.so plen=6
puck-fd: backup.c:646-0 Option plugin python:module_path=/usr/lib64/bareos/plugins:module_name=bareos-fd:filename=/tmp/datafile will be used to backup /root/.bconsole_history
puck-fd: fd_plugins.c:882-0 send_plugin_name=python:module_path=/usr/lib64/bareos/plugins:module_name=bareos-fd:filename=/tmp/datafile
puck-fd: fd_plugins.c:893-0 send plugin name hdr: 2 26 0
puck-fd: fd_plugins.c:913-0 send plugin start/end: 2 1 1 python:module_path=/usr/lib64/bareos/plugins:module_name=bareos-fd:filename=/tmp/datafile
puck-fd: backup.c:1479-0 No strip for /root/.bconsole_history
puck-fd: crypto.c:121-0 Send hdr fi=2 stream=22
puck-fd: crypto.c:129-0 Send data len=640
puck-fd: backup.c:723-0 type=3 do_read=1
puck-fd: bfile.c:1101-0 bopen: fname /root/.bconsole_history, flags 0, mode 0, rdev 0
puck-fd: fd_plugins.c:1402-0 plugin_bopen flags=0
BAREOS interrupted by signal 11: Segmentation violation
Kaboom! bareos-fd, puck-fd got signal 11 - Segmentation violation. Attempting traceback.
Kaboom! exepath=/usr/sbin/
Calling: /usr/sbin/btraceback /usr/sbin/bareos-fd 15911 /var/lib/bareos
It looks like the traceback worked...
Dumping: /var/lib/bareos/puck-fd.15911.bactrace

Steps To ReproduceSee config above, run job.
TagsNo tags attached.

Activities

mvwieringen

mvwieringen

2014-03-19 18:57

developer   ~0000835

Fix committed to bareos master branch with changesetid 1586.
mvwieringen

mvwieringen

2015-03-25 16:51

developer   ~0001475

Fix committed to bareos2015 bareos-14.2 branch with changesetid 4869.
joergs

joergs

2015-03-25 19:19

developer   ~0001623

Due to the reimport of the Github repository to bugs.bareos.org, the status of some tickets have been changed. These tickets will be closed again.
Sorry for the noise.

Related Changesets

bareos: master fea9537f

2014-03-19 18:44

mvwieringen

Ported: N/A

Details Diff
Implement generate_plugin_event bEventPluginCommand

Up until now the so called Options Plugin never did a
generate_plugin_event() for the bEventPluginCommand event when a Options
plugin was specified in the fileset. Now when we finished parsing the
fileset in the term_fileset() function we generate those events for each
plugin which is configured as a Options Plugin in the fileset.

Also added an extra check in the python plugin to check if the python
specific module is loaded before trying to access the dictionary in the
PluginIO() function so in the future we don't crash there anymore.

Fixes 0000281: fd crashes when trying to execute a python plugin as option plugin
Affected Issues
0000281
mod - src/filed/fileset.c Diff File
mod - src/plugins/filed/python-fd.c Diff File

bareos2015: bareos-14.2 6c9046ea

2014-03-19 19:44

mvwieringen

Ported: N/A

Details Diff
Implement generate_plugin_event bEventPluginCommand

Up until now the so called Options Plugin never did a
generate_plugin_event() for the bEventPluginCommand event when a Options
plugin was specified in the fileset. Now when we finished parsing the
fileset in the term_fileset() function we generate those events for each
plugin which is configured as a Options Plugin in the fileset.

Also added an extra check in the python plugin to check if the python
specific module is loaded before trying to access the dictionary in the
PluginIO() function so in the future we don't crash there anymore.

Fixes 0000281: fd crashes when trying to execute a python plugin as option plugin
Affected Issues
0000281
mod - src/filed/fileset.c Diff File
mod - src/plugins/filed/python-fd.c Diff File

Issue History

Date Modified Username Field Change
2014-02-21 21:07 maik New Issue
2014-03-19 16:56 mvwieringen Summary fd crushes when trying to execute a python plugin as option plugin => fd crashes when trying to execute a python plugin as option plugin
2014-03-19 18:57 mvwieringen Changeset attached => bareos master fea9537f
2014-03-19 18:57 mvwieringen Note Added: 0000835
2014-03-19 18:57 mvwieringen Assigned To => mvwieringen
2014-03-19 18:57 mvwieringen Status new => resolved
2014-03-19 18:57 mvwieringen Resolution open => fixed
2014-05-16 17:03 mvwieringen adm Assigned To mvwieringen =>
2014-05-16 17:03 mvwieringen adm Status resolved => closed
2014-05-16 17:03 mvwieringen adm Fixed in Version => 14.2.0
2015-03-25 16:51 mvwieringen Changeset attached => bareos2015 bareos-14.2 6c9046ea
2015-03-25 16:51 mvwieringen Note Added: 0001475
2015-03-25 16:51 mvwieringen Status closed => resolved
2015-03-25 19:19 joergs Note Added: 0001623
2015-03-25 19:19 joergs Status resolved => closed