[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r20717 - trunk/subversion/libsvn_fs_base/bdb

From: Daniel Rall <dlr_at_collab.net>
Date: 2006-07-18 19:05:49 CEST

On Tue, 18 Jul 2006, rooneg@tigris.org wrote:
...
> Fix yet another global pool destruction ordering bug in the bdb cache.
>
> * subversion/libsvn_fs_base/bdb/env.c
> (svn_fs_bdb__close): Don't bother removing entries from the bdb cache
> if bdb_cache_lock is NULL, since that indicates that we're already in
> global pool destruction time and the bdb cache pool has already been
> destroyed.
...
> --- trunk/subversion/libsvn_fs_base/bdb/env.c (original)
> +++ trunk/subversion/libsvn_fs_base/bdb/env.c Tue Jul 18 09:43:53 2006
> @@ -603,7 +603,11 @@
> }
> else
> {
> - apr_hash_set(bdb_cache, &bdb->key, sizeof bdb->key, NULL);
> + /* If the bdb cache lock has been set to NULL that means we are
> + shutting down, and the pool that holds the bdb cache has already
> + been destroyed, so accessing it here would be a Bad Thing (tm) */
> + if (bdb_cache_lock)
> + apr_hash_set(bdb_cache, &bdb->key, sizeof bdb->key, NULL);
> err = bdb_close(bdb);
> release_cache_mutex();
> }

Is there a race condition between when we check whether bdb_cache_lock
is non-null and when we use it?

  • application/pgp-signature attachment: stored
Received on Tue Jul 18 19:07:00 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.