Put with secondary associate() indices hangs WAITing in 4.3.29 - 04-05-2006 , 04:51 PM
I have a program which needs to work with the 4.3.29 version of
Berkeley DB (I have tested with 4.4.20 and it seems to operate
as I was expecting).
1./ My program opens 4 DB_HASH databases.
2./ The first is a main database while the rest are secondary
indices for the first (via assocate() with DB_AUTO_COMMIT
rather that 0 in the flags field. The manuals all have zero in
the flags field, but with a zero I get an illegal argument value
When I run this progam I can see that the first put(), which is
performed inside a transaction block, is started and that the
request for the secondary index key recovery is called.
Then it blocks.
Using 'db_stat -Co' I can see that there is a WAIT lock and
when I run 'db_deadlock' the program then terminates with a
message saying DB_LOCK_DEADLOCK. Since the deadlock
appears to be in a part of the code I don't control I'm not sure
how I should proceed in tracking the problem down (I'm also
not sure whether I'm not simply running into bug which needs
the latest version to get around it)?
Was this something which was changed between the 4.3.29
version and the 4.4.20 version (and is there a way around the
problem)? I'm using the C API if that makes a difference?
Any suggestions on how to find out what the problem is.
Re: Put with secondary associate() indices hangs WAITing in 4.3.29 - 04-06-2006 , 06:55 PM
This sounds like it must be a bug in DB 4.3.29 that was fixed in 4.4,
but I'm not aware of any fixes that would change this behavior.
You mention needing to work with 4.3.29 -- if a patch was required to
fix a problem, would that be an option for you?
Regardless, the easiest way for us to work out what is going on here
would be if you can send a small, self-contained test case to
support (AT) sleepycat (DOT) com. Then we should be able to see what is causing
the deadlock (and why it isn't happening with 4.4).