From: Joseph Artsimovich <joseph_a@mail.ru>
To: pgsql-general@postgresql.org
Subject: undetected deadlock
Date: Thu, 13 Dec 2001 01:51:08 +0300
Message-ID: <E16EIDU-000Dta-00@f9.mail.ru> (raw)
Hi,
I had a problem in my program (used the wrong mode for locking),
which caused undetected deadlocks. When I tried to reproduce the
problem, I did the following:
1. Create the test table and insert some rows there.
2. Start 2 psql sessions.
3. Execute "begin; lock table test in share mode;" in each session.
4. Execute "update test set data='something'" in each session.
On step 4 (1st session) I've got an undetected deadlock. The
processes' states were "idle waiting" and "idle in transatcion". The
most interesting thing is that I've done the same test before, and
then the deadlock was detected on step 4 (2nd session). Restarting
postgres does not change anything, the deadlock is still not
detected.
I use Postgresql 7.1.3 on RedHat 7.1.
My original problematic program can be downloaded from here:
http://www.dkd.lt/~joseph/test.tar.gz
It's a database session handler written in php. To trigger the
problem, run:
ab -n 100 -c 10 http://yourhost/path_to_the_program/index.php
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: joseph_a@mail.ru
Subject: Re: undetected deadlock
In-Reply-To: <E16EIDU-000Dta-00@f9.mail.ru>
References: <E16EIDU-000Dta-00@f9.mail.ru>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox