Re: BUG #12918: Segfault in BackendIdGetTransactionIds

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #12918: Segfault in BackendIdGetTransactionIds
Дата
Msg-id 17494.1427733227@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #12918: Segfault in BackendIdGetTransactionIds  (root@simply.name)
Ответы Re: BUG #12918: Segfault in BackendIdGetTransactionIds  (Vladimir Borodin <root@simply.name>)
Re: BUG #12918: Segfault in BackendIdGetTransactionIds  (Stephen Frost <sfrost@snowman.net>)
Список pgsql-bugs
root@simply.name writes:
> After upgrading from 9.3.6 to 9.4.1 (both installed from packages on
> yum.postgresql.org) we have started getting segfaults of different backends.
> Backtraces of all coredumps look similar:
> (gdb) bt
> #0  0x000000000066bf9b in BackendIdGetTransactionIds (backendID=<value
> optimized out>, xid=0x7f2a1b714798, xmin=0x7f2a1b71479c) at sinvaladt.c:426
> #1  0x00000000006287f4 in pgstat_read_current_status () at pgstat.c:2871
> #2  0x0000000000628879 in pgstat_fetch_stat_numbackends () at pgstat.c:2342

Hmm ... looks to me like BackendIdGetTransactionIds is simply busted.
It supposes that there are no inactive entries in the sinval array
within the range 0 .. lastBackend.  But there can be, in which case
dereferencing stateP->proc crashes.  The reason it's hard to reproduce
is the relatively narrow window between where pgstat_read_current_status
saw the backend as active and where we're inspecting its sinval entry.

            regards, tom lane

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

Предыдущее
От: root@simply.name
Дата:
Сообщение: BUG #12918: Segfault in BackendIdGetTransactionIds
Следующее
От: Vladimir Borodin
Дата:
Сообщение: Re: BUG #12918: Segfault in BackendIdGetTransactionIds