[pgpool-committers: 993] pgpool: Fix possible deadlock during failover with watchdog enabled
nagata at sraoss.co.jp
Fri May 17 12:09:45 JST 2013
Fix possible deadlock during failover with watchdog enabled
After backend DB failure is detected, degenerate_backend_set() sends a failover
request signal within a semaphore lock. In addition, when watchdog enabled, this
function also sends packets to other pgpools to propagate the failover request.
However, if the other pgpool does the same simultaneously , a deadlock occurs,
because the failover request have to wait for the lock of each other . Responses
of the packets never return, so both pgpools are blocked.
If there are lots of client, the deadlock will occur more frequently because a
lots of simultaneous failover requests and locks will occur.
To resolve it, return the response packet before the failover request is signaled.
Once the response is returned the semaphore is unlocked soon, and deadlock can be
This is reported in Bug track #54 by arshu arora
watchdog/wd_child.c | 39 +++++++++++++++++++++++++++++++++++----
1 files changed, 35 insertions(+), 4 deletions(-)
More information about the pgpool-committers