View Issue Details

IDProjectCategoryView StatusLast Update
0000293bareos-core[All Projects] directorpublic2015-03-25 19:18
ReporterstephandAssigned To 
PrioritynormalSeveritycrashReproducibilityalways
Status closedResolutionfixed 
PlatformLinuxOSCentOSOS Version6
Product Version12.4.6 
Target Version12.4.7Fixed in Version12.4.7 
Summary0000293: director segfaults doing update slots when all slots are empty
DescriptionWhen all autochanger slots are empty then update slots in bconsole makes bareos-dir segfault.

Debug output ends with:
...
bareost02-dir: ua_select.c:1547-0 43
bareost02-dir: sd_cmds.c:106-0 bnet_connect to Storage daemon bareost02:9103
bareost02-dir: bsock.c:56-0 All source addresses
bareost02-dir: bsock_tcp.c:272-0 Current host[ipv4;192.168.122.51;9103] All host[ipv4;192.168.122.51;9103]
bareost02-dir: bsock_tcp.c:195-0 who=Storage daemon host=bareost02 port=9103
bareost02-dir: cram-md5.c:123-0 cram-get received: auth cram-md5 <2034018671.1399570503@bareost02-sd> ssl=0
bareost02-dir: cram-md5.c:143-0 sending resp to challenge: Tj+s36+sjipZQ4/3J+/qyB
bareost02-dir: cram-md5.c:75-0 send: auth cram-md5 <625449933.1399570503@bareost02-dir> ssl=0
bareost02-dir: cram-md5.c:94-0 Authenticate OK 37+Mb5+C5m/K1zkKjF/aZC
bareost02-dir: authenticate.c:164-0 >stored: 1000 OK auth
bareost02-dir: authenticate.c:171-0 <stored: 3000 OK Hello
BAREOS interrupted by signal 11: Segmentation violation
Kaboom! bareos-dir, bareost02-dir got signal 11 - Segmentation violation. Attempting traceback.
Kaboom! exepath=/usr/sbin/
Calling: /usr/sbin/btraceback /usr/sbin/bareos-dir 2177 /var/lib/bareos

This is reproducible with 12.4, 13.2 and nightly packages.
Steps To ReproduceUsing mhvtl, remove all labels from /etc/mhvtl/library_contents.10 and restart mhvtl, so that mtx shows all slots empty:
[root@bareost02 ~]# mtx -f /dev/sg9 status
  Storage Changer /dev/sg9:4 Drives, 43 Slots ( 4 Import/Export )
Data Transfer Element 0:Empty
Data Transfer Element 1:Empty
Data Transfer Element 2:Empty
Data Transfer Element 3:Empty
      Storage Element 1:Empty
      Storage Element 2:Empty
...

Then issue the command "update slots" in bconsole
Additional InformationWhen have at least one tape in a slot, debug output continues like this:

...
bareost02-dir: authenticate.c:163-0 >stored: 1000 OK auth
bareost02-dir: authenticate.c:170-0 <stored: 3000 OK Hello
bareost02-dir: ua_update.c:1030-0 max_slots=43
bareost02-dir: ua_select.c:1519-0 Slots turned on:
bareost02-dir: ua_select.c:1522-0 1
bareost02-dir: ua_select.c:1522-0 2
...

TagsNo tags attached.
bareos-master: impact
bareos-master: action
bareos-18.2: impact
bareos-18.2: action
bareos-17.2: impact
bareos-17.2: action
bareos-16.2: impact
bareos-16.2: action
bareos-15.2: impact
bareos-15.2: action
bareos-14.2: impact
bareos-14.2: action
bareos-13.2: impact
bareos-13.2: action
bareos-12.4: impact
bareos-12.4: action

Activities

stephand

stephand

2014-05-08 21:30

developer  

bareos-dir_debug200_output.txt (8,518 bytes)
-bash-4.1$ /usr/sbin/bareos-dir -f -d 200 -c /etc/bareos/bareos-dir.conf 
bareos-dir: dird.c:192-0 Debug level = 200
bareos-dir: inc_conf.c:351-0 set wildfile 785908 size=1 [A-Z]:/pagefile.sys
bareos-dir: inc_conf.c:351-0 set wilddir 785908 size=1 [A-Z]:/RECYCLER
bareos-dir: inc_conf.c:351-0 set wilddir 785908 size=2 [A-Z]:/$RECYCLE.BIN
bareos-dir: inc_conf.c:351-0 set wilddir 785908 size=3 [A-Z]:/System Volume Information
bareos-dir: runscript.c:334-0 runscript: debug
bareos-dir: runscript.c:335-0  --> RunScript
bareos-dir: runscript.c:336-0   --> Command=/usr/lib/bareos/scripts/make_catalog_backup.pl MyCatalog
bareos-dir: runscript.c:337-0   --> Target=
bareos-dir: runscript.c:338-0   --> RunOnSuccess=1
bareos-dir: runscript.c:339-0   --> RunOnFailure=0
bareos-dir: runscript.c:340-0   --> FailJobOnError=1
bareos-dir: runscript.c:341-0   --> RunWhen=2
bareos-dir: runscript.c:334-0 runscript: debug
bareos-dir: runscript.c:335-0  --> RunScript
bareos-dir: runscript.c:336-0   --> Command=/usr/lib/bareos/scripts/delete_catalog_backup
bareos-dir: runscript.c:337-0   --> Target=
bareos-dir: runscript.c:338-0   --> RunOnSuccess=1
bareos-dir: runscript.c:339-0   --> RunOnFailure=0
bareos-dir: runscript.c:340-0   --> FailJobOnError=0
bareos-dir: runscript.c:341-0   --> RunWhen=1
bareos-dir: jcr.c:141-0 read_last_jobs seek to 192
bareos-dir: jcr.c:148-0 Read num_items=0
bareos-dir: dir_plugins.c:206-0 Load dir plugins
bareos-dir: dir_plugins.c:208-0 No dir plugin dir!
bareos-dir: cats_dynamic.c:55-0 db_init_database: Trying to find mapping of given interfacename postgresql to mapping interfacename dbi, partly_compare = true
bareos-dir: cats_dynamic.c:55-0 db_init_database: Trying to find mapping of given interfacename postgresql to mapping interfacename mysql, partly_compare = false
bareos-dir: cats_dynamic.c:55-0 db_init_database: Trying to find mapping of given interfacename postgresql to mapping interfacename postgresql, partly_compare = false
bareos-dir: postgresql.c:1173-0 db_init_database first time
bareos-dir: postgresql.c:231-0 pg_real_connect done
bareos-dir: postgresql.c:233-0 db_user=bareos db_name=bareos db_password=
bareos-dir: sql_create.c:361-0 In create mediatype
bareos-dir: sql_create.c:365-0 selectmediatype: SELECT MediaTypeId,MediaType FROM MediaType WHERE MediaType='File'
bareos-dir: sql_create.c:361-0 In create mediatype
bareos-dir: sql_create.c:365-0 selectmediatype: SELECT MediaTypeId,MediaType FROM MediaType WHERE MediaType='LTO-4'
bareost02-dir: dird.c:331-0 Start UA server
bareost02-dir: job.c:1655-0 wstorage=File
bareost02-dir: job.c:1664-0 wstore=File where=Job resource
bareost02-dir: job.c:1293-0 JobId=0 created Job=*JobMonitor*.2014-05-08_19.34.48_01
bareost02-dir: dird.c:346-0 wait for next job
bareost02-dir: scheduler.c:98-0 Enter wait_for_next_job
bareost02-dir: scheduler.c:305-0 enter find_runs()
bareost02-dir: scheduler.c:321-0 now = 536bc038: h=19 m=4 md=7 wd=4 wom=1 woy=19 yday=127
bareost02-dir: scheduler.c:341-0 nh = 536bce48: h=20 m=4 md=7 wd=4 wom=1 woy=19 yday=127

bareost02-dir: scheduler.c:356-0 Got job: BackupClient1
bareost02-dir: scheduler.c:401-0 run@7897c8: run_now=0 run_nh=0
bareost02-dir: scheduler.c:401-0 run@789908: run_now=0 run_nh=0
bareost02-dir: scheduler.c:401-0 run@789a48: run_now=0 run_nh=0
bareost02-dir: scheduler.c:356-0 Got job: BackupCatalog
bareost02-dir: scheduler.c:401-0 run@789b88: run_now=0 run_nh=0
bareost02-dir: scheduler.c:420-0 Leave find_runs()
bareost02-dir: bnet_server_tcp.c:166-0 Addresses host[ipv4;0.0.0.0;9101] 
bareost02-dir: job.c:1655-0 wstorage=File
bareost02-dir: job.c:1664-0 wstore=File where=Job resource
bareost02-dir: job.c:1293-0 JobId=0 created Job=-Console-.2014-05-08_19.34.55_02
bareost02-dir: cram-md5.c:68-0 send: auth cram-md5 <1422807825.1399570495@bareost02-dir> ssl=0
bareost02-dir: cram-md5.c:123-0 cram-get received: auth cram-md5 <666994116.1399570495@bconsole> ssl=0
bareost02-dir: cram-md5.c:143-0 sending resp to challenge: 79Qs///Dj4UOM8//A6+BgD
bareost02-dir: ua_cmds.c:2465-0 UA Open database
bareost02-dir: sql_pooling.c:58-0 db_sql_get_non_pooled_connection allocating 1 new non pooled database connection to database bareos, backend type postgresql
bareost02-dir: cats_dynamic.c:55-0 db_init_database: Trying to find mapping of given interfacename postgresql to mapping interfacename dbi, partly_compare = true
bareost02-dir: cats_dynamic.c:55-0 db_init_database: Trying to find mapping of given interfacename postgresql to mapping interfacename mysql, partly_compare = false
bareost02-dir: cats_dynamic.c:55-0 db_init_database: Trying to find mapping of given interfacename postgresql to mapping interfacename postgresql, partly_compare = false
bareost02-dir: postgresql.c:1173-0 db_init_database first time
bareost02-dir: postgresql.c:231-0 pg_real_connect done
bareost02-dir: postgresql.c:233-0 db_user=bareos db_name=bareos db_password=
bareost02-dir: ua_cmds.c:2496-0 DB bareos opened
bareost02-dir: job.c:1688-0 wstore=mhVTLc1 where=command line
bareost02-dir: sd_cmds.c:106-0 bnet_connect to Storage daemon bareost02:9103
bareost02-dir: bsock.c:56-0 All source addresses 
bareost02-dir: bsock_tcp.c:272-0 Current host[ipv4;192.168.122.51;9103]  All host[ipv4;192.168.122.51;9103] 
bareost02-dir: bsock_tcp.c:195-0 who=Storage daemon host=bareost02 port=9103
bareost02-dir: cram-md5.c:123-0 cram-get received: auth cram-md5 <1834271003.1399570502@bareost02-sd> ssl=0
bareost02-dir: cram-md5.c:143-0 sending resp to challenge: U7/EKWkb4A5Sr+0PMQ/imC
bareost02-dir: cram-md5.c:75-0 send: auth cram-md5 <506097873.1399570502@bareost02-dir> ssl=0
bareost02-dir: cram-md5.c:94-0 Authenticate OK s+/CNnpAS0sIUxsYD/pOwA
bareost02-dir: authenticate.c:164-0 >stored: 1000 OK auth
bareost02-dir: authenticate.c:171-0 <stored: 3000 OK Hello
bareost02-dir: ua_update.c:1030-0 max_slots=43
bareost02-dir: ua_select.c:1544-0 Slots turned on:
bareost02-dir: ua_select.c:1547-0 1
bareost02-dir: ua_select.c:1547-0 2
bareost02-dir: ua_select.c:1547-0 3
bareost02-dir: ua_select.c:1547-0 4
bareost02-dir: ua_select.c:1547-0 5
bareost02-dir: ua_select.c:1547-0 6
bareost02-dir: ua_select.c:1547-0 7
bareost02-dir: ua_select.c:1547-0 8
bareost02-dir: ua_select.c:1547-0 9
bareost02-dir: ua_select.c:1547-0 10
bareost02-dir: ua_select.c:1547-0 11
bareost02-dir: ua_select.c:1547-0 12
bareost02-dir: ua_select.c:1547-0 13
bareost02-dir: ua_select.c:1547-0 14
bareost02-dir: ua_select.c:1547-0 15
bareost02-dir: ua_select.c:1547-0 16
bareost02-dir: ua_select.c:1547-0 17
bareost02-dir: ua_select.c:1547-0 18
bareost02-dir: ua_select.c:1547-0 19
bareost02-dir: ua_select.c:1547-0 20
bareost02-dir: ua_select.c:1547-0 21
bareost02-dir: ua_select.c:1547-0 22
bareost02-dir: ua_select.c:1547-0 23
bareost02-dir: ua_select.c:1547-0 24
bareost02-dir: ua_select.c:1547-0 25
bareost02-dir: ua_select.c:1547-0 26
bareost02-dir: ua_select.c:1547-0 27
bareost02-dir: ua_select.c:1547-0 28
bareost02-dir: ua_select.c:1547-0 29
bareost02-dir: ua_select.c:1547-0 30
bareost02-dir: ua_select.c:1547-0 31
bareost02-dir: ua_select.c:1547-0 32
bareost02-dir: ua_select.c:1547-0 33
bareost02-dir: ua_select.c:1547-0 34
bareost02-dir: ua_select.c:1547-0 35
bareost02-dir: ua_select.c:1547-0 36
bareost02-dir: ua_select.c:1547-0 37
bareost02-dir: ua_select.c:1547-0 38
bareost02-dir: ua_select.c:1547-0 39
bareost02-dir: ua_select.c:1547-0 40
bareost02-dir: ua_select.c:1547-0 41
bareost02-dir: ua_select.c:1547-0 42
bareost02-dir: ua_select.c:1547-0 43
bareost02-dir: sd_cmds.c:106-0 bnet_connect to Storage daemon bareost02:9103
bareost02-dir: bsock.c:56-0 All source addresses 
bareost02-dir: bsock_tcp.c:272-0 Current host[ipv4;192.168.122.51;9103]  All host[ipv4;192.168.122.51;9103] 
bareost02-dir: bsock_tcp.c:195-0 who=Storage daemon host=bareost02 port=9103
bareost02-dir: cram-md5.c:123-0 cram-get received: auth cram-md5 <2034018671.1399570503@bareost02-sd> ssl=0
bareost02-dir: cram-md5.c:143-0 sending resp to challenge: Tj+s36+sjipZQ4/3J+/qyB
bareost02-dir: cram-md5.c:75-0 send: auth cram-md5 <625449933.1399570503@bareost02-dir> ssl=0
bareost02-dir: cram-md5.c:94-0 Authenticate OK 37+Mb5+C5m/K1zkKjF/aZC
bareost02-dir: authenticate.c:164-0 >stored: 1000 OK auth
bareost02-dir: authenticate.c:171-0 <stored: 3000 OK Hello
BAREOS interrupted by signal 11: Segmentation violation
Kaboom! bareos-dir, bareost02-dir got signal 11 - Segmentation violation. Attempting traceback.
Kaboom! exepath=/usr/sbin/
Calling: /usr/sbin/btraceback /usr/sbin/bareos-dir 2177 /var/lib/bareos
stephand

stephand

2014-05-08 21:33

developer  

bareos.2177.traceback (5,230 bytes)
mvwieringen

mvwieringen

2014-05-08 22:10

developer   ~0000850

Fix committed to bareos master branch with changesetid 1748.
mvwieringen

mvwieringen

2014-05-08 23:41

developer   ~0000851

Fix committed to bareos bareos-13.2 branch with changesetid 1749.
mvwieringen

mvwieringen

2014-05-09 01:41

developer   ~0000852

Fix committed to bareos bareos-12.4 branch with changesetid 1750.
mvwieringen

mvwieringen

2015-03-25 16:51

developer   ~0001351

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

joergs

2015-03-25 19:18

administrator   ~0001507

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 88c06b0a

2014-05-08 19:58:38

mvwieringen

Ported: N/A

Details Diff
Director segfaults doing update slots when all slots are empty

Fixes 0000293: Director segfaults doing update slots when all slots are empty
Affected Issues
0000293
mod - src/dird/ua_update.c Diff File

bareos: bareos-13.2 57111d72

2014-05-08 19:58:38

mvwieringen

Ported: N/A

Details Diff
Director segfaults doing update slots when all slots are empty

Fixes 0000293: Director segfaults doing update slots when all slots are empty
Affected Issues
0000293
mod - src/dird/ua_update.c Diff File

bareos: bareos-12.4 26f89b38

2014-05-08 19:58:38

mvwieringen

Ported: N/A

Details Diff
Director segfaults doing update slots when all slots are empty

Fixes 0000293: Director segfaults doing update slots when all slots are empty
Affected Issues
0000293
mod - src/dird/ua_update.c Diff File

bareos2015: bareos-12.4 dd3e2bf3

2014-05-08 21:58:38

mvwieringen

Ported: N/A

Details Diff
Director segfaults doing update slots when all slots are empty

Fixes 0000293: Director segfaults doing update slots when all slots are empty
Affected Issues
0000293
mod - src/dird/ua_update.c Diff File

bareos2015: bareos-13.2 9f537b22

2014-05-08 21:58:38

mvwieringen

Ported: N/A

Details Diff
Director segfaults doing update slots when all slots are empty

Fixes 0000293: Director segfaults doing update slots when all slots are empty
Affected Issues
0000293
mod - src/dird/ua_update.c Diff File

bareos2015: bareos-14.2 bc5681b1

2014-05-08 21:58:38

mvwieringen

Ported: N/A

Details Diff
Director segfaults doing update slots when all slots are empty

Fixes 0000293: Director segfaults doing update slots when all slots are empty
Affected Issues
0000293
mod - src/dird/ua_update.c Diff File

Issue History

Date Modified Username Field Change
2014-05-08 21:30 stephand New Issue
2014-05-08 21:30 stephand File Added: bareos-dir_debug200_output.txt
2014-05-08 21:32 stephand Severity minor => crash
2014-05-08 21:33 stephand File Added: bareos.2177.traceback
2014-05-08 22:10 mvwieringen Changeset attached => bareos master 88c06b0a
2014-05-08 22:10 mvwieringen Note Added: 0000850
2014-05-08 22:10 mvwieringen Assigned To => mvwieringen
2014-05-08 22:10 mvwieringen Status new => resolved
2014-05-08 22:10 mvwieringen Resolution open => fixed
2014-05-08 23:41 mvwieringen Changeset attached => bareos bareos-13.2 57111d72
2014-05-08 23:41 mvwieringen Note Added: 0000851
2014-05-09 01:41 mvwieringen Changeset attached => bareos bareos-12.4 26f89b38
2014-05-09 01:41 mvwieringen Note Added: 0000852
2014-05-16 16:59 mvwieringen adm Assigned To mvwieringen =>
2014-05-16 16:59 mvwieringen adm Status resolved => closed
2014-05-16 16:59 mvwieringen adm Product Version 14.2.0 => 12.4.5
2014-05-16 16:59 mvwieringen adm Fixed in Version => 12.4.6
2014-05-16 16:59 mvwieringen adm Target Version => 12.4.6
2014-05-16 17:00 mvwieringen adm Product Version 12.4.5 => 12.4.6
2014-05-16 17:00 mvwieringen adm Fixed in Version 12.4.6 => 12.4.7
2014-05-16 17:00 mvwieringen adm Target Version 12.4.6 => 12.4.7
2015-03-25 16:51 mvwieringen Changeset attached => bareos2015 bareos-12.4 dd3e2bf3
2015-03-25 16:51 mvwieringen Changeset attached => bareos2015 bareos-13.2 9f537b22
2015-03-25 16:51 mvwieringen Changeset attached => bareos2015 bareos-14.2 bc5681b1
2015-03-25 16:51 mvwieringen Note Added: 0001351
2015-03-25 16:51 mvwieringen Status closed => resolved
2015-03-25 19:18 joergs Note Added: 0001507
2015-03-25 19:18 joergs Status resolved => closed