Re: BUG #5918: SummarizeOldestCommittedSxact assertion failure

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Heikki Linnakangas" <heikki(dot)linnakangas(at)enterprisedb(dot)com>, "YAMAMOTO Takashi" <yamt(at)mwd(dot)biglobe(dot)ne(dot)jp>
Cc: "Dan Ports" <drkp(at)csail(dot)mit(dot)edu>,<pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #5918: SummarizeOldestCommittedSxact assertion failure
Date: 2011-03-08 16:27:44
Message-ID: 4D7604A0020000250003B5FC@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> wrote:
> On 08.03.2011 02:37, YAMAMOTO Takashi wrote:

>> i got the following assertion failure. given that availableList
>> is not empty and SxactGlobalXminCount == 0, i guess it was raced
>> with ReleasePredicateLocks.
>
> Yeah, that's what it looks like. One backend calls
> RegisterSerializableTransaction() while all the serializablexact
> slots are in use. So it releases SerializableXactHashLock and
> calls SummarizeOldestCommittedSxact(). Before
> SummarizeOldestCommittedSxact() acquires
> SerializableFinishedListLock, another backend calls
> ReleasePredicateLocks(false), triggering cleanup of old predicate
> locks, and ClearOldPredicateLocks() clears all old locks. Now when
> SummarizeOldestCommittedSxact() finally gets the lock, it sees
> that there are no old transactions to summarize, and trips the
> assertion.
>
> I think we need to just treat an empty list as normal in
> SummarizeOldestcommittedSxact(), patch attached.

Looks good. I suggest we get that one in before the alpha is cut.
Especially since Dan was able to hit that same assertion an hour
into DBT-2 testing, and didn't hit problems with this patch.

> Thanks for yet another excellent bug report!

Indeed! I'm quite curious about the testing environment which is
finding these, and very much appreciate all the work to help in
making this feature so solid before we even hit an alpha release.

-Kevin

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Heikki Linnakangas 2011-03-08 19:07:27 Re: BUG #5918: SummarizeOldestCommittedSxact assertion failure
Previous Message Tom Lane 2011-03-08 16:12:24 Re: CREATEROLE does not permit commenting on newly-created roles