pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kevin Grittner <kgrittn@ymail.com>
To: sean@chittenden.org <sean@chittenden.org>
To: pgsql-bugs@postgresql.org <pgsql-bugs@postgresql.org>
Subject: Re: BUG #13667: SSI violation...
Date: Fri, 9 Oct 2015 21:48:56 +0000 (UTC)
Message-ID: <1810271785.1293615.1444427336478.JavaMail.yahoo@mail.yahoo.com> (raw)
In-Reply-To: <20151008100036.8427.63845@wrigleys.postgresql.org>
References: <20151008100036.8427.63845@wrigleys.postgresql.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

On Thursday, October 8, 2015 5:01 AM, "sean@chittenden.org" <sean@chittenden.org> wrote:

> A few weeks back I was pointed in the direction of a bug that appears to be
> an SSI violation.  The repro case below is written using bash and psql.
>
> In a tight loop, we would expect 50% of these transactions to fail.
> Instead, periodically we're seeing both transaction commit successfully.
> The concern is that PostgreSQL thinks these transactions are commutable or
> the SIREAD lock isn't erected correctly.
>
> https://github.com/gfredericks/pg-serializability-bug
>
> The two concurrent transactions required to tickle this bug are:
>
> BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;
> INSERT INTO things (id) VALUES ('A');
> SELECT id FROM things;
> COMMIT;
>
> BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;
> INSERT INTO things (id) VALUES ('B');
> SELECT id FROM things;
> COMMIT;

I agree this is a bug, and it behave like a race condition with a
very narrow window of time for the second process to hit.  It has
proven very hard to find the cause.  So far every attempt to
instrument the code to catch the bug in progress has distorted the
timings enough to prevent the bug from showing.  Next time I take a
run at this I think I need to insert delays at suspicious points in
the code to try to provoke it at greater volume.  If anyone else
wants to take a shot at that and show me what they found that does
that, it would expedite getting a fix.

--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (5+ messages)  latest in thread

Message-ID: <1810271785.1293615.1444427336478.JavaMail.yahoo@mail.yahoo.com>
Permalink:  ../1810271785.1293615.1444427336478.JavaMail.yahoo@mail.yahoo.com/
Also on:    postgresql.org/message-id/1810271785.1293615.1444427336478.JavaMail.yahoo@mail.yahoo.com

 · 

reply

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-bugs@postgresql.org
  Cc: kgrittn@ymail.com, sean@chittenden.org
  Subject: Re: BUG #13667: SSI violation...
  In-Reply-To: <1810271785.1293615.1444427336478.JavaMail.yahoo@mail.yahoo.com>
  References: <20151008100036.8427.63845@wrigleys.postgresql.org> <1810271785.1293615.1444427336478.JavaMail.yahoo@mail.yahoo.com>

* 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