Opened 12 years ago

Closed 12 years ago

#1935 closed defect (fixed)

Signal 11: Segmentation fault

Reported by: rclarke Owned by: pramsey
Priority: medium Milestone: PostGIS 1.5.5
Component: postgis Version: 1.5.X
Keywords: Segmentation fault postgis crash empty polygon signal 11 Cc:

Description

postgis_full_version
-------------------------------------------------------------------------------------------------------
 POSTGIS="1.5.5" GEOS="3.2.0-CAPI-1.6.0" PROJ="Rel. 4.7.1, 23 September 2009" LIBXML="2.7.8" USE_STATS

version
-------------------------------------------------------------------------------------------------------
 PostgreSQL 9.1.4 on x86_64-unknown-linux-gnu, compiled by gcc-4.4.real (Debian 4.4.5-8) 4.4.5, 64-bit



\d tbl

                                        Table "tbl"
       Column       |       Type        |                                        Modifiers
--------------------+-------------------+-----------------------------------------------------------------------------------------
 the_geom           | bytea             |

The table is not indexed.

ERROR:

2012-07-25 14:21:58 BST LOG:  server process (PID 12041) was terminated by signal 11: Segmentation fault
2012-07-25 14:21:58 BST LOG:  terminating any other active server processes
2012-07-25 14:21:58 BST WARNING:  terminating connection because of crash of another server process
2012-07-25 14:21:58 BST 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.
2012-07-25 14:21:58 BST HINT:  In a moment you should be able to reconnect to the database and repeat your command.
2012-07-25 14:21:58 BST LOG:  all server processes terminated; reinitializing
2012-07-25 14:21:58 BST LOG:  database system was interrupted; last known up at 2012-07-25 14:14:59 BST
2012-07-25 14:21:58 BST LOG:  database system was not properly shut down; automatic recovery in progress
2012-07-25 14:21:58 BST LOG:  record with zero length at 0/30F36810
2012-07-25 14:21:58 BST LOG:  redo is not required
2012-07-25 14:21:58 BST LOG:  autovacuum launcher started
2012-07-25 14:21:58 BST LOG:  database system is ready to accept connections

Receiving error when running:

select st_isvalid(the_geom) from tbl where id = 6052
or
select st_isvalid(the_geom::geometry) from tbl where id = 6052
or
select st_centroid(the_geom) from tbl where id = 6052

On bytea field containing:

select the_geom from tbl where id = 6052;

      the_geom
----------------------
 \x010300000000000000

select st_astext(the_geom) from tbl where id = 6052

   st_astext
---------------
 POLYGON EMPTY
(1 row)

I was getting the error when I was using Postgresql 8.4 and postgis 1.5.1 also.

The data originates from an MDB OLE Object field, imported using GDAL.

It does not segfault when I run the following code:

SELECT ST_IsValid(the_geom::text::geometry) FROM tbl where id = 6052

or

 SELECT ST_IsValid(st_astext(the_geom)::geometry) FROM tbl where id = 6052; 

Change History (1)

comment:1 by pramsey, 12 years ago

Resolution: fixed
Status: newclosed

Fixed in 1.5 branch at r10244, in 1.4 at r10245. 2.0 and up shouldn't have this since the empty handling was heavily worked at 2.0.

Note: See TracTickets for help on using tickets.