Uploaded image for project: 'Subversion'
  1. Subversion
  2. SVN-3845

protorev file truncated leading to FSFS corruption

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.6.x
    • unscheduled
    • libsvn_fs_fs
    • None

    Description

      A corrupt repository has been observed with a revision file that contains no
      file representations but does have node-revision data that refers to file
      representations in that revision file. The references have plausible offsets and
      sizes, so it appears that the file representations did exist at some point in
      the protorev file, however the content of the final revision file is just the
      data that gets written by commit_body().
      
      I can duplicate the corruption using a debugger.  Make a commit that modifies
      one or more files, stop in the debugger at commit_body(), truncate the protorev
      file to zero bytes, continue the commit. The commit goes through without error
      although the final revision file is corrupt.
      
      It's not possible to delete the protorev file, the commit fails. I suppose
      another way to duplicate the corruption would be if commit_body() were to start
      writing at offset zero rather than appending, that would be similar to
      truncating the file.
      
      I don't know what caused the truncation (or failed append) it could be a
      Subversion bug, an APR bug, an OS bug or a hardware bug. I plan to modify FSFS
      to fail the commit if the offsets observed in write_final_rev() are larger than
      the initial offset when commit_body() starts.
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              philipm Philip Martin
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: