Re: Ideas for improving Concurrency Tests

From: Greg Stark <stark(at)mit(dot)edu>
To: Amit Kapila <amit(dot)kapila(at)huawei(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Ideas for improving Concurrency Tests
Date: 2013-03-26 16:18:37
Message-ID: CAM-w4HPj0Z76WesmQ0Gm3CEjfyfH5uFbH+1CHQoRsoY6AUUvag@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Mar 26, 2013 at 7:31 AM, Amit Kapila <amit(dot)kapila(at)huawei(dot)com> wrote:
> Above ideas could be useful to improve concurrency testing and can also be
> helpful to generate test cases for some of the complicated bugs for which
> there is no direct test.

I wonder how much explicit sync points would help with testing though.
It seems like they suffer from the problem that you'll only put sync
points where you actually expect problems and not where you don't
expect them -- which is exactly where problems are likely to occur.

Wouldn't it be more useful to implicitly create sync points whenever
synchronization events like spinlocks being taken occur?

And likewise explicitly listing the timing sequences to test seems
unconvincing. If we could arrange for two threads to execute every
possible interleaving of code by exhaustively trying every combination
that would be far more convincing. Most bugs are likely to hang out in
combinations we don't see in practice -- for instance having a tuple
deleted and a new one inserted in the same slot in the time a
different transaction was context switched out.

--
greg

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2013-03-26 16:39:23 Re: Page replacement algorithm in buffer cache
Previous Message Kevin Grittner 2013-03-26 15:26:04 Re: odd behavior in materialized view