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

svnserve + bdb commits which claim to succeed, don't

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 1.4.x
    • 1.4.0
    • svnserve
    • None

    Description

      While testing subversion-1.4.0-rc1 with Berkeley DB 4.4 backends, I (and Garrett
      Rooney, independently) came across some really wierd behavior.  Basically,
      commits appeared to succeed (client-side), but afterward, there was no trace of
      them in the repository.
      
      Some interesting notes:
      
         * the problem occurs when --bdb-txn-nosync is passed to 'svnadmin create'
           when creating the test repositories, but does not occur when BDB txn
           syncing is enabled.
      
         * the problem occurs in svnserve's multi-process mode, but not in multi-
           threaded mode.
      
         * the following patch alleviates the problem:
      
      Index: subversion/svnserve/main.c
      ===================================================================
      --- subversion/svnserve/main.c	(revision 19887)
      +++ subversion/svnserve/main.c	(working copy)
      @@ -705,9 +705,11 @@
                 status = apr_proc_fork(&proc, connection_pool);
                 if (status == APR_INCHILD)
                   {
      +              apr_pool_t *subpool = svn_pool_create(connection_pool);
                     apr_socket_close(sock);
      -              svn_error_clear(serve(conn, &params, connection_pool));
      +              svn_error_clear(serve(conn, &params, subpool));
                     apr_socket_close(usock);
      +              svn_pool_destroy(subpool);
                     exit(0);
                   }
                 else if (status == APR_INPARENT)
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            cmpilato C. Michael Pilato
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: