Dear Antonio,

While using ddrescue v1.16 on a bunch of ten year and more old CDROMs, I can 
across the following issue of ddrescuelog while running something like the 
command below on one of these discs:

  $ ddrescue -n -b2048 /dev/sr0 foo.iso foo.log
  GNU ddrescue 1.16
  Press Ctrl-C to interrupt
  rescued:         0 B,  errsize:       0 B,  current rate:        0 B/s
     ipos:         0 B,   errors:       0,    average rate:        0 B/s
     opos:         0 B,     time since last successful read:       1 s
  Finished                   

(The disc was indeed quite damaged: e.g. isoinfo reported something like 'Seek 
error on old image' and the kernel said that 'cdrom: This disc doesn't have any 
tracks I recognize!'.)

When passing the logfile above (please find it attached as empty-domain.log) to 
ddrescuelog, the program gets into error: 

  $ ddrescuelog -t foo.log
  ddrescuelog: Logfile 'foo.log' does not exist.

Upon looking into the source files it came out that in fact ddrescuelog 
correctly reads in the logfile (logbook.cc:240) but only is misinterpreting 
'logfile_isize_ == 0' as 'file does not exist'. 'Logbook::logfile_isize_' gets 
to be '0' in logbook.cc:242 from the value contained in 'sblock_vector' as 
resulted upon the call to 'read_logfile':

  (gdb) print sblock_vector.size()
  $1 = 1
  (gdb) print sblock_vector[0]
  $2 = (Sblock &) @0x615100: {<Block> = {pos_ = 0, size_ = 0}, status_ = 
Sblock::non_tried}
  
By now a plausible fixing patch was immediate. Please see it enclosed.

Sincerely,

Stefan Vargyas.


Attachment: bug-report-ddrescue-1.16-ddrescuelog-empty-domain.patch
Description: Binary data

# Rescue Logfile. Created by GNU ddrescue version 1.16
# Command line: ddrescue -n -b2048 /dev/sr0 foo.iso foo.log
# current_pos  current_status
0x00000000     +
#      pos        size  status
0x00000000  0x00000000  ?
_______________________________________________
Bug-ddrescue mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-ddrescue

Reply via email to