diff options
author | Masahiko Sawada <msawada@postgresql.org> | 2023-07-26 14:41:23 +0900 |
---|---|---|
committer | Masahiko Sawada <msawada@postgresql.org> | 2023-07-26 14:41:23 +0900 |
commit | b4f14d2e433bf9f2499f07bcaca07b9ff13d641b (patch) | |
tree | 5a0461885cde63926303622556ad768d2355aa43 /src/backend/utils/adt/jsonpath.c | |
parent | 35c85c3c9b90eb70937c8f409d2e7615b2bdb538 (diff) | |
download | postgresql-b4f14d2e433bf9f2499f07bcaca07b9ff13d641b.tar.gz postgresql-b4f14d2e433bf9f2499f07bcaca07b9ff13d641b.zip |
Fix crash with RemoveFromWaitQueue() when detecting a deadlock.
Commit 5764f611e used dclist_delete_from() to remove the proc from the
wait queue. However, since it doesn't clear dist_node's next/prev to
NULL, it could call RemoveFromWaitQueue() twice: when the process
detects a deadlock and then when cleaning up locks on aborting the
transaction. The waiting lock information is cleared in the first
call, so it led to a crash in the second call.
Backpatch to v16, where the change was introduced.
Bug: #18031
Reported-by: Justin Pryzby, Alexander Lakhin
Reviewed-by: Andres Freund
Discussion: https://postgr.es/m/ZKy4AdrLEfbqrxGJ%40telsasoft.com
Discussion: https://postgr.es/m/18031-ebe2d08cb405f6cc@postgresql.org
Backpatch-through: 16
Diffstat (limited to 'src/backend/utils/adt/jsonpath.c')
0 files changed, 0 insertions, 0 deletions