You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@subversion.apache.org by "Daniel Shahaf (äñ§€¥£¢ JIRA)" <ji...@apache.org> on 2017/08/03 15:33:02 UTC

[jira] [Commented] (SVN-4157) BDB incompatible with event MPM

    [ https://issues.apache.org/jira/browse/SVN-4157?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16112940#comment-16112940 ] 

Daniel Shahaf (äñ§€¥£¢) commented on SVN-4157:
----------------------------------------------

Documented: https://subversion.apache.org/docs/release-notes/1.7#httpd-2.4-support

> BDB incompatible with event MPM
> -------------------------------
>
>                 Key: SVN-4157
>                 URL: https://issues.apache.org/jira/browse/SVN-4157
>             Project: Subversion
>          Issue Type: Bug
>          Components: libsvn_fs_base
>    Affects Versions: trunk
>            Reporter: Philip Martin
>
> See this thread:
> http://mail-archives.apache.org/mod_mbox/subversion-dev/201204.mbox/%3C87ty129j5h.fsf@stat.home.lan%3E
> http://svn.haxx.se/dev/archive-2012-04/0017.shtml
> The event MPM is the default MPM for Apache 2.4 having been experimental in 2.2.  The event MPM is incompatible with Subversion's BDB backend.
> The problem is Subversion's per-thread BDB error handling structures. Subversion assumes that the same thread will allocate and release these structures, i.e. that the access will be by a single thread. The event MPM switches threads
> although the access is probably "one thread at a time".
> This patch causes assertion failures with the event MPM:
> {code}
> Index: subversion/libsvn_fs_base/bdb/env.c
> ===================================================================
> --- subversion/libsvn_fs_base/bdb/env.c	(revision 1309593)
> +++ subversion/libsvn_fs_base/bdb/env.c	(working copy)
> @@ -186,6 +186,7 @@ get_error_info(const bdb_env_t *bdb)
>    if (!priv)
>      {
>        priv = calloc(1, sizeof(bdb_error_info_t));
> +      ((struct bdb_error_info_t *)priv)->id = pthread_self();
>        apr_threadkey_private_set(priv, bdb->error_info);
>      }
>    return priv;
> @@ -524,6 +525,7 @@ svn_fs_bdb__close(bdb_env_baton_t *bdb_baton)
>  
>    SVN_ERR_ASSERT(bdb_baton->env == bdb_baton->bdb->env);
>    SVN_ERR_ASSERT(bdb_baton->error_info->refcount > 0);
> +  SVN_ERR_ASSERT(pthread_equal(bdb_baton->error_info->id, pthread_self()));
>  
>    /* Neutralize bdb_baton's pool cleanup to prevent double-close. See
>       cleanup_env_baton(). */
> Index: subversion/libsvn_fs_base/bdb/env.h
> ===================================================================
> --- subversion/libsvn_fs_base/bdb/env.h	(revision 1309593)
> +++ subversion/libsvn_fs_base/bdb/env.h	(working copy)
> @@ -71,6 +71,8 @@ typedef struct bdb_error_info_t
>       instances that refer to this object. */
>    unsigned refcount;
>  
> +  pthread_t id;
> +
>  } bdb_error_info_t;
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)