raster2pgsql - free(): invalid pointer Aborted (core dumped)

1.2k views Asked by At

I've installed on my CentOS 8 server Postgres12 with Postgis30_12 and when I run the command raster2pgsql I get :

free(): invalid pointer
Aborted (core dumped)

When reading the coredump with:

coredumpctl --debugger=lldb debug 685510

the result is:

(geoserver) [root@li1959-236 ~]# coredumpctl --debugger=lldb debug 685510
           PID: 685510 (raster2pgsql)
           UID: 0 (root)
           GID: 0 (root)
        Signal: 6 (ABRT)
     Timestamp: Sun 2020-08-16 05:37:02 UTC (11min ago)
  Command Line: /usr/pgsql-12/bin/raster2pgsql
    Executable: /usr/pgsql-12/bin/raster2pgsql
 Control Group: /user.slice/user-0.slice/session-40.scope
          Unit: session-40.scope
         Slice: user-0.slice
       Session: 40
     Owner UID: 0 (root)
       Boot ID: 88634d411f58486ba6e16f649f2bb49a
    Machine ID: c3af5f8c4f124558a9014ee14dd65e0b
      Hostname: li1959-236.members.linode.com
       Storage: /var/lib/systemd/coredump/core.raster2pgsql.0.88634d411f58486ba6e16f649f2bb49a.685510.1597556222000000.lz4
       Message: Process 685510 (raster2pgsql) of user 0 dumped core.
                
                Stack trace of thread 685510:
                #0  0x00007f2a9315370f raise (libc.so.6)
                #1  0x00007f2a9313db25 abort (libc.so.6)
                #2  0x00007f2a93196897 __libc_message (libc.so.6)
                #3  0x00007f2a9319cfdc malloc_printerr (libc.so.6)
                #4  0x00007f2a9319e8dc _int_free (libc.so.6)
                #5  0x00007f2a95ed2535 _ZN5osgeo4proj6common13UnitOfMeasureD1Ev (libproj.so.19)
                #6  0x00007f2a931563c7 __cxa_finalize (libc.so.6)
                #7  0x00007f2a8bfa41c7 __do_global_dtors_aux (libproj.so.15)
                #8  0x00007f2a963172a6 _dl_fini (ld-linux-x86-64.so.2)
                #9  0x00007f2a93155e9c __run_exit_handlers (libc.so.6)
                #10 0x00007f2a93155fd0 exit (libc.so.6)
                #11 0x000000000040a7af main (raster2pgsql)
                #12 0x00007f2a9313f6a3 __libc_start_main (libc.so.6)
                #13 0x000000000040473e _start (raster2pgsql)

(lldb) target create "/usr/pgsql-12/bin/raster2pgsql" --core "/var/tmp/coredump-YaKKGn"
Core file '/var/tmp/coredump-YaKKGn' (x86_64) was loaded.

Please Help!!!

1

There are 1 answers

0
Michael On

I found this discussion while I was searching for an error with GDAL-tools where serveral commands ended in a core dump as well. In your output from coredumpctl there are "libproj.so.19" and "libproj.so.15". So I guess it's a problem with different linked librarys from Proj. Have a look at this two discussions, which pointed me to a solution, to solve my problem. [gdal-dev] ubuntu installation issue: free(): invalid pointer, Aborted (core dumped) and postgresql.org: Problem with gdal

As raster2pgsql uses gdal I think this helps you here with this problem as well.