Description of problem: The following python script can provoke a crash, reliably: import pysvn c = pysvn.Client() c.checkout( 'file:///tmp/svn', 'bug_add_wc') f = file( 'bug_add_wc/client.add.test', 'w' ) f.close() c.add( 'bug_add_wc/client.add.test' ) Before running the script, run svnadmin create /tmp/svn The backtrace shows: #0 0x0000000000000000 in ?? () #1 0x00002b0407a7d6e7 in find_entry (ht=0x3147f0b500, key=0x8a10f58, klen=-1, val=0x0) at tables/apr_hash.c:260 #2 0x00002b0407a7d7ab in apr_hash_get (ht=0x8a10f58, key=0x7fffa7d23818, klen=-1) at tables/apr_hash.c:330 #3 0x00002b0407628cc8 in svn_io_detect_mimetype2 (mimetype=0x7fffa7d23cd0, file=0x897ddf8 "bug_add_wc/client.add.test", mimetype_map=0x3147f0b500, pool=0x8a10a38) at subversion/libsvn_subr/io.c:2551 #4 0x00002b040673ce99 in svn_client__get_auto_props ( properties=<value optimized out>, mimetype=0x7fffa7d23d70, path=0x897ddf8 "bug_add_wc/client.add.test", ctx=0x897d140, pool=0x8a10a38) at subversion/libsvn_client/add.c:181 #5 0x00002b040673d075 in add_file ( path=0x897ddf8 "bug_add_wc/client.add.test", ctx=0x897d140, adm_access=0x8a10ab8, pool=0x8a10a38) at subversion/libsvn_client/add.c:231 #6 0x00002b040673d74a in svn_client_add4 ( path=0x897ddf8 "bug_add_wc/client.add.test", depth=svn_depth_infinity, force=0, no_ignore=0, add_parents=<value optimized out>, ctx=0x897d140, pool=0x8a10a38) at subversion/libsvn_client/add.c:437 #7 0x00002b040673dead in svn_client_add3 (path=0x8a10f58 "test", recursive=<value optimized out>, force=-1, no_ignore=0, ctx=0x2f2f2f2f2f2f2f2f, pool=<value optimized out>) at subversion/libsvn_client/add.c:567 ---Type <return> to continue, or q <return> to quit---q Quit (gdb) f 1 #1 0x00002b0407a7d6e7 in find_entry (ht=0x3147f0b500, key=0x8a10f58, klen=-1, val=0x0) at tables/apr_hash.c:260 260 hash = ht->hash_func(key, &klen); (gdb) p key $1 = (const void *) 0x8a10f58 (gdb) p ht $2 = (apr_hash_t *) 0x3147f0b500 (gdb) p hash_func $3 = {apr_size_t (apr_uint32_t)} 0x2b0407410e30 <hash_func> (gdb) p ht->hash_func $4 = (apr_hashfunc_t) 0 So it seems a NULL function was invoked. Strangely enough, this bug seems to be only reproducable on CentOS 5.3, and not on Fedora 9 (with same pysvn version, but different apr version) or RHEL5.3 (same pysvn version, and same apr version) Version-Release number of selected component (if applicable): apr 1.2.7-11 pysvn 1.6.2-1.el5 How reproducible: always Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
As of CentOS 55 this appears to be fixed... [root@dhcp-64-63 ~]# rm -rf bug_add_wc/ [root@dhcp-64-63 ~]# rm -rf /tmp/svn/ [root@dhcp-64-63 ~]# svnadmin create /tmp/svn [root@dhcp-64-63 ~]# python Python 2.4.3 (#1, Sep 3 2009, 15:37:37) [GCC 4.1.2 20080704 (Red Hat 4.1.2-46)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import pysvn file( 'bug_add_wc/client.add.test', 'w' ) f.close() c.add( 'bug_add_wc/client.add.test' ) >>> c = pysvn.Client() >>> c.checkout( 'file:///tmp/svn', 'bug_add_wc') <Revision kind=number 0> >>> f = file( 'bug_add_wc/client.add.test', 'w' ) >>> f.close() >>> c.add( 'bug_add_wc/client.add.test' ) >>> [root@dhcp-64-63 ~]#