This is an automated email from the ASF dual-hosted git repository. ztao1987 pushed a commit to branch taoz in repository https://gitbox.apache.org/repos/asf/hawq.git
commit 90125185e1825dc5b6da05e422493b72abc5b495 Author: ztao1987 <[email protected]> AuthorDate: Fri Aug 16 21:55:34 2019 +0800 fix proc wait queue disorder in deadlock scenario --- src/backend/storage/lmgr/proc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/backend/storage/lmgr/proc.c b/src/backend/storage/lmgr/proc.c index 5bb008f..0a6db6c 100644 --- a/src/backend/storage/lmgr/proc.c +++ b/src/backend/storage/lmgr/proc.c @@ -1174,12 +1174,14 @@ CheckDeadLock(void) goto check_done; } + Assert(MyProc->waitLock != NULL); + RemoveFromWaitQueue(MyProc, LockTagHashCode(&(MyProc->waitLock->tag))); + /* * Unlock my semaphore so that the interrupted ProcSleep() call can * finish. */ PGSemaphoreUnlock(&MyProc->sem); - MyProc->waitStatus = STATUS_FOUND; /* * We're done here. Transaction abort caused by the error that ProcSleep
