Hello to developers of GNU ddrescue.

I've just wondered how you manage to debug this software without any debug printf or something like this.

Feel free to test, use and include to the upstream the patch from the attachment.


How to apply this patch (tested on Ubuntu 13.04 x32):

# Ubuntu-specific: lzip installation:
$ sudo apt-get instal debian-keyring
$ sudo apt-get install lzip

$ cd ~/tmp
$ wget http://download.savannah.gnu.org/releases/ddrescue/ddrescue-1.17-rc4.tar.lz
$ tar xf ddrescue-1.17-rc4.tar.lz
$ cd ddrescue-1.17-rc4/
$ patch -p1 < ~/Downloads/debug_printf_for_ddrescue.patch
$ ./configure
$ make


How to use it:

$ DEBUG_OUTPUT_FILENAME=debug_output.log ./ddrescue /dev/mapper/disk_with_bad_blocks destination.img logfile.log

debug_output.log will be created in current dir.





PS.   Here is logfile.log and debug_output.log in the attachment
 for  640 sectors device with bad blocks:

$ sudo dmsetup table /dev/mapper/disk_with_bad_blocks
0 280 linear 7:4 0
280 72 error
352 288 linear 7:4 352

This particular debug printf log file may also be enteresting
(I've seen subject "10K/s on badblocks" in this list).

--
Best regards,
Alexander Sashnov.

diff -Naur ddrescue-1.17-rc4.orig/debug_print.cc ddrescue-1.17-rc4/debug_print.cc
--- ddrescue-1.17-rc4.orig/debug_print.cc	1970-01-01 07:00:00.000000000 +0700
+++ ddrescue-1.17-rc4/debug_print.cc	2013-06-29 21:20:31.604099000 +0700
@@ -0,0 +1,73 @@
+/***
+ * Debug printf library for C++
+ *
+ * Author: Alexander Sashnov <[email protected]>
+ * License: Boost Software License
+ */
+#include <cerrno>
+#include <cstring>
+#include <ctime>
+#include <cstdlib>
+#include <unistd.h>
+
+#include "debug_print.h"
+
+
+int DebugFuncEntry::level = 0;
+
+static const int LOG_LINES_MAXIMUM = 10000;
+
+void debug_printf(const char *fmt, ...)
+{
+  va_list args;
+
+  static char *debug_log_filename = getenv("DEBUG_OUTPUT_FILENAME");
+  static FILE *fp = NULL;
+  static int n = 0;
+  static bool failed = false;
+  static time_t start_time = time(NULL);
+
+  if (! debug_log_filename)
+    return;
+
+  if (failed || n > LOG_LINES_MAXIMUM)
+    return;
+
+  if (!fp) {
+    fp = fopen(debug_log_filename, "w");
+    if (!fp) {
+      fprintf(stderr, "Unable to create %s: %s\n", debug_log_filename, strerror(errno));
+      failed = true;
+      return;
+    }
+    setbuf(fp, NULL);
+
+    fprintf(fp, "This is output from calls of 'debug_printf' function.\n"
+      "Every time the programm starts it creates new file (output for previous run will be lost)\n"
+      "\n"
+      "<seconds from programm start> <message>\n\n");
+  }
+
+  time_t cur_time = time(NULL);
+
+  double diff = difftime(cur_time, start_time);
+
+  (void) fprintf (fp, "%5.0f Debug: ", diff);
+  va_start (args, fmt);
+  (void) vfprintf (fp, fmt, args);
+  va_end (args);
+
+  // Put EOL char if it is not into the format string
+  int i = strlen(fmt);
+  if (i > 0 && fmt[i-1] != '\n')
+    fprintf(fp, "\n");
+
+  // Hint: you can set debugger's breakpoint here:
+  if (n == 15) {
+    ;
+  }
+
+  if (n++ == LOG_LINES_MAXIMUM) {
+    fprintf(fp, "That's it: maximum number of lines allowed for logging was reached.");
+  }
+}
diff -Naur ddrescue-1.17-rc4.orig/debug_print.h ddrescue-1.17-rc4/debug_print.h
--- ddrescue-1.17-rc4.orig/debug_print.h	1970-01-01 07:00:00.000000000 +0700
+++ ddrescue-1.17-rc4/debug_print.h	2013-06-29 21:18:18.624102000 +0700
@@ -0,0 +1,119 @@
+/***
+ * Debug printf library for C++
+ *
+ * Author: Alexander Sashnov <[email protected]>
+ * License: Boost Software License
+ */
+#include <cstdarg>
+#include <cstdio>
+
+/*
+ * For using debug log just start your programm with
+ * DEBUG_OUTPUT_FILENAME environment variable with
+ * filename to create.
+ *
+ *
+ * Example for using the following macros:
+ *
+ * void f(int n)
+ * {
+ *   DEBUG_FUNC_ENTRY
+ *
+ *   ...
+ *
+ *   if (n > 7)
+ *   {
+ *     DEBUG_FUNC_STACKFRAME("n great than 7")
+ *     ...
+ *
+ *   }
+ *
+ *   ...
+ *
+ *   DEBUG_LOG("function bottom, n=%d", n)
+ *
+ *   ...
+ * }
+ *
+ *
+ */
+
+
+#define DEBUG_FUNC_ENTRY DebugFuncEntry debug_func_obj(__FUNCTION__);
+
+#define DEBUG_FUNC_STACKFRAME(caption) DebugFuctStackFrame debug_func_inner(debug_func_obj, caption)
+
+#define DEBUG_LOG(fmt, args...) debug_printf("%s:%d:%s(): " fmt "\n", __FILE__, __LINE__, __FUNCTION__, ## args)
+
+
+/*!
+ * \brief printf-arguments function for print into debug log file.
+ * \param fmt
+ */
+extern void debug_printf(const char *fmt, ...);
+
+/*!
+ * \brief Print to log function entry and exit records.
+ *
+ */
+struct DebugFuncEntry {
+  static int level;
+  const char *func;
+  DebugFuncEntry(const char *f) :func(f) {
+    level++;
+    debug_printf("[%d] ---> %s()\n", level, func);
+  }
+  ~DebugFuncEntry() {
+    debug_printf("[%d] <--- %s()\n", level, func);
+    level--;
+  }
+  void enter(const char *caption) {
+    level++;
+    debug_printf("[%d] ---> %s() %s\n", level, func, caption);
+  }
+  void exit(const char *caption) {
+    debug_printf("[%d] <--- %s() %s\n", level, func, caption);
+    level--;
+  }
+};
+
+
+/*!
+ * \brief Object life-time logger.
+ *
+ * Derive your object from that class
+ * and you will get creation and delete object records.
+ */
+class DebugObjCreation {
+  DebugObjCreation() {
+    total++;
+    debug_printf("[create %d] Object created %p\n", total, this);
+  }
+  ~DebugObjCreation() {
+    debug_printf("[delete %d] Object deleted %p\n", total, this);
+    total--;
+  }
+private:
+  static int total;
+};
+
+
+/*!
+ * \brief Log for inner-function stack frames inside big function.
+ *
+ */
+class DebugFuncStackFrame {
+public:
+  DebugFuncStackFrame(DebugFuncEntry &obj, const char *capt)
+    : _obj(obj), _capt(capt) {
+    _obj.enter(_capt);
+  }
+  ~DebugFuncStackFrame() {
+    _obj.exit(_capt);
+  }
+private:
+  DebugFuncStackFrame();
+  DebugFuncEntry &_obj;
+  const char *_capt;
+};
+
diff -Naur ddrescue-1.17-rc4.orig/main_common.cc ddrescue-1.17-rc4/main_common.cc
--- ddrescue-1.17-rc4.orig/main_common.cc	2013-06-29 21:58:21.204574255 +0700
+++ ddrescue-1.17-rc4/main_common.cc	2013-06-29 22:00:30.792571529 +0700
@@ -176,7 +176,14 @@
   const char * const binary_prefix[8] =
     { "Ki", "Mi", "Gi", "Ti", "Pi", "Ei", "Zi", "Yi" };
   static bool si = true;
-  static char buf[16];
+
+  // get static buffer from circle
+  const int BUFSIZE = 16;
+  const int NUMBUFS = 16;
+  static char bufs[NUMBUFS][BUFSIZE];
+  static int cur_buf = 0;
+  char *buf = bufs[cur_buf++];
+  cur_buf %= NUMBUFS;
 
   if( set_prefix ) si = ( set_prefix > 0 );
   const int factor = ( si ? 1000 : 1024 );
@@ -186,6 +193,6 @@
 
   for( int i = 0; i < 8 && llabs( num ) > limit; ++i )
     { num /= factor; p = prefix[i]; }
-  snprintf( buf, sizeof buf, "%lld %s", num, p );
+  snprintf( buf, BUFSIZE, "%lld %s", num, p );
   return buf;
   }
diff -Naur ddrescue-1.17-rc4.orig/Makefile.in ddrescue-1.17-rc4/Makefile.in
--- ddrescue-1.17-rc4.orig/Makefile.in	2013-06-29 21:58:21.200574255 +0700
+++ ddrescue-1.17-rc4/Makefile.in	2013-06-29 21:59:47.176572446 +0700
@@ -6,9 +6,9 @@
 INSTALL_DIR = $(INSTALL) -d -m 755
 SHELL = /bin/sh
 
-ddobjs = block.o fillbook.o genbook.o io.o logbook.o rescuebook.o main.o
+ddobjs = block.o fillbook.o genbook.o io.o logbook.o rescuebook.o main.o debug_print.o
 objs = arg_parser.o rational.o $(ddobjs)
-logobjs = arg_parser.o block.o logbook.o ddrescuelog.o
+logobjs = arg_parser.o block.o logbook.o ddrescuelog.o debug_print.o
 
 
 .PHONY : all install install-bin install-info install-man install-strip \
diff -Naur ddrescue-1.17-rc4.orig/rescuebook.cc ddrescue-1.17-rc4/rescuebook.cc
--- ddrescue-1.17-rc4.orig/rescuebook.cc	2013-06-29 21:58:21.204574255 +0700
+++ ddrescue-1.17-rc4/rescuebook.cc	2013-06-29 22:01:35.896570159 +0700
@@ -29,7 +29,7 @@
 
 #include "block.h"
 #include "ddrescue.h"
-
+#include "debug_print.h"
 
 namespace {
 
@@ -82,6 +82,14 @@
   if( errors_or_timeout() ) return 1;
   if( interrupted() ) return -1;
   int retval = copy_block( b, copied_size, error_size );
+
+  debug_printf("copy_and_update(): %10lld %c [0x%08llX,%10sB]: %10sB copied, %10sB errors.",
+               b.pos() / 512, char(st),
+               b.pos(), format_num(b.size()),
+               format_num(copied_size), format_num(error_size));
+  if (copied_size + error_size < b.size())
+    debug_printf("It has hit the EOF of input device/file");
+
   if( !retval )
     {
     if( copied_size + error_size < b.size() )			// EOF
@@ -118,6 +126,7 @@
 //
 int Rescuebook::copy_non_tried()
   {
+  DEBUG_FUNC_ENTRY
   bool first_post = true;
 
   for( bool first_pass = true; ; first_pass = false )
@@ -189,6 +198,7 @@
 //
 int Rescuebook::rcopy_non_tried()
   {
+  DEBUG_FUNC_ENTRY
   bool first_post = true;
 
   for( bool first_pass = true; ; first_pass = false )
@@ -261,6 +271,7 @@
 //
 int Rescuebook::trim_errors()
   {
+  DEBUG_FUNC_ENTRY
   const char * const msg = "Trimming failed blocks...";
   bool first_post = true;
 
@@ -324,6 +335,7 @@
 //
 int Rescuebook::split_errors( const bool reverse )
   {
+  DEBUG_FUNC_ENTRY
   const char * const msg = "Splitting failed blocks...";
   bool first_post = true;
 
@@ -449,6 +461,7 @@
 //
 int Rescuebook::copy_errors()
   {
+  DEBUG_FUNC_ENTRY
   char msgbuf[80] = "Retrying bad sectors... Retry ";
   const int msglen = std::strlen( msgbuf );
 
@@ -494,6 +507,7 @@
 //
 int Rescuebook::rcopy_errors()
   {
+  DEBUG_FUNC_ENTRY
   char msgbuf[80] = "Retrying bad sectors... Retry ";
   const int msglen = std::strlen( msgbuf );
 
@@ -584,6 +598,9 @@
 //
 int Rescuebook::do_rescue( const int ides, const int odes, const bool reverse )
   {
+  DEBUG_FUNC_ENTRY;
+  debug_printf("Debug: copy_and_update(): sector status  block_start,block_size : copied_size, errors_size.");
+
   bool copy_pending = false, trim_pending = false, split_pending = false;
   ides_ = ides; odes_ = odes;
 
This is output from calls of 'debug_printf' function.
Every time the programm starts it creates new file (output for previous run will be lost)

<seconds from programm start> <message>

    0 Debug: [1] ---> do_rescue()
    0 Debug: Debug: copy_and_update(): sector status  block_start,block_size : copied_size, errors_size.
    0 Debug: [2] ---> copy_non_tried()
    0 Debug: copy_and_update():          0 * [0x00000000,    65536 B]:     65536 B copied,         0 B errors.
    0 Debug: copy_and_update():        128 * [0x00010000,    65536 B]:     65536 B copied,         0 B errors.
    0 Debug: copy_and_update():        256 * [0x00020000,    65536 B]:     12288 B copied,     53248 B errors.
    0 Debug: copy_and_update():        384 - [0x00030000,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        385 - [0x00030200,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        386 - [0x00030400,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        387 - [0x00030600,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        388 - [0x00030800,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        389 - [0x00030A00,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        390 - [0x00030C00,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        391 - [0x00030E00,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        392 - [0x00031000,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        393 - [0x00031200,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        394 - [0x00031400,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        395 - [0x00031600,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        396 - [0x00031800,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        397 - [0x00031A00,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        398 - [0x00031C00,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        399 - [0x00031E00,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        400 - [0x00032000,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        401 - [0x00032200,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        402 - [0x00032400,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        403 - [0x00032600,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        404 - [0x00032800,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        405 - [0x00032A00,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        406 - [0x00032C00,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        407 - [0x00032E00,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        408 - [0x00033000,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        409 - [0x00033200,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        410 - [0x00033400,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        411 - [0x00033600,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        412 - [0x00033800,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        413 - [0x00033A00,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        414 - [0x00033C00,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        415 - [0x00033E00,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        416 - [0x00034000,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        417 - [0x00034200,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        418 - [0x00034400,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        419 - [0x00034600,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        420 - [0x00034800,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        421 - [0x00034A00,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        422 - [0x00034C00,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        423 - [0x00034E00,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        424 - [0x00035000,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        425 - [0x00035200,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        426 - [0x00035400,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        427 - [0x00035600,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        428 - [0x00035800,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        429 - [0x00035A00,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        430 - [0x00035C00,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        431 - [0x00035E00,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        432 - [0x00036000,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        433 - [0x00036200,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        434 - [0x00036400,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        435 - [0x00036600,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        436 - [0x00036800,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        437 - [0x00036A00,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        438 - [0x00036C00,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        439 - [0x00036E00,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        440 - [0x00037000,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        441 - [0x00037200,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        442 - [0x00037400,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        443 - [0x00037600,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        444 - [0x00037800,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        445 - [0x00037A00,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        446 - [0x00037C00,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        447 - [0x00037E00,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        448 - [0x00038000,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        449 - [0x00038200,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        450 - [0x00038400,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        451 - [0x00038600,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        452 - [0x00038800,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        453 - [0x00038A00,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        454 - [0x00038C00,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        455 - [0x00038E00,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        456 - [0x00039000,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        457 - [0x00039200,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        458 - [0x00039400,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        459 - [0x00039600,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        460 - [0x00039800,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        461 - [0x00039A00,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        462 - [0x00039C00,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        463 - [0x00039E00,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        464 - [0x0003A000,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        465 - [0x0003A200,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        466 - [0x0003A400,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        467 - [0x0003A600,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        468 - [0x0003A800,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        469 - [0x0003AA00,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        470 - [0x0003AC00,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        471 - [0x0003AE00,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        472 - [0x0003B000,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        473 - [0x0003B200,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        474 - [0x0003B400,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        475 - [0x0003B600,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        476 - [0x0003B800,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        477 - [0x0003BA00,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        478 - [0x0003BC00,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        479 - [0x0003BE00,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        480 - [0x0003C000,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        481 - [0x0003C200,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        482 - [0x0003C400,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        483 - [0x0003C600,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        484 - [0x0003C800,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        485 - [0x0003CA00,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        486 - [0x0003CC00,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        487 - [0x0003CE00,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        488 - [0x0003D000,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        489 - [0x0003D200,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        490 - [0x0003D400,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        491 - [0x0003D600,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        492 - [0x0003D800,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        493 - [0x0003DA00,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        494 - [0x0003DC00,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        495 - [0x0003DE00,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        496 - [0x0003E000,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        497 - [0x0003E200,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        498 - [0x0003E400,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        499 - [0x0003E600,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        500 - [0x0003E800,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        501 - [0x0003EA00,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        502 - [0x0003EC00,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        503 - [0x0003EE00,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        504 - [0x0003F000,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        505 - [0x0003F200,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        506 - [0x0003F400,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        507 - [0x0003F600,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        508 - [0x0003F800,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        509 - [0x0003FA00,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        510 - [0x0003FC00,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        511 - [0x0003FE00,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        512 * [0x00040000,    65536 B]:     65536 B copied,         0 B errors.
    0 Debug: [2] <--- copy_non_tried()
    0 Debug: [2] ---> trim_errors()
    0 Debug: copy_and_update():        280 - [0x00023000,      512 B]:         0 B copied,       512 B errors.
    0 Debug: copy_and_update():        383 - [0x0002FE00,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        382 - [0x0002FC00,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        381 - [0x0002FA00,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        380 - [0x0002F800,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        379 - [0x0002F600,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        378 - [0x0002F400,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        377 - [0x0002F200,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        376 - [0x0002F000,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        375 - [0x0002EE00,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        374 - [0x0002EC00,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        373 - [0x0002EA00,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        372 - [0x0002E800,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        371 - [0x0002E600,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        370 - [0x0002E400,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        369 - [0x0002E200,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        368 - [0x0002E000,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        367 - [0x0002DE00,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        366 - [0x0002DC00,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        365 - [0x0002DA00,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        364 - [0x0002D800,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        363 - [0x0002D600,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        362 - [0x0002D400,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        361 - [0x0002D200,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        360 - [0x0002D000,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        359 - [0x0002CE00,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        358 - [0x0002CC00,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        357 - [0x0002CA00,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        356 - [0x0002C800,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        355 - [0x0002C600,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        354 - [0x0002C400,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        353 - [0x0002C200,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        352 - [0x0002C000,      512 B]:       512 B copied,         0 B errors.
    0 Debug: copy_and_update():        351 - [0x0002BE00,      512 B]:         0 B copied,       512 B errors.
    0 Debug: [2] <--- trim_errors()
    0 Debug: [2] ---> split_errors()
    0 Debug: copy_and_update():        316 - [0x00027800,      512 B]:         0 B copied,       512 B errors.
    0 Debug: copy_and_update():        315 - [0x00027600,      512 B]:         0 B copied,       512 B errors.
    0 Debug: copy_and_update():        298 - [0x00025400,      512 B]:         0 B copied,       512 B errors.
    0 Debug: copy_and_update():        297 - [0x00025200,      512 B]:         0 B copied,       512 B errors.
    0 Debug: copy_and_update():        334 - [0x00029C00,      512 B]:         0 B copied,       512 B errors.
    0 Debug: copy_and_update():        333 - [0x00029A00,      512 B]:         0 B copied,       512 B errors.
    0 Debug: copy_and_update():        289 - [0x00024200,      512 B]:         0 B copied,       512 B errors.
    0 Debug: copy_and_update():        288 - [0x00024000,      512 B]:         0 B copied,       512 B errors.
    0 Debug: copy_and_update():        307 - [0x00026600,      512 B]:         0 B copied,       512 B errors.
    0 Debug: copy_and_update():        306 - [0x00026400,      512 B]:         0 B copied,       512 B errors.
    0 Debug: copy_and_update():        325 - [0x00028A00,      512 B]:         0 B copied,       512 B errors.
    0 Debug: copy_and_update():        324 - [0x00028800,      512 B]:         0 B copied,       512 B errors.
    0 Debug: copy_and_update():        343 - [0x0002AE00,      512 B]:         0 B copied,       512 B errors.
    0 Debug: copy_and_update():        342 - [0x0002AC00,      512 B]:         0 B copied,       512 B errors.
    0 Debug: copy_and_update():        284 - [0x00023800,      512 B]:         0 B copied,       512 B errors.
    0 Debug: copy_and_update():        283 - [0x00023600,      512 B]:         0 B copied,       512 B errors.
    0 Debug: copy_and_update():        293 - [0x00024A00,      512 B]:         0 B copied,       512 B errors.
    0 Debug: copy_and_update():        292 - [0x00024800,      512 B]:         0 B copied,       512 B errors.
    0 Debug: copy_and_update():        302 - [0x00025C00,      512 B]:         0 B copied,       512 B errors.
    0 Debug: copy_and_update():        301 - [0x00025A00,      512 B]:         0 B copied,       512 B errors.
    0 Debug: copy_and_update():        311 - [0x00026E00,      512 B]:         0 B copied,       512 B errors.
    0 Debug: copy_and_update():        310 - [0x00026C00,      512 B]:         0 B copied,       512 B errors.
    0 Debug: copy_and_update():        320 - [0x00028000,      512 B]:         0 B copied,       512 B errors.
    0 Debug: copy_and_update():        319 - [0x00027E00,      512 B]:         0 B copied,       512 B errors.
    0 Debug: copy_and_update():        329 - [0x00029200,      512 B]:         0 B copied,       512 B errors.
    0 Debug: copy_and_update():        328 - [0x00029000,      512 B]:         0 B copied,       512 B errors.
    0 Debug: copy_and_update():        338 - [0x0002A400,      512 B]:         0 B copied,       512 B errors.
    0 Debug: copy_and_update():        337 - [0x0002A200,      512 B]:         0 B copied,       512 B errors.
    0 Debug: copy_and_update():        347 - [0x0002B600,      512 B]:         0 B copied,       512 B errors.
    0 Debug: copy_and_update():        346 - [0x0002B400,      512 B]:         0 B copied,       512 B errors.
    0 Debug: copy_and_update():        281 - [0x00023200,      512 B]:         0 B copied,       512 B errors.
    0 Debug: copy_and_update():        282 - [0x00023400,      512 B]:         0 B copied,       512 B errors.
    0 Debug: copy_and_update():        285 - [0x00023A00,      512 B]:         0 B copied,       512 B errors.
    0 Debug: copy_and_update():        286 - [0x00023C00,      512 B]:         0 B copied,       512 B errors.
    0 Debug: copy_and_update():        287 - [0x00023E00,      512 B]:         0 B copied,       512 B errors.
    0 Debug: copy_and_update():        290 - [0x00024400,      512 B]:         0 B copied,       512 B errors.
    0 Debug: copy_and_update():        291 - [0x00024600,      512 B]:         0 B copied,       512 B errors.
    0 Debug: copy_and_update():        294 - [0x00024C00,      512 B]:         0 B copied,       512 B errors.
    0 Debug: copy_and_update():        295 - [0x00024E00,      512 B]:         0 B copied,       512 B errors.
    0 Debug: copy_and_update():        296 - [0x00025000,      512 B]:         0 B copied,       512 B errors.
    0 Debug: copy_and_update():        299 - [0x00025600,      512 B]:         0 B copied,       512 B errors.
    0 Debug: copy_and_update():        300 - [0x00025800,      512 B]:         0 B copied,       512 B errors.
    0 Debug: copy_and_update():        303 - [0x00025E00,      512 B]:         0 B copied,       512 B errors.
    0 Debug: copy_and_update():        304 - [0x00026000,      512 B]:         0 B copied,       512 B errors.
    0 Debug: copy_and_update():        305 - [0x00026200,      512 B]:         0 B copied,       512 B errors.
    0 Debug: copy_and_update():        308 - [0x00026800,      512 B]:         0 B copied,       512 B errors.
    0 Debug: copy_and_update():        309 - [0x00026A00,      512 B]:         0 B copied,       512 B errors.
    0 Debug: copy_and_update():        312 - [0x00027000,      512 B]:         0 B copied,       512 B errors.
    0 Debug: copy_and_update():        313 - [0x00027200,      512 B]:         0 B copied,       512 B errors.
    0 Debug: copy_and_update():        314 - [0x00027400,      512 B]:         0 B copied,       512 B errors.
    0 Debug: copy_and_update():        317 - [0x00027A00,      512 B]:         0 B copied,       512 B errors.
    0 Debug: copy_and_update():        318 - [0x00027C00,      512 B]:         0 B copied,       512 B errors.
    0 Debug: copy_and_update():        321 - [0x00028200,      512 B]:         0 B copied,       512 B errors.
    0 Debug: copy_and_update():        322 - [0x00028400,      512 B]:         0 B copied,       512 B errors.
    0 Debug: copy_and_update():        323 - [0x00028600,      512 B]:         0 B copied,       512 B errors.
    0 Debug: copy_and_update():        326 - [0x00028C00,      512 B]:         0 B copied,       512 B errors.
    0 Debug: copy_and_update():        327 - [0x00028E00,      512 B]:         0 B copied,       512 B errors.
    0 Debug: copy_and_update():        330 - [0x00029400,      512 B]:         0 B copied,       512 B errors.
    0 Debug: copy_and_update():        331 - [0x00029600,      512 B]:         0 B copied,       512 B errors.
    0 Debug: copy_and_update():        332 - [0x00029800,      512 B]:         0 B copied,       512 B errors.
    0 Debug: copy_and_update():        335 - [0x00029E00,      512 B]:         0 B copied,       512 B errors.
    0 Debug: copy_and_update():        336 - [0x0002A000,      512 B]:         0 B copied,       512 B errors.
    0 Debug: copy_and_update():        339 - [0x0002A600,      512 B]:         0 B copied,       512 B errors.
    0 Debug: copy_and_update():        340 - [0x0002A800,      512 B]:         0 B copied,       512 B errors.
    0 Debug: copy_and_update():        341 - [0x0002AA00,      512 B]:         0 B copied,       512 B errors.
    0 Debug: copy_and_update():        344 - [0x0002B000,      512 B]:         0 B copied,       512 B errors.
    0 Debug: copy_and_update():        345 - [0x0002B200,      512 B]:         0 B copied,       512 B errors.
    0 Debug: copy_and_update():        348 - [0x0002B800,      512 B]:         0 B copied,       512 B errors.
    0 Debug: copy_and_update():        349 - [0x0002BA00,      512 B]:         0 B copied,       512 B errors.
    0 Debug: copy_and_update():        350 - [0x0002BC00,      512 B]:         0 B copied,       512 B errors.
    0 Debug: [2] <--- split_errors()
    1 Debug: [1] <--- do_rescue()
# Rescue Logfile. Created by GNU ddrescue version 1.17-rc4
# Command line: ./ddrescue /dev/mapper/disk_with_bad_blocks destination.img logfile.log
# current_pos  current_status
0x0002BC00     +
#      pos        size  status
0x00000000  0x00023000  +
0x00023000  0x00009000  -
0x0002C000  0x00024000  +
_______________________________________________
Bug-ddrescue mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-ddrescue

Reply via email to