Deadlock occurs on Replication! -
01-07-2006
, 10:22 PM
Hi,
I hava a master and a client in replication application. In the master
1000000 records are inserted into BDB successively within a loop, while
in the client I print the BDB records amount every 5 secords through
calling the function "stat_print".
When the master inserted approximately 200000 or 300000 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 "stat_print". So I concluded this was caused by the
client.
After debugging with GDB, I found both "stat_print" and
"rep_process_message" called function "lock_get_internal", and the two
threads stopped at this function. Though I have not explored deeply, I
think the two threads respectively calling "stat_print" and
"rep_process_message" conflict when they require read lock and write
lock respectively.
Untill now I don' t know to solve this problem, any hints would be
greatly appreciated.
Regards,
William |