[
https://issues.apache.org/jira/browse/SVN-4157?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14931615#comment-14931615
]
Ivan Zhakov edited comment on SVN-4157 at 10/9/15 10:32 PM:
------------------------------------------------------------
Probably related to issue SVN-2935.
was (Author: philipm):
{noformat:nopanel=true}
Probably related to issue 2935.
{noformat}
> 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
> Fix For: 1.9-consider
>
>
> See this thread:
> http://mail-archives.apache.org/mod_mbox/subversion-dev/201204.mbox/%[email protected]%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.3.4#6332)