pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Avoid "could not reattach" by providing space for concurrent all
8+ messages / 2 participants
[nested] [flat]

Commits from this thread:
  2019-04-09 ba3fb5d4fb 47b6362b58 3318c45557 4c9e545724 3105844e2d 292e2000e1  Define WIN32_STACK_RLIMIT throughout win32 and cygwin builds.
* pgsql: Avoid "could not reattach" by providing space for concurrent all
@ 2019-04-09 04:44 Noah Misch <noah@leadboat.com>
  0 siblings, 0 replies; 8+ messages in thread

From: Noah Misch @ 2019-04-09 04:44 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Avoid "could not reattach" by providing space for concurrent allocation.

We've long had reports of intermittent "could not reattach to shared
memory" errors on Windows.  Buildfarm member dory fails that way when
PGSharedMemoryReAttach() execution overlaps with creation of a thread
for the process's "default thread pool".  Fix that by providing a second
region to receive asynchronous allocations that would otherwise intrude
into UsedShmemSegAddr.  In pgwin32_ReserveSharedMemoryRegion(), stop
trying to free reservations landing at incorrect addresses; the caller's
next step has been to terminate the affected process.  Back-patch to 9.4
(all supported versions).

Reviewed by Tom Lane.  He also did much of the prerequisite research;
see commit bcbf2346d69f6006f126044864dd9383d50d87b4.

Discussion: https://postgr.es/m/20190402135442.GA1173872@rfd.leadboat.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/617dc6d299c957e2784320382b3277ede01d9c63

Modified Files
--------------
src/backend/port/win32_shmem.c      | 92 +++++++++++++++++++++++++++++++------
src/backend/postmaster/postmaster.c |  7 +++
src/include/storage/pg_shmem.h      |  1 +
3 files changed, 86 insertions(+), 14 deletions(-)



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* pgsql: Avoid "could not reattach" by providing space for concurrent all
@ 2019-04-09 04:44 Noah Misch <noah@leadboat.com>
  0 siblings, 0 replies; 8+ messages in thread

From: Noah Misch @ 2019-04-09 04:44 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Avoid "could not reattach" by providing space for concurrent allocation.

We've long had reports of intermittent "could not reattach to shared
memory" errors on Windows.  Buildfarm member dory fails that way when
PGSharedMemoryReAttach() execution overlaps with creation of a thread
for the process's "default thread pool".  Fix that by providing a second
region to receive asynchronous allocations that would otherwise intrude
into UsedShmemSegAddr.  In pgwin32_ReserveSharedMemoryRegion(), stop
trying to free reservations landing at incorrect addresses; the caller's
next step has been to terminate the affected process.  Back-patch to 9.4
(all supported versions).

Reviewed by Tom Lane.  He also did much of the prerequisite research;
see commit bcbf2346d69f6006f126044864dd9383d50d87b4.

Discussion: https://postgr.es/m/20190402135442.GA1173872@rfd.leadboat.com

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/e45a8ff87149d9f69551b7e7378501e38bb60e8d

Modified Files
--------------
src/backend/port/win32_shmem.c      | 92 +++++++++++++++++++++++++++++++------
src/backend/postmaster/postmaster.c |  7 +++
src/include/storage/pg_shmem.h      |  1 +
3 files changed, 86 insertions(+), 14 deletions(-)



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* pgsql: Avoid "could not reattach" by providing space for concurrent all
@ 2019-04-09 04:44 Noah Misch <noah@leadboat.com>
  2019-04-09 14:22 ` Re: pgsql: Avoid "could not reattach" by providing space for concurrent all Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
  0 siblings, 1 reply; 8+ messages in thread

From: Noah Misch @ 2019-04-09 04:44 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Avoid "could not reattach" by providing space for concurrent allocation.

We've long had reports of intermittent "could not reattach to shared
memory" errors on Windows.  Buildfarm member dory fails that way when
PGSharedMemoryReAttach() execution overlaps with creation of a thread
for the process's "default thread pool".  Fix that by providing a second
region to receive asynchronous allocations that would otherwise intrude
into UsedShmemSegAddr.  In pgwin32_ReserveSharedMemoryRegion(), stop
trying to free reservations landing at incorrect addresses; the caller's
next step has been to terminate the affected process.  Back-patch to 9.4
(all supported versions).

Reviewed by Tom Lane.  He also did much of the prerequisite research;
see commit bcbf2346d69f6006f126044864dd9383d50d87b4.

Discussion: https://postgr.es/m/20190402135442.GA1173872@rfd.leadboat.com

Branch
------
REL_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/f5989b379cefa0f3c858401d671813630e5e4118

Modified Files
--------------
src/backend/port/win32_shmem.c      | 92 +++++++++++++++++++++++++++++++------
src/backend/postmaster/postmaster.c |  7 +++
src/include/storage/pg_shmem.h      |  1 +
3 files changed, 86 insertions(+), 14 deletions(-)



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: pgsql: Avoid "could not reattach" by providing space for concurrent all
  2019-04-09 04:44 pgsql: Avoid "could not reattach" by providing space for concurrent all Noah Misch <noah@leadboat.com>
@ 2019-04-09 14:22 ` Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
  2019-04-10 07:06   ` Re: pgsql: Avoid "could not reattach" by providing space for concurrent all Noah Misch <noah@leadboat.com>
  0 siblings, 1 reply; 8+ messages in thread

From: Andrew Dunstan @ 2019-04-09 14:22 UTC (permalink / raw)
  To: Noah Misch <noah@leadboat.com>; +Cc: pgsql-committers <pgsql-committers@lists.postgresql.org>

On Tue, Apr 9, 2019 at 12:44 AM Noah Misch <noah@leadboat.com> wrote:
>
> Avoid "could not reattach" by providing space for concurrent allocation.
>

This has broken builds on frogmouth, and I'm betting any mingw animal.

cheers

andrew


-- 
Andrew Dunstan                https://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services





^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: pgsql: Avoid "could not reattach" by providing space for concurrent all
  2019-04-09 04:44 pgsql: Avoid "could not reattach" by providing space for concurrent all Noah Misch <noah@leadboat.com>
  2019-04-09 14:22 ` Re: pgsql: Avoid "could not reattach" by providing space for concurrent all Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
@ 2019-04-10 07:06   ` Noah Misch <noah@leadboat.com>
  0 siblings, 0 replies; 8+ messages in thread

From: Noah Misch @ 2019-04-10 07:06 UTC (permalink / raw)
  To: Andrew Dunstan <andrew.dunstan@2ndquadrant.com>; +Cc: pgsql-committers <pgsql-committers@lists.postgresql.org>

On Tue, Apr 09, 2019 at 10:22:55AM -0400, Andrew Dunstan wrote:
> On Tue, Apr 9, 2019 at 12:44 AM Noah Misch <noah@leadboat.com> wrote:
> >
> > Avoid "could not reattach" by providing space for concurrent allocation.
> >
> 
> This has broken builds on frogmouth, and I'm betting any mingw animal.

Fixed in ba3fb5d.





^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* pgsql: Avoid "could not reattach" by providing space for concurrent all
@ 2019-04-09 04:44 Noah Misch <noah@leadboat.com>
  0 siblings, 0 replies; 8+ messages in thread

From: Noah Misch @ 2019-04-09 04:44 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Avoid "could not reattach" by providing space for concurrent allocation.

We've long had reports of intermittent "could not reattach to shared
memory" errors on Windows.  Buildfarm member dory fails that way when
PGSharedMemoryReAttach() execution overlaps with creation of a thread
for the process's "default thread pool".  Fix that by providing a second
region to receive asynchronous allocations that would otherwise intrude
into UsedShmemSegAddr.  In pgwin32_ReserveSharedMemoryRegion(), stop
trying to free reservations landing at incorrect addresses; the caller's
next step has been to terminate the affected process.  Back-patch to 9.4
(all supported versions).

Reviewed by Tom Lane.  He also did much of the prerequisite research;
see commit bcbf2346d69f6006f126044864dd9383d50d87b4.

Discussion: https://postgr.es/m/20190402135442.GA1173872@rfd.leadboat.com

Branch
------
REL9_6_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/57ebbbb8f15acf3136f1417a462735d15af28623

Modified Files
--------------
src/backend/port/win32_shmem.c      | 92 +++++++++++++++++++++++++++++++------
src/backend/postmaster/postmaster.c |  7 +++
src/include/storage/pg_shmem.h      |  1 +
3 files changed, 86 insertions(+), 14 deletions(-)



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* pgsql: Avoid "could not reattach" by providing space for concurrent all
@ 2019-04-09 04:44 Noah Misch <noah@leadboat.com>
  0 siblings, 0 replies; 8+ messages in thread

From: Noah Misch @ 2019-04-09 04:44 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Avoid "could not reattach" by providing space for concurrent allocation.

We've long had reports of intermittent "could not reattach to shared
memory" errors on Windows.  Buildfarm member dory fails that way when
PGSharedMemoryReAttach() execution overlaps with creation of a thread
for the process's "default thread pool".  Fix that by providing a second
region to receive asynchronous allocations that would otherwise intrude
into UsedShmemSegAddr.  In pgwin32_ReserveSharedMemoryRegion(), stop
trying to free reservations landing at incorrect addresses; the caller's
next step has been to terminate the affected process.  Back-patch to 9.4
(all supported versions).

Reviewed by Tom Lane.  He also did much of the prerequisite research;
see commit bcbf2346d69f6006f126044864dd9383d50d87b4.

Discussion: https://postgr.es/m/20190402135442.GA1173872@rfd.leadboat.com

Branch
------
REL9_5_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/7a5677818556a2d3ab02a536c01955e90ddc1ea9

Modified Files
--------------
src/backend/port/win32_shmem.c      | 92 +++++++++++++++++++++++++++++++------
src/backend/postmaster/postmaster.c |  7 +++
src/include/storage/pg_shmem.h      |  1 +
3 files changed, 86 insertions(+), 14 deletions(-)



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* pgsql: Avoid "could not reattach" by providing space for concurrent all
@ 2019-04-09 04:44 Noah Misch <noah@leadboat.com>
  0 siblings, 0 replies; 8+ messages in thread

From: Noah Misch @ 2019-04-09 04:44 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Avoid "could not reattach" by providing space for concurrent allocation.

We've long had reports of intermittent "could not reattach to shared
memory" errors on Windows.  Buildfarm member dory fails that way when
PGSharedMemoryReAttach() execution overlaps with creation of a thread
for the process's "default thread pool".  Fix that by providing a second
region to receive asynchronous allocations that would otherwise intrude
into UsedShmemSegAddr.  In pgwin32_ReserveSharedMemoryRegion(), stop
trying to free reservations landing at incorrect addresses; the caller's
next step has been to terminate the affected process.  Back-patch to 9.4
(all supported versions).

Reviewed by Tom Lane.  He also did much of the prerequisite research;
see commit bcbf2346d69f6006f126044864dd9383d50d87b4.

Discussion: https://postgr.es/m/20190402135442.GA1173872@rfd.leadboat.com

Branch
------
REL9_4_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/203886d3ae22495241a95207e7b62bf859c389c5

Modified Files
--------------
src/backend/port/win32_shmem.c      | 92 +++++++++++++++++++++++++++++++------
src/backend/postmaster/postmaster.c |  7 +++
src/include/storage/pg_shmem.h      |  1 +
3 files changed, 86 insertions(+), 14 deletions(-)



^ permalink  raw  reply  [nested|flat] 8+ messages in thread


end of thread, other threads:[~2019-04-10 07:06 UTC | newest]

Thread overview: 8+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-04-09 04:44 pgsql: Avoid "could not reattach" by providing space for concurrent all Noah Misch <noah@leadboat.com>
2019-04-09 04:44 pgsql: Avoid "could not reattach" by providing space for concurrent all Noah Misch <noah@leadboat.com>
2019-04-09 04:44 pgsql: Avoid "could not reattach" by providing space for concurrent all Noah Misch <noah@leadboat.com>
2019-04-09 14:22 ` Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
2019-04-10 07:06   ` Noah Misch <noah@leadboat.com>
2019-04-09 04:44 pgsql: Avoid "could not reattach" by providing space for concurrent all Noah Misch <noah@leadboat.com>
2019-04-09 04:44 pgsql: Avoid "could not reattach" by providing space for concurrent all Noah Misch <noah@leadboat.com>
2019-04-09 04:44 pgsql: Avoid "could not reattach" by providing space for concurrent all Noah Misch <noah@leadboat.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox