pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Daniel Westermann (DWE) <daniel.westermann@dbi-services.com>
Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: Out of memory with "create extension postgis"
Date: Wed, 29 Jul 2020 11:05:16 -0400
Message-ID: <1316850.1596035116@sss.pgh.pa.us> (raw)
In-Reply-To: <ZR0P278MB012254D008F1A1A699AD8F59D2700@ZR0P278MB0122.CHEP278.PROD.OUTLOOK.COM>
References: <ZR0P278MB0122BE5FB48902BADDD9ED17D2730@ZR0P278MB0122.CHEP278.PROD.OUTLOOK.COM>
	<1183741.1595944647@sss.pgh.pa.us>
	<ZR0P278MB0122C779C0B490F6EE41F5ECD2730@ZR0P278MB0122.CHEP278.PROD.OUTLOOK.COM>
	<1193682.1595948121@sss.pgh.pa.us>
	<ZR0P278MB0122C24D9DEE78F10A336287D2730@ZR0P278MB0122.CHEP278.PROD.OUTLOOK.COM>
	<ZR0P278MB012254D008F1A1A699AD8F59D2700@ZR0P278MB0122.CHEP278.PROD.OUTLOOK.COM>

"Daniel Westermann (DWE)" <daniel.westermann@dbi-services.com> writes:
> So this is what we got today. In the log file there is this:

> 2020-07-29 16:33:23 CEST 101995 ERROR:  out of memory
> 2020-07-29 16:33:23 CEST 101995 DETAIL:  Failed on request of size 8265691 in memory context "PortalContext".
> 2020-07-29 16:33:23 CEST 101995 STATEMENT:  create extension postgis;

Is there not a dump of memory context sizes just before the "ERROR: out of
memory" line?  It should look something like

TopMemoryContext: 68720 total in 5 blocks; 17040 free (15 chunks); 51680 used
  MessageContext: 8192 total in 1 blocks; 6880 free (1 chunks); 1312 used
...
  ErrorContext: 8192 total in 1 blocks; 7928 free (3 chunks); 264 used
Grand total: 1063328 bytes in 190 blocks; 312376 free (159 chunks); 750952 used

(this taken from an idle backend, so numbers from a backend that's hit
OOM would be a lot larger).  If you don't see that then you must be
using some logging mechanism that fails to capture the postmaster's
stderr output, such as syslog.  If your postmaster start script doesn't
actually send stderr to /dev/null, you might find the context map in some
other log file.

> The GDB session shows this:

Umm ... you didn't issue a "bt" when you got to errfinish, so there's
no useful info here.

> Missing separate debuginfos, use: debuginfo-install CGAL-4.7-1.rhel7.1.x86_64 boost-date-time-1.53.0-27.el7.x86_64 boost-serialization-1.53.0-27.el7.x86_64 boost-system-1.53.0-27.el7.x86_64 boost-thread-1.53.0-27.el7.x86_64 gmp-6.0.0-15.el7.x86_64 jbigkit-libs-2.0-11.el7.x86_64 json-c-0.11-4.el7_0.x86_64 libcurl-7.29.0-54.el7_7.2.x86_64 libidn-1.28-4.el7.x86_64 libjpeg-turbo-1.2.90-8.el7.x86_64 libssh2-1.8.0-3.el7.x86_64 libtiff-4.0.3-32.el7.x86_64 mpfr-3.1.1-4.el7.x86_64 postgis30_12-3.0.1-5.rhel7.x86_64 protobuf-c-1.0.2-3.el7.x86_64 sqlite33-libs-3.30.1-1.rhel7.x86_64

This is a little weird and scary; I would not expect most of those
libraries to have gotten linked into a Postgres backend.  What
extensions are you using?  (And what the devil would any of them
want with sqlite or libcurl?  boost-thread is even scarier, because
we absolutely do not support multithreading in a backend process.)

			regards, tom lane





view thread (11+ messages)  latest in thread

Message-ID: <1316850.1596035116@sss.pgh.pa.us>
Permalink:  ../1316850.1596035116@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1316850.1596035116@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: tgl@sss.pgh.pa.us, daniel.westermann@dbi-services.com
  Subject: Re: Out of memory with "create extension postgis"
  In-Reply-To: <1316850.1596035116@sss.pgh.pa.us>
  References: <ZR0P278MB0122BE5FB48902BADDD9ED17D2730@ZR0P278MB0122.CHEP278.PROD.OUTLOOK.COM> <1183741.1595944647@sss.pgh.pa.us> <ZR0P278MB0122C779C0B490F6EE41F5ECD2730@ZR0P278MB0122.CHEP278.PROD.OUTLOOK.COM> <1193682.1595948121@sss.pgh.pa.us> <ZR0P278MB0122C24D9DEE78F10A336287D2730@ZR0P278MB0122.CHEP278.PROD.OUTLOOK.COM> <ZR0P278MB012254D008F1A1A699AD8F59D2700@ZR0P278MB0122.CHEP278.PROD.OUTLOOK.COM> <1316850.1596035116@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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