Re: BUG #13985: Segmentation fault on PREPARE TRANSACTION

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: BUG #13985: Segmentation fault on PREPARE TRANSACTION
Дата
Msg-id 20160224205237.GA438345@alvherre.pgsql
обсуждение исходный текст
Ответ на BUG #13985: Segmentation fault on PREPARE TRANSACTION  (chris.tessels@inergy.nl)
Ответы Re: BUG #13985: Segmentation fault on PREPARE TRANSACTION
Список pgsql-bugs
chris.tessels@inergy.nl wrote:

>     Core was generated by `postgres: mailinfo_ow mailinfo_ods 10.50.6.6(4188'.
>     Program terminated with signal 11, Segmentation fault.
>
>     #0  MinimumActiveBackends (min=50) at procarray.c:2472
>     2472            if (pgxact->xid == InvalidTransactionId)

It's not surprising that you're not able to make this crash
consistently, because it looks like the problem might be in concurrent
modifications to the PGXACT array.  This routine, MinimumActiveBackends,
walks the PGPROC array explicitely without locks.  There are comments
indicating that this is safe, but evidently something has slipped in
there.

Apparently this code is trying to dereference an invalid pgxact, but
it's not clear to me how this happens.  Those structs are allocated in
advance, and they are referenced in the code via array indexes, so even
if the pgxact doesn't actually hold data about a valid transaction,
dereferencing the XID shouldn't cause a crash.

--
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Kasahara Tatsuhito
Дата:
Сообщение: Re: BUG #13979: Strange pg_stat_statements results with PREPARE/EXECUTE
Следующее
От: asguthrie@gmail.com
Дата:
Сообщение: BUG #13988: "plan should not reference subplan's variable" whilst using row level security