Ticket #1029 (new defect)

Opened 11 months ago

Last modified 4 weeks ago

geometric object crashes server with Out Of Memory

Reported by: cousinm Owned by: pramsey
Priority: medium Milestone: PostGIS GEOS
Component: postgis Version: 1.5.X
Keywords: Cc: cousinm, mtnclimb@…, strk

Description

The attached object crashes the PostgreSQL server after allocating more than 20 Gigabytes of ram (sometimes bringing the server with it), when using any GIS function even st_isvalid().

I don't know if it is valid, it was provided «as is» by a user, and I can't run st_isvalid() on it.

SELECT postgis_full_version();

postgis_full_version


POSTGIS="1.5.2" GEOS="3.2.2-CAPI-1.6.2" PROJ="Rel. 4.7.1, 23 September 2009" LIBXML="2.7.8" USE_STATS

(1 row)

The attached script creates a «test» table, and puts this object inside it.

Please tell me if I can provide anything to help on this problem.

Attachments

geom_test.sql.gz Download (0.6 MB) - added by cousinm 11 months ago.
script creating test data

Change History

Changed 11 months ago by cousinm

script creating test data

Changed 11 months ago by robe

I suspect you are experiencing the GEOS bug described in #1007. The fix is to upgrade to GEOS 3.3.0 or GEOS 3.2.3.

Please give that a try and let us know how that works.

Changed 11 months ago by robe

It would also help if you printed out the

SELECT version();

Changed 11 months ago by cousinm

SELECT version();

version


PostgreSQL 9.0.4 on x86_64-unknown-linux-gnu, compiled by GCC gcc (GCC) 4.6.0 20110415 (prerelease), 64-bit

(1 row)

I'm going to try with a newer GEOS.

Changed 11 months ago by robe

Sorry I forgot 3.3.0 is already released so the fixed GEOS are 3.2.3SVN and 3.3.1SVN

Changed 11 months ago by cousinm

I have the same problem using 3.3.1SVN.

Changed 11 months ago by cousinm

  • cc cousinm added

Changed 11 months ago by pramsey

  • cc mtnclimb@…, strk added

Confirmed, same behaviour on GEOS 3.2.3 under OS/X. Other pure-PostGIS functions work, but building the edge graph in GEOS leads to memory explosion.

Changed 11 months ago by pramsey

From Martin:

This geometry causes problems in JTS as well (all versions). The problem is that there is an area of the geometry where there are about 2000 circular polygons (totalling about 71000 pts) which are all *almost* identical. This causes the noding algorithm to have a hissy fit.

It should be possible to get validation working at least, since the geometry is obviously invalid (due to the numerous overlaps).

Also, Unary Union works fine, with respectable performance. So if it's necessary to reduce the polygon to something workable, that's the way to do it.

Changed 11 months ago by pramsey

  • milestone changed from PostGIS 1.5.3 to PostGIS 1.5.4

Changed 4 weeks ago by pramsey

  • milestone changed from PostGIS 1.5.4 to PostGIS GEOS
Note: See TracTickets for help on using tickets.