[postgis-tickets] [PostGIS] #4691: Segfault when creating an index on geography(Point, 4326) column that contains empty points

PostGIS trac at osgeo.org
Wed May 20 03:12:03 PDT 2020


#4691: Segfault when creating an index on geography(Point, 4326) column that
contains empty points
---------------------+---------------------
 Reporter:  aktiur   |      Owner:  pramsey
     Type:  defect   |     Status:  new
 Priority:  low      |  Milestone:
Component:  postgis  |    Version:  2.5.x
 Keywords:           |
---------------------+---------------------
 When creating a gist index on a geography(Point, 4326) column that happens
 to contain empty points (with coordinates of [nan, nan]), PostGIS will
 sometimes encounter a segmentation fault when freeing some memory.

 This is not a fully deterministic error. I'm joining a dataset with 11000
 points (of which 1000 are empty, the other 10000 are gaussian distributed
 around the center of France) and a script that imports it that seems to
 trigger that bug most of the time, but in some circumstances there is no
 segfault and I have to DROP the table and try again from the beginning to
 trigger it again (truncating is not enough).

 I did not manage to trigger the bug with a smaller dataset with only 1100
 points.

 I also noticed replacing the column type with geometry does not seem to
 trigger the segfault, but I did not try with a bigger dataset.

 I also joined a full stacktrace.

 {{{
 #!sql
 crash_test=# SELECT version();
                                                     version
 ---------------------------------------------------------------------------------------------------------------
  PostgreSQL 12.2 (Ubuntu 12.2-4) on x86_64-pc-linux-gnu, compiled by gcc
 (Ubuntu 9.3.0-8ubuntu1) 9.3.0, 64-bit
 (1 row)

 crash_test=# SELECT postgis_full_version();
 postgis_full_version
 --------------------------------------------------------------------------------------------------------------------------------------------------------------------
  POSTGIS="3.0.0 r17983" [EXTENSION] PGSQL="120" GEOS="3.8.0-CAPI-1.13.1 "
 PROJ="6.3.1" LIBXML="2.9.4" LIBJSON="0.13.1" LIBPROTOBUF="1.3.3"
 WAGYU="0.4.3 (Internal)"
 (1 row)
 }}}

 I'm using PostGIS 3 but it seems to be the same bug as this
 [https://www.postgresql.org/message-
 id/16283-89418c2816e96f07%40postgresql.org Postgresql ticket #16283] where
 the reporter was using PostGIS 2.5.

-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/4691>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.


More information about the postgis-tickets mailing list