Deadlock occurs on Replication! -
01-08-2006
, 08:31 PM
Hi,
I have a master and a client in my replication application. In the
master 1000000 records are insert into BDB successively within a loop,
while in the client I print BDB records amount every 5 seconds through
calling fuction "stat_printf".
When the master inserts approximately 300000 or 200000 records(the
actual number differs every time), both the master and client are
suspended. I tried many times, but the same problem always occured
unless I removed the call to "stat_printf". So I concluded this was
caused by the client.
After debugging with GDB, I found both "stat_printf" and
"rep_process_message" called the "lock_get_internal", and the two
threads stopped there. Though I have not explored deeply, I think the
two threads respectively calling "stat_printf" and
"rep_process_message" conflict when they require read and write lock
respectively.
Untill now I don't know how to solve this problem. Any hints would be
greatly appreciated.
Regards,
William |