pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Lars Aksel Opsahl <Lars.Opsahl@nibio.no>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Laurenz Albe <laurenz.albe@cybertec.at>
Cc: pgsql-admin@lists.postgresql.org <pgsql-admin@lists.postgresql.org>
Subject: Re: free(): invalid pointer , when to dumping data to a new server
Date: Tue, 27 Oct 2020 12:51:46 -0400
Message-ID: <1060532.1603817506@sss.pgh.pa.us> (raw)
In-Reply-To: <PR3P189MB10350C7EABBA1C83A89C78CA9D160@PR3P189MB1035.EURP189.PROD.OUTLOOK.COM>
References: <AM7P189MB10282FF31D45127630C767739D1D0@AM7P189MB1028.EURP189.PROD.OUTLOOK.COM>
	<AM7P189MB1028756DDD017F9828C8FDE99D1D0@AM7P189MB1028.EURP189.PROD.OUTLOOK.COM>
	<AM7P189MB1028645B919276B0B6055FA49D190@AM7P189MB1028.EURP189.PROD.OUTLOOK.COM>
	<4ae13029956a4bbcb7f60aee6f97b62c6bf85b98.camel@cybertec.at>
	<PR3P189MB1035C3DC4C526A813501E7FD9D160@PR3P189MB1035.EURP189.PROD.OUTLOOK.COM>
	<1058472.1603814699@sss.pgh.pa.us>
	<PR3P189MB10350C7EABBA1C83A89C78CA9D160@PR3P189MB1035.EURP189.PROD.OUTLOOK.COM>

Lars Aksel Opsahl <Lars.Opsahl@nibio.no> writes:
> (gdb) bt
> #0  0x00007fa9c241e70f in raise () from /lib64/libc.so.6
> #1  0x00007fa9c2408b25 in abort () from /lib64/libc.so.6
> #2  0x00007fa9c2461897 in __libc_message () from /lib64/libc.so.6
> #3  0x00007fa9c2467fdc in malloc_printerr () from /lib64/libc.so.6
> #4  0x00007fa9c24698dc in _int_free () from /lib64/libc.so.6
> #5  0x00007f992fe099f9 in osgeo::proj::common::UnitOfMeasure::~UnitOfMeasure() () from /lib64/libproj.so.15
> #6  0x00007fa9c2420e9c in __run_exit_handlers () from /lib64/libc.so.6
> #7  0x00007fa9c2420fd0 in exit () from /lib64/libc.so.6
> #8  0x000000000075beb0 in proc_exit (code=code@entry=0) at ipc.c:152
> #9  0x000000000077fd21 in PostgresMain (argc=<optimized out>, argv=argv@entry=0x182b6d8, dbname=<optimized out>, username=<optimized out>) at postgres.c:4455
> #10 0x00000000007085a1 in BackendRun (port=0x1819b90, port=0x1819b90) at postmaster.c:4448
> #11 BackendStartup (port=0x1819b90) at postmaster.c:4139
> #12 ServerLoop () at postmaster.c:1704
> #13 0x00000000007094d0 in PostmasterMain (argc=argc@entry=3, argv=argv@entry=0x17e7800) at postmaster.c:1377
> #14 0x0000000000482c7e in main (argc=3, argv=0x17e7800) at main.c:228

OK, I'd say that definitely puts the bug outside of core Postgres.
It looks like proj has installed an atexit() handler that is trying
to free something that was already freed.  This might be proj's
fault directly, or perhaps a caller did something wrong (a likely
bet, perhaps, is using palloc for something that proj expects to
survive till program exit).

Probably the next step is to take this to the postgis support lists
and see what they think about it.

			regards, tom lane





view thread (12+ messages)  latest in thread

Message-ID: <1060532.1603817506@sss.pgh.pa.us>
Permalink:  ../1060532.1603817506@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1060532.1603817506@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 using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, Lars.Opsahl@nibio.no, alvherre@alvh.no-ip.org, laurenz.albe@cybertec.at, pgsql-admin@lists.postgresql.org
  Subject: Re: free(): invalid pointer , when to dumping data to a new server
  In-Reply-To: <1060532.1603817506@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