Opened 13 years ago
Closed 7 years ago
#1029 closed defect (fixed)
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 (1)
Change History (12)
by , 13 years ago
Attachment: | geom_test.sql.gz added |
---|
comment:1 by , 13 years ago
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.
comment:3 by , 13 years ago
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.
comment:4 by , 13 years ago
Sorry I forgot 3.3.0 is already released so the fixed GEOS are 3.2.3SVN and 3.3.1SVN
comment:6 by , 13 years ago
Cc: | added |
---|
comment:7 by , 13 years ago
Cc: | 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.
comment:8 by , 13 years ago
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.
comment:9 by , 13 years ago
Milestone: | PostGIS 1.5.3 → PostGIS 1.5.4 |
---|
comment:10 by , 13 years ago
Milestone: | PostGIS 1.5.4 → PostGIS GEOS |
---|
comment:11 by , 7 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Times have changed, latest GEOS seems to handle this fine
postgis25=# select st_isvalid(the_geom) from test ; NOTICE: Self-intersection at or near point 2.8991599328317328 50.534034807793205 st_isvalid ------------ f (1 row)
POSTGIS="2.5.0dev r15870" PGSQL="100" GEOS="3.7.0dev-CAPI-1.11.0 1618346" PROJ="Rel. 4.9.1, 04 March 2015" LIBXML="2.9.2" LIBJSON="0.12" LIBPROTOBUF="1.1.0"
script creating test data