Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#1903 closed defect (fixed)

Crash when inserting ~280 GEOGRAPHY POINTs (and NULLs) into a GIST indexed table

Reported by: renefournier Owned by: pramsey
Priority: critical Milestone: PostGIS 1.5.5
Component: postgis Version: 1.5.X
Keywords: postgis crash gist geography point Cc: renefournier@…, renefournier

Description (last modified by pramsey)

Creating a table with a GIST index on the GEOGRAPHY(POINT,4326) column, and then inserting hundreds rows, PostgreSQL will crash every time at row 284 (changing the order of the rows will affect at which row the crash occurs — appears to be dependent on cumulative data size). If I remove the index, the crash never occurs.

                                       postgis_full_version                                       
--------------------------------------------------------------------------------------------------
 POSTGIS="1.5.4" GEOS="3.3.2-CAPI-1.7.2" PROJ="Rel. 4.8.0, 6 March 2012" LIBXML="2.7.8" USE_STATS


Log output:

LOG:  server process (PID 1373) was terminated by signal 11: Segmentation fault
LOG:  terminating any other active server processes
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.
LOG:  all server processes terminated; reinitializing
LOG:  database system was interrupted; last known up at 2012-07-06 10:46:58 CEST
LOG:  database system was not properly shut down; automatic recovery in progress
LOG:  redo starts at 0/38E6268
LOG:  record with zero length at 0/393AB08
LOG:  redo done at 0/393AAC8
LOG:  last completed transaction was at log time 2012-07-06 10:47:17.590389+02
LOG:  database system is ready to accept connections
LOG:  autovacuum launcher started

Attachments (1)

test.sql (65.2 KB ) - added by renefournier 12 years ago.
File contains 500 rows, crash happens every time at 284

Download all attachments as: .zip

Change History (8)

by renefournier, 12 years ago

Attachment: test.sql added

File contains 500 rows, crash happens every time at 284

comment:1 by renefournier, 12 years ago

Milestone: PostGIS 2.0.2PostGIS 1.5.4

comment:2 by renefournier, 12 years ago

Cc: renefournier added

comment:3 by pramsey, 12 years ago

Didn't crash for me. This is similar to a bug we fixed a while ago, where the index picksplit routine died when most of the entries were empty. There are a lot of nulls in this test file. What platform (Windows? Unix? OSX?) are you on? What version of PostgreSQL?

comment:4 by pramsey, 12 years ago

Summary: PostgreSQL crashes every time if I insert more than ~280 rows containing a GEOGRAPHY POINT in a table containing a GIST indexCrash when inserting ~280 GEOGRAPHY POINTs (and NULLs) into a GIST indexed table

comment:5 by pramsey, 12 years ago

Description: modified (diff)

comment:6 by pramsey, 12 years ago

Resolution: fixed
Status: newclosed

OK, so this is already fixed in SVN, and will be part of the 1.5.5 release.

comment:7 by robe, 12 years ago

Milestone: PostGIS 1.5.4PostGIS 1.5.5
Note: See TracTickets for help on using tickets.