Possible data race on Windows (src/bin/pg_dump/parallel.c)

Поиск
Список
Период
Сортировка
От Ranier Vilela
Тема Possible data race on Windows (src/bin/pg_dump/parallel.c)
Дата
Msg-id CAEudQAqDPXE0imkFrE-YRWr0ezzbZEYQW-dD77eq97Qk+zGesA@mail.gmail.com
обсуждение исходный текст
Список pgsql-hackers
Hi,

Per Coverity.

CID 1542943: (#1 of 1): Data race condition (MISSING_LOCK)
3. missing_lock: Accessing slot->AH without holding lock signal_info_lock. Elsewhere, ParallelSlot.AH is written to with signal_info_lock held 1 out of 1 times (1 of these accesses strongly imply that it is necessary).

The function DisconnectDatabase effectively writes the ParallelSlot.AH.
So the call in the function archive_close_connection:

if (slot->AH)
DisconnectDatabase(&(slot->AH->public));

It should also be protected on Windows, correct?

Patch attached.

best regards,
Ranier Vilela
Вложения

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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: tablecmds.c/MergeAttributes() cleanup
Следующее
От: Tom Lane
Дата:
Сообщение: Re: A failure in prepared_xacts test