View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000096 | bareos-core | storage daemon | public | 2013-02-25 18:23 | 2015-10-02 20:07 |
Reporter | Assigned To | ||||
Priority | normal | Severity | crash | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | Linux | OS | Ubuntu | OS Version | 12.10 |
Product Version | 12.4.2 | ||||
Fixed in Version | 12.4.2 | ||||
Summary | 0000096: btape crashes using multiple tape test when tape was written by a fill test before - segmentation violation Floating-point excep | ||||
Description | If you run the multiple tape test twice, you run into Floating-point exception error or segmentation violation and btape crashes | ||||
Steps To Reproduce | root@cardtech01:/etc/bareos# btape LTO Tape block granularity is 1024 bytes. btape: butil.c:287-0 Using device: "LTO" for writing. btape: btape.c:496-0 open device "LTO" (/dev/nst0): OK *test === Write, rewind, and re-read test === [...] The test autochanger worked!! * *fill Do you want to run the simplified test (s) with one tape or the complete multiple tape (m) test: (s/m) m Multiple tape test selected. 25-Feb 18:01 btape JobId 0: 3307 Issuing autochanger "unload slot 2, drive 0" command. 25-Feb 18:01 btape JobId 0: 3995 Bad autochanger "unload slot 2, drive 0": ERR=Child exited with code 1 Results=Storage Element 2 is Already Full btape: btape.c:3092-0 Autochanger returned: -1 Mount blank Volume on device "LTO" (/dev/nst0) and press return when ready: btape: btape.c:3097-0 Wrote Volume label for volume "TestVolume1". Wrote Start of Session label. 18:03:46 Begin writing Bareos records to first tape ... BAREOS interrupted by signal 8: Floating-point exception Kaboom! btape, btape got signal 8 - Floating-point exception. Attempting traceback. or run multiple tape test twice: Do you want to run the simplified test (s) with one tape or the complete multiple tape (m) test: (s/m) m Multiple tape test selected. 25-Feb 18:11 btape JobId 0: 3307 Issuing autochanger "unload slot 2, drive 0" command. 25-Feb 18:11 btape JobId 0: 3304 Issuing autochanger "load slot 1, drive 0" command. 25-Feb 18:11 btape JobId 0: 3305 Autochanger "load slot 1, drive 0", status is OK. Wrote Volume label for volume "TestVolume1". Wrote Start of Session label. 18:11:08 Begin writing Bareos records to first tape ... BAREOS interrupted by signal 11: Segmentation violation Kaboom! btape, btape got signal 11 - Segmentation violation. Attempting traceback. Kaboom! exepath=/etc/bareos Calling: /etc/bareos/btraceback /etc/bareos/btape 22940 /tmp [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". [New Thread 0x7fc900665700 (LWP 22943)] [New Thread 0x7fc900e66700 (LWP 22941)] 0x00007fc902eed88d in waitpid () from /lib/x86_64-linux-gnu/libpthread.so.0 ... | ||||
Tags | No tags attached. | ||||
2013-02-25 18:23
|
|
2013-02-25 18:23
|
|
I get the feeling this is a bug in btape that has been there forever and just shows on this emulated hardware. I need proper core dumps and executables without optimization and with debug symbols. The tracebacks give some idea but are worthless for postmortem debugging. I would try to reproduce this on 13.1.0 which most likely has the same problem but at least should make proper core-dumps for postmortem debugging and you need a hand compiled version without -O2 e.g. preferable with -O0 (e.g. captial o zero). |
|
First part fixed for second part need better debug output. | |
I don't know what to do. "hand compiled version without -O0" -don't know what that means. | |
btape doesn't crash anymore after quit, but due to new bug (id=101) I can't work any further | |
Problem is persisting: Do you want to run the simplified test (s) with one tape or the complete multiple tape (m) test: (s/m) m Multiple tape test selected. Wrote Volume label for volume "TestVolume1". Wrote Start of Session label. 16:20:43 Begin writing Bareos records to first tape ... BAREOS interrupted by signal 8: Floating-point exception Kaboom! btape, btape got signal 8 - Floating-point exception. Attempting traceback. Kaboom! exepath=/etc/bareos Calling: /etc/bareos/btraceback /etc/bareos/btape 3107 /tmp [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". [New Thread 0x7f4eb5853700 (LWP 3110)] [New Thread 0x7f4eb6054700 (LWP 3108)] 0x00007f4eb7c9e88d in waitpid () from /lib/x86_64-linux-gnu/libpthread.so.0 warning: Memory read failed for corefile section, 1048576 bytes at 0x7f4eb606c000. warning: Memory read failed for corefile section, 1048576 bytes at 0x7f4eb6284000. warning: Memory read failed for corefile section, 1048576 bytes at 0x7f4eb6580000. warning: Memory read failed for corefile section, 1048576 bytes at 0x7f4eb6783000. warning: Memory read failed for corefile section, 1048576 bytes at 0x7f4eb6b24000. warning: Memory read failed for corefile section, 1048576 bytes at 0x7f4eb6da1000. warning: Memory read failed for corefile section, 1048576 bytes at 0x7f4eb6fc1000. warning: Memory read failed for corefile section, 1048576 bytes at 0x7f4eb71c6000. warning: Memory read failed for corefile section, 1048576 bytes at 0x7f4eb73cf000. warning: Memory read failed for corefile section, 1048576 bytes at 0x7f4eb7785000. warning: Memory read failed for corefile section, 1048576 bytes at 0x7f4eb7a71000. warning: Memory read failed for corefile section, 1048576 bytes at 0x7f4eb7ca7000. warning: Memory read failed for corefile section, 1048576 bytes at 0x7f4eb7f09000. warning: Memory read failed for corefile section, 1048576 bytes at 0x7f4eb811f000. Saved corefile /tmp/btape.3107 |
|
Problem persists: mtx -f /dev/sg3 load 1 btape LTO test y fill m Verbatim: root@cardtech02:~# cd /etc/bareos/ root@cardtech02:/etc/bareos# mtx -f /dev/sg3 load 1 Loading media from Storage Element 1 into drive 0...done root@cardtech02:/etc/bareos# btape LTO Tape block granularity is 1024 bytes. btape: butil.c:285-0 Using device: "LTO" for writing. btape: btape.c:499-0 open device "LTO" (/dev/nst0): OK *test === Write, rewind, and re-read test === [...] Ah, I see you have an autochanger configured. To test the autochanger you must have a blank tape that I can write on in Slot 1. Do you wish to continue with the Autochanger test? (y/n): y [...] The test autochanger worked!! *fill This command simulates Bareos writing to a tape. It requires either one or two blank tapes, which it will label and write. If you have an autochanger configured, it will use the tapes that are in slots 1 and 2, otherwise, you will be prompted to insert the tapes when necessary. It will print a status approximately every 322 MB, and write an EOF every 0 . If you have selected the simple test option, after writing the first tape it will rewind it and re-read the last block written. If you have selected the multiple tape test, when the first tape fills, it will ask for a second, and after writing a few more blocks, it will stop. Then it will begin re-reading the two tapes. This may take a long time -- hours! ... Do you want to run the simplified test (s) with one tape or the complete multiple tape (m) test: (s/m) m Multiple tape test selected. Wrote Volume label for volume "TestVolume1". Wrote Start of Session label. 11:02:28 Begin writing Bareos records to first tape ... BAREOS interrupted by signal 8: Floating-point exception Kaboom! btape, btape got signal 8 - Floating-point exception. Attempting traceback. Kaboom! exepath=/etc/bareos Calling: /etc/bareos/btraceback /etc/bareos/btape 1657 /tmp [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". [New Thread 0x7f5fe245c700 (LWP 1660)] [New Thread 0x7f5fe2c5d700 (LWP 1658)] 0x00007f5fe4ce488d in waitpid () from /lib/x86_64-linux-gnu/libpthread.so.0 warning: Memory read failed for corefile section, 1048576 bytes at 0x7f5fe30b2000. warning: Memory read failed for corefile section, 1048576 bytes at 0x7f5fe32ca000. warning: Memory read failed for corefile section, 1048576 bytes at 0x7f5fe35c6000. warning: Memory read failed for corefile section, 1048576 bytes at 0x7f5fe37c9000. warning: Memory read failed for corefile section, 1048576 bytes at 0x7f5fe3b6a000. warning: Memory read failed for corefile section, 1048576 bytes at 0x7f5fe3de7000. warning: Memory read failed for corefile section, 1048576 bytes at 0x7f5fe4007000. warning: Memory read failed for corefile section, 1048576 bytes at 0x7f5fe420c000. warning: Memory read failed for corefile section, 1048576 bytes at 0x7f5fe4415000. warning: Memory read failed for corefile section, 1048576 bytes at 0x7f5fe47cb000. warning: Memory read failed for corefile section, 1048576 bytes at 0x7f5fe4ab7000. warning: Memory read failed for corefile section, 1048576 bytes at 0x7f5fe4ced000. warning: Memory read failed for corefile section, 1048576 bytes at 0x7f5fe4f4f000. warning: Memory read failed for corefile section, 1048576 bytes at 0x7f5fe5165000. Saved corefile /tmp/btape.1657 root@cardtech02:/etc/bareos# |
|
Fix committed to bareos bareos-12.4 branch with changesetid 997. | |
Fix committed to bareos2015 bareos-13.2 branch with changesetid 4324. | |
bareos: bareos-12.4 fcf725cc 2013-05-04 13:14
Ported: N/A Details Diff |
Fix segmentation fault when running fill multiple times. Code frees block but doesn't set the pointer to NULL so a next run of the code thinks that everything is already allocated but all pointers point to already freed memory which gives some firework. Fixes 0000096: Running fill test twice leads to segmentation violation. |
Affected Issues 0000096 |
|
mod - src/stored/btape.c | Diff File | ||
bareos: bareos-12.4 c9518cf0 2013-05-04 13:14
Ported: N/A Details Diff |
Fix floating point exception. dev->max_file_size = 2 * num_recs * dev->max_block_size; max_block_size can be 0 which gives a max_file_size which is 0 when you then calculate write_eof = dev->max_file_size / REC_SIZE; /*compute when we add EOF*/ then write_eof = 0 and when you then do if ((block->BlockNumber % write_eof) == 0) { You get a nice Floating Point Execption. We now set max_file_size to something more appropriate and assert on write_eof being bigger then 0 so we never do a divide by zero again. Fixes 0000096: btape crashes using multiple tape test when tape was written by a fill test before. |
Affected Issues 0000096 |
|
mod - src/stored/btape.c | Diff File | ||
bareos2015: bareos-12.4 d41d9771 2013-05-04 15:14 Ported: N/A Details Diff |
Fix segmentation fault when running fill multiple times. Code frees block but doesn't set the pointer to NULL so a next run of the code thinks that everything is already allocated but all pointers point to already freed memory which gives some firework. Fixes 0000096: Running fill test twice leads to segmentation violation. |
Affected Issues 0000096 |
|
mod - src/stored/btape.c | Diff File | ||
bareos2015: bareos-12.4 75d981c6 2013-05-04 15:14 Ported: N/A Details Diff |
Fix floating point exception. dev->max_file_size = 2 * num_recs * dev->max_block_size; max_block_size can be 0 which gives a max_file_size which is 0 when you then calculate write_eof = dev->max_file_size / REC_SIZE; /*compute when we add EOF*/ then write_eof = 0 and when you then do if ((block->BlockNumber % write_eof) == 0) { You get a nice Floating Point Execption. We now set max_file_size to something more appropriate and assert on write_eof being bigger then 0 so we never do a divide by zero again. Fixes 0000096: btape crashes using multiple tape test when tape was written by a fill test before. |
Affected Issues 0000096 |
|
mod - src/stored/btape.c | Diff File | ||
bareos: master 8220e6fa 2013-05-04 21:08
Ported: N/A Details Diff |
Fix segmentation fault when running fill multiple times. Code frees block but doesn't set the pointer to NULL so a next run of the code thinks that everything is already allocated but all pointers point to already freed memory which gives some firework. Fixes 0000096: Running fill test twice leads to segmentation violation. |
Affected Issues 0000096 |
|
mod - src/stored/btape.c | Diff File | ||
bareos: master e603d304 2013-05-04 21:09
Ported: N/A Details Diff |
Fix floating point exception. dev->max_file_size = 2 * num_recs * dev->max_block_size; max_block_size can be 0 which gives a max_file_size which is 0 when you then calculate write_eof = dev->max_file_size / REC_SIZE; /*compute when we add EOF*/ then write_eof = 0 and when you then do if ((block->BlockNumber % write_eof) == 0) { You get a nice Floating Point Execption. We now set max_file_size to something more appropriate and assert on write_eof being bigger then 0 so we never do a divide by zero again. Fixes 0000096: btape crashes using multiple tape test when tape was written by a fill test before. |
Affected Issues 0000096 |
|
mod - src/stored/btape.c | Diff File | ||
bareos2015: bareos-13.2 c53012dd 2013-05-04 23:08 Ported: N/A Details Diff |
Fix segmentation fault when running fill multiple times. Code frees block but doesn't set the pointer to NULL so a next run of the code thinks that everything is already allocated but all pointers point to already freed memory which gives some firework. Fixes 0000096: Running fill test twice leads to segmentation violation. |
Affected Issues 0000096 |
|
mod - src/stored/btape.c | Diff File | ||
bareos2015: bareos-13.2 7f8ad5d8 2013-05-04 23:09 Ported: N/A Details Diff |
Fix floating point exception. dev->max_file_size = 2 * num_recs * dev->max_block_size; max_block_size can be 0 which gives a max_file_size which is 0 when you then calculate write_eof = dev->max_file_size / REC_SIZE; /*compute when we add EOF*/ then write_eof = 0 and when you then do if ((block->BlockNumber % write_eof) == 0) { You get a nice Floating Point Execption. We now set max_file_size to something more appropriate and assert on write_eof being bigger then 0 so we never do a divide by zero again. Fixes 0000096: btape crashes using multiple tape test when tape was written by a fill test before. |
Affected Issues 0000096 |
|
mod - src/stored/btape.c | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2013-02-25 18:23 |
|
New Issue | |
2013-02-25 18:23 |
|
Status | new => assigned |
2013-02-25 18:23 |
|
Assigned To | => mvwieringen |
2013-02-25 18:23 |
|
File Added: bareos.23432.traceback | |
2013-02-25 18:23 |
|
File Added: bareos.21224.traceback | |
2013-02-25 20:18 | mvwieringen | Note Added: 0000167 | |
2013-02-25 20:19 | mvwieringen | Status | assigned => feedback |
2013-02-25 20:54 | mvwieringen | Changeset attached | => bareos master 419d4850 |
2013-02-25 20:54 | mvwieringen | Status | feedback => closed |
2013-02-25 20:54 | mvwieringen | Resolution | open => fixed |
2013-02-25 20:55 | mvwieringen | Note Added: 0000169 | |
2013-02-25 20:55 | mvwieringen | Assigned To | mvwieringen => user12 |
2013-02-25 20:55 | mvwieringen | Status | closed => feedback |
2013-02-26 10:45 |
|
Note Added: 0000178 | |
2013-02-26 10:45 |
|
Status | feedback => assigned |
2013-02-26 15:40 |
|
Note Added: 0000184 | |
2013-02-27 16:25 |
|
Note Added: 0000198 | |
2013-02-27 17:37 |
|
Assigned To | user12 => mvwieringen |
2013-02-28 10:16 | mvwieringen | Changeset attached | => bareos Branch-12.4 46195a60 |
2013-02-28 10:16 | mvwieringen | Status | assigned => closed |
2013-02-28 10:22 | mvwieringen | Assigned To | mvwieringen => |
2013-02-28 11:08 |
|
Assigned To | => user12 |
2013-02-28 11:08 |
|
Note Added: 0000212 | |
2013-02-28 11:08 |
|
Status | closed => feedback |
2013-02-28 11:08 |
|
Resolution | fixed => reopened |
2013-02-28 11:08 |
|
Assigned To | user12 => mvwieringen |
2013-02-28 11:08 |
|
Status | feedback => assigned |
2013-02-28 17:36 | mvwieringen | Changeset attached | => bareos master 2849bb1d |
2013-02-28 17:36 | mvwieringen | Status | assigned => closed |
2013-02-28 17:36 | mvwieringen | Changeset attached | => bareos Branch-12.4 0d68a38b |
2013-02-28 17:37 | mvwieringen | Assigned To | mvwieringen => |
2013-03-04 10:00 | mvwieringen | Fixed in Version | 12.4.1 => 12.4.2 |
2013-03-04 10:00 | mvwieringen | Product Version | 12.4.1 => 12.4.2 |
2013-03-04 10:00 | mvwieringen | Fixed in Version | => 12.4.2 |
2013-08-13 03:12 |
|
Changeset attached | => bareos master e603d304 |
2013-08-13 03:12 |
|
Changeset attached | => bareos master 8220e6fa |
2013-08-13 03:12 |
|
Changeset attached | => bareos bareos-12.4 c9518cf0 |
2013-08-13 03:12 |
|
Changeset attached | => bareos bareos-12.4 fcf725cc |
2013-08-13 03:12 |
|
Note Added: 0000611 | |
2013-08-13 03:12 |
|
Assigned To | => mvwieringen adm |
2013-08-13 03:12 |
|
Status | closed => resolved |
2013-08-13 09:10 |
|
Assigned To | mvwieringen adm => |
2013-08-13 09:10 |
|
Status | resolved => closed |
2015-03-25 16:51 | mvwieringen | Changeset attached | => bareos2015 bareos-12.4 75d981c6 |
2015-03-25 16:51 | mvwieringen | Changeset attached | => bareos2015 bareos-12.4 d41d9771 |
2015-03-25 16:51 | mvwieringen | Changeset attached | => bareos2015 bareos-13.2 7f8ad5d8 |
2015-03-25 16:51 | mvwieringen | Changeset attached | => bareos2015 bareos-13.2 c53012dd |
2015-03-25 16:51 | mvwieringen | Note Added: 0001392 | |
2015-03-25 16:51 | mvwieringen | Status | closed => resolved |
2015-10-02 20:07 |
|
Status | resolved => closed |
2015-10-02 20:07 |
|
Assigned To | => mvwieringen adm |
2015-10-02 20:07 |
|
Resolution | reopened => fixed |