From: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Craig Ringer <craig(at)2ndquadrant(dot)com>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, Andres Freund <andres(at)anarazel(dot)de>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: OK, so culicidae is *still* broken |
Date: | 2017-05-01 05:30:10 |
Message-ID: | CAA4eK1LzVhD2TzxRtG183z__=YzWwHtvUFJw4CAFdkyjR2SGRw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, May 1, 2017 at 10:23 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> writes:
>> Yeah, that's right. Today, I have spent some time to analyze how and
>> where retry logic is required. I think there are two places where we
>> need this retry logic, one is if we fail to reserve the memory
>> (pgwin32_ReserveSharedMemoryRegion) and second is if we fail to
>> reattach (PGSharedMemoryReAttach).
>
> I'm not following. The point of the reserve operation is to ensure
> that the reattach will work. What makes you think we need to add more
> code at that end?
>
We use VirtualAllocEx to allocate memory at a pre-defined address
(reserve operation) which can fail due to ASLR. One recent example of
such a symptom is seen on pgsql-bugs [1], that failure is during
reserve operation and seems like something related to ASLR. Another
point is the commit 7f3e17b4827b61ad84e0774e3e43da4c57c4487f (It
doesn't fail every time (which is explained by the Random part in
ASLR), but can fail with errors abut failing to reserve shared memory
region) also indicates that we can fail to reserve memory due to ASLR.
[1] - https://www.postgresql.org/message-id/14121.1485360296%40sss.pgh.pa.us
--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Philippe BEAUDOIN | 2017-05-01 06:54:56 | Column rename in an extension update script |
Previous Message | Petr Jelinek | 2017-05-01 05:16:37 | Re: snapbuild woes |