Uploaded image for project: 'UrBackup Server'
  1. US-87

assert(dstfsize==tfilesize) in urbackupserver/server_hash.cpp:1072 failing


    • Type: Bug
    • Status: Completed (View workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.4.9
    • Fix Version/s: 2.0.1
    • Component/s: Backend
    • Labels:
    • Environment:

      Debian 7, urbackup 1.4.9 server.
      Debian 6, urbackup client

    • Sprint:


      I found one of my incremental file backups was causing the urbackup server to crash out (web interface stopped responding, server process gone away). So I ran the server in a tmux session in the foreground with gdb and found assert(dstfsize==tfilesize) in urbackupserver/server_hash.cpp:1072 was failing. The file in question was a munin cache file around 1250 bytes with the target file size being about 6 bytes larger than what the patch code had generated.

      To get my backups running again I did this:

      — clean/urbackup-server-1.4.9/urbackupserver/server_hash.cpp 2014-11-09 21:54
      :16.000000000 +0000
      +++ urbackup-server-1.4.9/urbackupserver/server_hash.cpp 2015-09-26 17:23
      :31.911048148 +0100
      @@ -1069,7 +1069,11 @@

      • assert(dstfsize==tfilesize);
        + Server->Log("dstfsize "nconvert(dstfsize)" tfilesize "+nconvert(tfilesize), LL_DEBUG);
        + if (dstfsize != tfilesize) { + Server->Log(L"Error patched file wrong size "+dest, LL_ERROR); + return false; + }


      IFile *f_hash_output=openFileRetry(hash_output, MODE_READ);

      The incremental file backup still failed but at least without taking out the server, and I was then able to complete a full file backup.

      I do have logs but there's no mention of the assertion failure in them. As an aside, it would be handy to have assertion failures logged correctly and perhaps some flushing is necessary to get the logging out before the process exited. Without it I am writing some of the details of the file that caused the problem from memory.

      Now, my incremental file backups are still failing with about 30 instances of:

      Storing file failed -1

      so I think I'm still hitting the problem and my patch above isn't recording enough context to work out what's going on.




            • Assignee:
              uroni Martin Raiber
              dickon Dickon Reed
            • Votes:
              0 Vote for this issue
              2 Start watching this issue


              • Created: