Uploaded image for project: 'CernVM'
  1. CernVM
  2. CVM-880

Publishing fails when removing entries and renaming parent directory

    Details

    • Type: Bug
    • Status: Closed
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: CernVM-FS 2.1.20
    • Fix Version/s: CernVM-FS 2.2.0
    • Component/s: CVMFS
    • Labels:
      None
    • Platforms:
      x86_64-slc6-gcc48-opt

      Description

      As Predrag found in alice.cern.ch, the CVMFS server fails when directory entries are removed and the parent directory is renamed in the same transaction. Example with a repository containing foo/v1.0:

      $ cvmfs_server transaction test.local 
      $ cd /cvmfs/test.local/
      $ rm -fR foo/v1.0/
      $ mv foo/ FOO
      $ cvmfs_server publish test.local
      [crash!]

      At first glance this happens because the rm -fR foo/v1.0 creates a whiteout file in foo. Afterwards mv foo FOO does an up-copy of the entire foo directory into FOO (including the whiteout for foo/v1.0) and creates a whiteout for foo in the root directory.

      CVMFS treats foo to be removed entirely and FOO to be a completely new directory. Both cases will result in a full recursive traversal removing respectively adding all entries found in there. The latter hits the (now probably useless) whiteout for foo/v1.0 which it cannot read and crashes.

      The above is an educated guess and up for further investigation...

        Attachments

          Activity

          Hide
          rmeusel Rene Meusel (Inactive) added a comment -

          Writing a regression test for this issue, I found that the problem only shows up, if the parent directory contains only one entry. Therefore, if there would be a v1.1 accompanying the v1.0 and one of them is deleted, it wouldn't crash. Same behaviour on the latest Ubuntu with a recent AUFS.

          I'll probably just ignore the AUFS white outs when recursively adding entire directories.

          Show
          rmeusel Rene Meusel (Inactive) added a comment - Writing a regression test for this issue, I found that the problem only shows up, if the parent directory contains only one entry. Therefore, if there would be a v1.1 accompanying the v1.0 and one of them is deleted, it wouldn't crash. Same behaviour on the latest Ubuntu with a recent AUFS. I'll probably just ignore the AUFS white outs when recursively adding entire directories.
          Hide
          rmeusel Rene Meusel (Inactive) added a comment -

          Pull Request containing regression test and fix.

          Show
          rmeusel Rene Meusel (Inactive) added a comment - Pull Request containing regression test and fix.
          Show
          c7d0250fb9e3f137c236 dennis otis (Inactive) added a comment - http://akron.com/akron-ohio-sports-news.asp?aID=31756
          Show
          c7d0250fb9e3f137c236 dennis otis (Inactive) added a comment - ufc 203 live stream online free

            People

            • Assignee:
              rmeusel Rene Meusel (Inactive)
              Reporter:
              rmeusel Rene Meusel (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: