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

credential caching and pool/session lifetime errors

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2003-11-17 00:37:11 CET

Running the testsuite with the svn client running under valgrind cause
some failures:

FAIL: basic_tests.py 15: basic import of single new file
FAIL: basic_tests.py 22: do not import ignored files in imported dirs
FAIL: diff_tests.py 10: diff when property was changed but text was not
FAIL: diff_tests.py 14: diff text-bases against repository
FAIL: diff_tests.py 15: repos-repos diff on item deleted from HEAD
FAIL: diff_tests.py 17: diff for branches
FAIL: diff_tests.py 19: diff between two file URLs (issue #1311)

All the failures appear to variations on a common theme, here's the
basic test 15 error

==25915== Invalid read of size 1
==25915== at 0x40419DF0: find_entry (apr_hash.c:298)
==25915== by 0x40419F54: apr_hash_get (apr_hash.c:340)
==25915== by 0x40300F45: svn_auth_first_credentials (../svn/subversion/libsvn_subr/auth.c:182)
==25915== by 0x4028CB75: svn_ra_local__open (../svn/subversion/libsvn_ra_local/ra_plugin.c:182)
==25915== by 0x40249C56: svn_client__open_ra_session (../svn/subversion/libsvn_client/ra.c:259)
==25915== by 0x40239B9C: get_ra_editor (../svn/subversion/libsvn_client/commit.c:503)
==25915== by 0x4023A008: svn_client_import (../svn/subversion/libsvn_client/commit.c:625)
==25915== by 0x804D31B: svn_cl__import (../svn/subversion/clients/cmdline/import-cmd.c:113)
==25915== by 0x80503D1: main (../svn/subversion/clients/cmdline/main.c:1207)
==25915== Address 0x41DFB7A4 is 0 bytes inside a block of size 50 free'd
==25915== at 0x40028E7A: free (vg_replace_malloc.c:231)
==25915== by 0x404289C2: pool_clear_debug (apr_pools.c:1425)
==25915== by 0x40428A4E: apr_pool_clear_debug (apr_pools.c:1460)
==25915== by 0x40239EE6: svn_client_import (../svn/subversion/libsvn_client/commit.c:601)
==25915== by 0x804D31B: svn_cl__import (../svn/subversion/clients/cmdline/import-cmd.c:113)
==25915== by 0x80503D1: main (../svn/subversion/clients/cmdline/main.c:1207)

The problem appears to be that the svn_ra_plugin_t->open function pool
parameter is used for allocating auth credentials and those
credentials are required to have a longer lifetime than the connection
that gets opened.

The documentation for open says

   * All RA requests require a @a session_baton; they will continue to
   * use @a pool for memory allocation.

Does that mean it's an error to clear the pool while the session baton
is still in use? Isn't clearing the pool the way connections get
closed?

-- 
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Nov 17 00:38:06 2003

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