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

FSFS race on POSIX platforms

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: all
    • Fix Version/s: 1.2.0
    • Component/s: libsvn_fs_fs
    • Labels:
      None

      Description

      http://svn.haxx.se/dev/archive-2005-04/0355.shtml

      The FSFS implementation uses an exclusive write lock to serialize the final phase of a commit (and in 1.2 to serialize manipulate file locks). This is implemented by apr_lock_file, which on POSIX platforms means using fcntl to acquire an exclsuive lock on a file. The problem is that such locks are per-process, not per thread or file descriptor. This means that two threads in the same process can have the write lock at the same time. This means that using FSFS on the same repository in multiple threads can lead to lost commits.

      The proposed solution (se thread above) can't be implemented in 1.1.x or earlier, since it requires a new API. Putting in 1.2.0 since we must at least introduce that new API before releasing 1.2.0.

      Note that Windows is not affected by this problem.

      Original issue reported by lundblad

        Attachments

          Activity

            People

            • Assignee:
              ghudson Greg Hudson
              Reporter:
              subversion-importer Subversion Importer
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: