From: | Ranier Vilela <ranier(dot)vf(at)gmail(dot)com> |
---|---|
To: | Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Possible data race on Windows (src/bin/pg_dump/parallel.c) |
Date: | 2024-04-29 13:16:33 |
Message-ID: | CAEudQAqDPXE0imkFrE-YRWr0ezzbZEYQW-dD77eq97Qk+zGesA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
Attachment | Content-Type | Size |
---|---|---|
fix-possible-data-race-windows-parallel.patch | application/octet-stream | 598 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2024-04-29 13:45:16 | Re: A failure in prepared_xacts test |
Previous Message | Robert Haas | 2024-04-29 13:15:52 | Re: tablecmds.c/MergeAttributes() cleanup |