Troy Heber <[EMAIL PROTECTED]> writes: > It's not an optimization bug, compiling O0 does not help. We know that > lt-fs-base-test 2, creates and closes a new db, it then creates a new > fs object and tries to re-open the db. The call to apr_hash_get > returns NULL, so it's not finding the object in the hash.
Returning NULL is wrong. > The call > continues on and tries to open the db using libdb4.4 via > __env_open_pp, which eventually leads to __envreg_add and the error > message. I haven't built a debug version of libdb yet, I'm going to do > that this morning and walk through. From, what I'm guessing I don't > think the apr_hash_get lookup should have failed, so the problem might > be that direction, I need to build libapr debug as well. Correct, Subversion's DB_ENV cache is failing. On i386 I get: (gdb) b env.c:622 (gdb) shell rm -rf test-repo-open-berkeley (gdb) r 2 Breakpoint 2 622 bdb = bdb_cache_get(&key, &panic); (gdb) p sizeof(key) $8 = 12 (gdb) x/12b &key 0xbffff7f0: 0x04 0x09 0x00 0x00 0x00 0x00 0x00 0x00 0xbffff7f8: 0xe7 0x65 0x2a 0x00 (gdb) c Breakpoint 2 622 bdb = bdb_cache_get(&key, &panic); (gdb) x/12b &key 0xbffff7f0: 0x04 0x09 0x00 0x00 0x00 0x00 0x00 0x00 0xbffff7f8: 0xe7 0x65 0x2a 0x00 (gdb) x/12b bdb_cache[0].array[3][0].key 0xbffff7f0: 0x04 0x09 0x00 0x00 0x00 0x00 0x00 0x00 0xbffff7f8: 0xe7 0x65 0x2a 0x00 (gdb) n 623 if (panic) (gdb) p bdb $7 = (bdb_env_t *) 0x8072618 The first time the breakpoint is reached it's from the svn_test__create_fs line, the second time it's from the svn_fs_open_berkeley line. The key has the same value in each case, and the second time that value is present in the cache, so the hash lookup doesn't return NULL. In the case above the key is located in slot [3] in the hash; that will vary depending on what bytes comprise the key, but you should be able to find it because there are only 15 slots and all but one should be zero, e.g. (gdb) p bdb_cache[0].array[1] $9 = (apr_hash_entry_t *) 0x0 (gdb) p bdb_cache[0].array[3] $10 = (apr_hash_entry_t *) 0x8072d30 -- Philip Martin -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]