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

Re: Weirdness while testing 1.4.0-rc2 (svnserve processes that don't die)

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2006-07-18 14:32:55 CEST

"Garrett Rooney" <rooneg@electricjellyfish.net> writes:

> [[[
> Fix another global pool destruction ordering problem in the bdb code.
>
> Previously, we potentially tried to use the bdb cache mutex after its
> pool had already been cleared.
>
> * subversion/libsvn_fs_base/bdb/env.c
> (clear_cache_lock): New cleanup function, NULLs out the bdb cache lock.
> (svn_fs_bdb__init): Set pool cleanup on the bdb cache pool.
> (acquire_cache_mutex, release_cache_mutex): Don't do anything to the
> lock if it's NULL.
> ]]]

That's fixed the mutex read error, but using trunk@20716 I still get:

$ svnadmin create repo --fs-type bdb
$ valgrind -q svnserve -Xr.
$ svn ls svn://localhost/repo

==4171== Invalid read of size 4
==4171== at 0x41E927A: find_entry (apr_hash.c:259)
==4171== by 0x41E9797: apr_hash_set (apr_hash.c:342)
==4171== by 0x43F1D8E: svn_fs_bdb__close (env.c:606)
==4171== by 0x43FA882: cleanup_fs (fs.c:185)
==4171== by 0x43FA916: cleanup_fs_apr (fs.c:291)
==4171== by 0x41F211E: run_cleanups (apr_pools.c:2034)
==4171== by 0x41F143B: pool_clear_debug (apr_pools.c:1372)
==4171== by 0x41F1624: pool_destroy_debug (apr_pools.c:1457)
==4171== by 0x41F1423: pool_clear_debug (apr_pools.c:1369)
==4171== by 0x41F1624: pool_destroy_debug (apr_pools.c:1457)
==4171== by 0x41F16EC: apr_pool_destroy_debug (apr_pools.c:1499)
==4171== by 0x41F1241: apr_pool_terminate (apr_pools.c:1269)
==4171== Address 0x446D530 is 32 bytes inside a block of size 40 free'd
==4171== at 0x401D37E: free (vg_replace_malloc.c:233)
==4171== by 0x41F14EA: pool_clear_debug (apr_pools.c:1395)
==4171== by 0x41F1624: pool_destroy_debug (apr_pools.c:1457)
==4171== by 0x41F1423: pool_clear_debug (apr_pools.c:1369)
==4171== by 0x41F1624: pool_destroy_debug (apr_pools.c:1457)
==4171== by 0x41F16EC: apr_pool_destroy_debug (apr_pools.c:1499)
==4171== by 0x41F1241: apr_pool_terminate (apr_pools.c:1269)
==4171== by 0x41F26B7: apr_terminate (start.c:82)
==4171== by 0x42C1AE1: exit (exit.c:54)
==4171== by 0x804C057: main (main.c:698)
==4171==
==4171== Jump to the invalid address stated on the next line
==4171== at 0x41414141: ???
==4171== by 0x41E9797: apr_hash_set (apr_hash.c:342)
==4171== by 0x43F1D8E: svn_fs_bdb__close (env.c:606)
==4171== by 0x43FA882: cleanup_fs (fs.c:185)
==4171== by 0x43FA916: cleanup_fs_apr (fs.c:291)
==4171== by 0x41F211E: run_cleanups (apr_pools.c:2034)
==4171== by 0x41F143B: pool_clear_debug (apr_pools.c:1372)
==4171== by 0x41F1624: pool_destroy_debug (apr_pools.c:1457)
==4171== by 0x41F1423: pool_clear_debug (apr_pools.c:1369)
==4171== by 0x41F1624: pool_destroy_debug (apr_pools.c:1457)
==4171== by 0x41F16EC: apr_pool_destroy_debug (apr_pools.c:1499)
==4171== by 0x41F1241: apr_pool_terminate (apr_pools.c:1269)
==4171== Address 0x41414141 is not stack'd, malloc'd or (recently) free'd
==4171==
==4171== Process terminating with default action of signal 11 (SIGSEGV)
==4171== Access not within mapped region at address 0x41414141
==4171== at 0x41414141: ???
==4171== by 0x41E9797: apr_hash_set (apr_hash.c:342)
==4171== by 0x43F1D8E: svn_fs_bdb__close (env.c:606)
==4171== by 0x43FA882: cleanup_fs (fs.c:185)
==4171== by 0x43FA916: cleanup_fs_apr (fs.c:291)
==4171== by 0x41F211E: run_cleanups (apr_pools.c:2034)
==4171== by 0x41F143B: pool_clear_debug (apr_pools.c:1372)
==4171== by 0x41F1624: pool_destroy_debug (apr_pools.c:1457)
==4171== by 0x41F1423: pool_clear_debug (apr_pools.c:1369)
==4171== by 0x41F1624: pool_destroy_debug (apr_pools.c:1457)
==4171== by 0x41F16EC: apr_pool_destroy_debug (apr_pools.c:1499)
==4171== by 0x41F1241: apr_pool_terminate (apr_pools.c:1269)
==4171==
==4171== Invalid free() / delete / delete[]
==4171== at 0x401D37E: free (vg_replace_malloc.c:233)
==4171== by 0x43A211B: free_mem (dl-libc.c:217)
==4171== by 0x43A1E64: __libc_freeres (set-freeres.c:49)
==4171== by 0x40194C1: _vgnU_freeres (vg_preloaded.c:60)
==4171== by 0x41E927C: find_entry (apr_hash.c:259)
==4171== by 0x41E9797: apr_hash_set (apr_hash.c:342)
==4171== by 0x43F1D8E: svn_fs_bdb__close (env.c:606)
==4171== by 0x43FA882: cleanup_fs (fs.c:185)
==4171== by 0x43FA916: cleanup_fs_apr (fs.c:291)
==4171== by 0x41F211E: run_cleanups (apr_pools.c:2034)
==4171== by 0x41F143B: pool_clear_debug (apr_pools.c:1372)
==4171== by 0x41F1624: pool_destroy_debug (apr_pools.c:1457)
==4171== Address 0x4214CB0 is not stack'd, malloc'd or (recently) free'd
Segmentation fault

-- 
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Jul 18 14:33:27 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.