pgsql: Clear MyProc and MyProcSignalState before they become invalid.

Поиск
Список
Период
Сортировка
От Robert Haas
Тема pgsql: Clear MyProc and MyProcSignalState before they become invalid.
Дата
Msg-id E1W9RBC-00038o-D7@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Clear MyProc and MyProcSignalState before they become invalid.

Evidence from buildfarm member crake suggests that the new test_shm_mq
module is routinely crashing the server due to the arrival of a SIGUSR1
after the shared memory segment has been unmapped.  Although processes
using the new dynamic background worker facilities are more likely to
receive a SIGUSR1 around this time, the problem is also possible on older
branches, so I'm back-patching the parts of this change that apply to
older branches as far as they apply.

It's already generally the case that code checks whether these pointers
are NULL before deferencing them, so the important thing is mostly to
make sure that they do get set to NULL before they become invalid.  But
in master, there's one case in procsignal_sigusr1_handler that lacks a
NULL guard, so add that.

Patch by me; review by Tom Lane.

Branch
------
REL8_4_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/458b20f2da8482bbe8a53604365f38b7e8a606e9

Modified Files
--------------
src/backend/storage/lmgr/proc.c |   34 +++++++++++++++++++++++-----------
1 file changed, 23 insertions(+), 11 deletions(-)


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

Предыдущее
От: Robert Haas
Дата:
Сообщение: pgsql: Clear MyProc and MyProcSignalState before they become invalid.
Следующее
От: Bruce Momjian
Дата:
Сообщение: pgsql: pg_restore: make help output plural for multi-enabled options