Re: BUG #13985: Segmentation fault on PREPARE TRANSACTION

Поиск
Список
Период
Сортировка
Искать
От
Tom Lane
Тема
Re: BUG #13985: Segmentation fault on PREPARE TRANSACTION
Дата
Msg-id
5857.1456411909@sss.pgh.pa.us
Ответ на
Список
Дерево обсуждения
BUG #13985: Segmentation fault on PREPARE TRANSACTION chris.tessels@inergy.nl
Re: BUG #13985: Segmentation fault on PREPARE TRANSACTION Alvaro Herrera <alvherre@2ndquadrant.com>
Re: BUG #13985: Segmentation fault on PREPARE TRANSACTION Andres Freund <andres@anarazel.de>
Re: BUG #13985: Segmentation fault on PREPARE TRANSACTION "Shulgin, Oleksandr" <oleksandr.shulgin@zalando.de>
Re: BUG #13985: Segmentation fault on PREPARE TRANSACTION Andres Freund <andres@anarazel.de>
Re: BUG #13985: Segmentation fault on PREPARE TRANSACTION "Shulgin, Oleksandr" <oleksandr.shulgin@zalando.de>
Re: BUG #13985: Segmentation fault on PREPARE TRANSACTION Tom Lane <tgl@sss.pgh.pa.us>
Re: BUG #13985: Segmentation fault on PREPARE TRANSACTION Andres Freund <andres@anarazel.de>
Re: BUG #13985: Segmentation fault on PREPARE TRANSACTION Tom Lane <tgl@sss.pgh.pa.us>
Re: BUG #13985: Segmentation fault on PREPARE TRANSACTION Andres Freund <andres@anarazel.de>
Re: BUG #13985: Segmentation fault on PREPARE TRANSACTION Tom Lane <tgl@sss.pgh.pa.us>
Re: BUG #13985: Segmentation fault on PREPARE TRANSACTION "Shulgin, Oleksandr" <oleksandr.shulgin@zalando.de>
Re: BUG #13985: Segmentation fault on PREPARE TRANSACTION Andres Freund <andres@anarazel.de>
Re: BUG #13985: Segmentation fault on PREPARE TRANSACTION Chris Tessels <chris.tessels@inergy.nl>
"Shulgin, Oleksandr"  writes:
> On Wed, Feb 24, 2016 at 10:52 PM, Andres Freund  wrote:
> At the very least ISTM that we have to make pgprocno volatile (or use a
>> memory barrier - but we don't have sufficient support for those in the
>> older branches), and move the PGPROC/PGXACT lookups after the == -1
>> check.

> Use of volatile doesn't change the resulting code dramatically for me.

Marking pgprocno volatile is silly.  What *is* missing is this:

-	ProcArrayStruct *arrayP = procArray;
+	volatile ProcArrayStruct *arrayP = procArray;

which corresponds directly to what the problem is: the storage arrayP
is pointing at may change asynchronously.

			regards, tom lane
В списке pgsql-bugs по дате отправления
От: Shulgin, Oleksandr
Дата:
От: Shulgin, Oleksandr
Дата:
FAQ