View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000544 | bareos-core | director | public | 2015-10-26 11:17 | 2019-12-18 15:25 |
Reporter | renato.ramonda | Assigned To | |||
Priority | high | Severity | crash | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | Linux | OS | RHEL | OS Version | 7 |
Fixed in Version | 15.2.1 | ||||
Summary | 0000544: Director crash (SIGSEGV 11) when migrating an empty job in version 15.2.1 | ||||
Description | Using migration jobs from SD to SD, the Director crashes with segmentation violation (and no other output, even in the logs) after trying to migrate an empty job. | ||||
Steps To Reproduce | 1 - Set up a test env with two SD (SD-source, SD-dest) and a migration job 2 - Back up a client to SD-Source (with only /etc in the FileSet) 3 - Back it up again: the Job should have 0 bytes in it 4 - Mark the source volume as Used or Full 5 - Run the migration job What happens: The director prints out the migration plan (found jobs, and so on), then crashes (bconsole exits). Diagnosis: We noticed the first job in the set had zero bytes, so we tried deleting it (bconsole: delete jobid=XXX) and running the migration job again. Effect: now migration works. Attached you can find the bactrace of the crash, if needed. | ||||
Additional Information | This is the bit of bareos.log that set us on the right path: during creation of sub-jobs in the Migration we saw this. 26-Oct 10:08 nm01-mgmt-dir JobId 650: Job queued. JobId=660 26-Oct 10:08 nm01-mgmt-dir JobId 650: Migration JobId 660 started. 26-Oct 10:08 nm01-mgmt-dir JobId 650: Using Catalog "MyCatalog" 26-Oct 10:08 nm01-mgmt-dir JobId 664: Migration using JobId=376 Job=Backup_h01-hrd_files.2015-10-22_23.05.00_10 26-Oct 10:08 nm01-mgmt-dir JobId 664: No files found to read. No bootstrap file written. 26-Oct 10:08 nm01-mgmt-dir JobId 664: Previous Job has no data to migrate. (not the "no files found to read") ======================================================================= The migration job is defined like this: Job { Name = "h08-mrd-migrate-mrd2lrd" Type = Migrate Pool = h08-mrd-staging-pool0 Client = None FileSet = None Schedule = "WeeklyCycle-AfterBackup" Maximum Concurrent Jobs = 4 Selection Type = Volume Selection Pattern = "StagingFile.*" Purge Migration Job = yes Messages = Standard } # # Fake fileset and client for migration jobs # Fileset { Name = None Include { Options { signature = MD5 } } } Client { Name = None Address = localhost Password = "NoNe" Catalog = MyCatalog } | ||||
Tags | No tags attached. | ||||
child of | 0000554 | closed | Release bareos-15.2.2 |
bareos: bareos-15.2 f8987a8c 2015-10-26 19:51 Ported: N/A Details Diff |
Fix Director crash when migrating an empty job When there is nothing to do for a Migration or Copy the migration_init() function sets the Job exit code already to JS_Terminated. This patch checks after the migration_init() if the Job Status is alread JS_Terminated and then call migration_cleanup() directly. I also added an explicit check in do_actual_migration() that we have a mig_jcr setup as the rest of the code expect this to be set and for any Migration or Copy Job that needs to do some actual work this must also be set so the extra check is mostly to make sure it is. The printing of the New JobId is also fixed to show *None* instead of <NULL>. Fixes 0000544: Director crash (SIGSEGV 11) when migrating an empty job |
Affected Issues 0000544 |
|
mod - src/dird/job.c | Diff File | ||
mod - src/dird/migrate.c | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2015-10-26 11:17 | renato.ramonda | New Issue | |
2015-10-26 11:17 | renato.ramonda | File Added: nm01-mgmt-dir.27327.bactrace | |
2015-10-26 11:17 | renato.ramonda | File Added: bareos.27327.traceback | |
2015-10-26 11:17 | renato.ramonda | Note Added: 0001891 | |
2015-10-26 17:40 | mvwieringen | Assigned To | => mvwieringen |
2015-10-26 17:40 | mvwieringen | Status | new => assigned |
2015-10-30 18:59 | mvwieringen | Changeset attached | => bareos bareos-15.2 f8987a8c |
2015-10-30 19:01 | mvwieringen | Assigned To | mvwieringen => |
2015-10-30 19:01 | mvwieringen | Status | assigned => resolved |
2015-10-30 19:01 | mvwieringen | Resolution | open => fixed |
2015-10-30 19:01 | mvwieringen | Fixed in Version | => 15.2.1 |
2015-11-06 18:31 | maik | Relationship added | child of 0000554 |
2019-12-18 15:25 | arogge | Status | resolved => closed |