pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Jeremy Wilson <jwilson@clover.co>
To: pgsql-general <pgsql-general@lists.postgresql.org>
Subject: Re: pg_upgrade of 11 -> 13: free(): invalid pointer
Date: Tue, 17 Nov 2020 09:18:02 -0800
Message-ID: <8fcb65d3-0a5e-6e5f-0def-d406b0f9fe03@aklaver.com> (raw)
In-Reply-To: <42097E6F-BE25-4F2A-8A80-71E7EB3A2C6E@clover.co>
References: <42097E6F-BE25-4F2A-8A80-71E7EB3A2C6E@clover.co>

On 11/17/20 8:59 AM, Jeremy Wilson wrote:
> I’m continuing my upgrade journey, this time from 11 to 13, and the process is dying in the copy phase, always on the same DB:
> 
> —
> Performing Upgrade
> ------------------
> Analyzing all rows in the new cluster                       ok
> Freezing all rows in the new cluster                        ok
> Deleting files from new pg_xact                             ok
> Copying old pg_xact to new server                           ok
> Setting next transaction ID and epoch for new cluster       ok
> Deleting files from new pg_multixact/offsets                ok
> Copying old pg_multixact/offsets to new server              ok
> Deleting files from new pg_multixact/members                ok
> Copying old pg_multixact/members to new server              ok
> Setting next multixact ID and offset for new cluster        ok
> Resetting WAL archives                                      ok
> Setting frozenxid and minmxid counters in new cluster       ok
> Restoring global objects in the new cluster                 ok
> Restoring database schemas in the new cluster
>    messages
> *failure*
> 
> Consult the last few lines of "pg_upgrade_dump_16387.log" for
> the probable cause of the failure.
> Failure, exiting
> —
> 
> The log contains (which is different each time):
> 
> —
> pg_restore: WARNING:  terminating connection because of crash of another server process
> DETAIL:  The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory.
> HINT:  In a moment you should be able to reconnect to the database and repeat your command.
> pg_restore: creating COMMENT "public.FUNCTION "st_isempty"("rast" "public"."raster")"
> pg_restore: while PROCESSING TOC:
> pg_restore: from TOC entry 5338; 0 0 COMMENT FUNCTION "st_isempty"("rast" "public"."raster") postgres
> pg_restore: error: could not execute query: server closed the connection unexpectedly
>          This probably means the server terminated abnormally
>          before or while processing the request.
> Command was: COMMENT ON FUNCTION "public"."st_isempty"("rast" "public"."raster") IS 'args: rast - Returns true if the raster is empty (width = 0 and height = 0). Otherwise, returns false.’;
> —
> 
> And the pgsql13 server log contains:
> 
> —
> 2020-11-17 11:51:40.953 EST [96545] LOG:  database system is ready to accept connections
> free(): invalid pointer
> 2020-11-17 11:51:42.880 EST [96545] LOG:  server process (PID 96575) was terminated by signal 6: Aborted
> 2020-11-17 11:51:42.880 EST [96545] LOG:  terminating any other active server processes
> 2020-11-17 11:51:42.880 EST [96582] WARNING:  terminating connection because of crash of another server process
> 2020-11-17 11:51:42.880 EST [96582] DETAIL:  The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory.
> 2020-11-17 11:51:42.880 EST [96582] HINT:  In a moment you should be able to reconnect to the database and repeat your command.
> 2020-11-17 11:51:42.884 EST [96545] LOG:  all server processes terminated; reinitializing
> 2020-11-17 11:51:42.904 EST [96545] LOG:  received fast shutdown request
> 2020-11-17 11:51:42.905 EST [96585] LOG:  database system was interrupted; last known up at 2020-11-17 11:51:42 EST
> 2020-11-17 11:51:42.906 EST [96585] LOG:  database system was not properly shut down; automatic recovery in progress
> 2020-11-17 11:51:42.906 EST [96585] LOG:  redo starts at E0/DB6B2960
> 2020-11-17 11:51:42.907 EST [96545] LOG:  abnormal database system shutdown
> 2020-11-17 11:51:42.909 EST [96545] LOG:  database system is shut down
> —
> 
> So I’m assuming it’s that free() call.  Servers have PostGIS 3.0 on them, all installed from repo, and running CentOS 8.

Was this after a clean install of the corrected RPM's?


-- 
Adrian Klaver
adrian.klaver@aklaver.com





view thread (6+ messages)  latest in thread

Message-ID: <8fcb65d3-0a5e-6e5f-0def-d406b0f9fe03@aklaver.com>
Permalink:  ../8fcb65d3-0a5e-6e5f-0def-d406b0f9fe03@aklaver.com/
Also on:    postgresql.org/message-id/8fcb65d3-0a5e-6e5f-0def-d406b0f9fe03@aklaver.com

 · 

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: adrian.klaver@aklaver.com, jwilson@clover.co
  Subject: Re: pg_upgrade of 11 -> 13: free(): invalid pointer
  In-Reply-To: <8fcb65d3-0a5e-6e5f-0def-d406b0f9fe03@aklaver.com>
  References: <42097E6F-BE25-4F2A-8A80-71E7EB3A2C6E@clover.co> <8fcb65d3-0a5e-6e5f-0def-d406b0f9fe03@aklaver.com>

* 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