Opened 8 years ago

Closed 8 years ago

#3485 closed defect (fixed)

ST_ClusterKMeans garden crash - not empty geometry safe

Reported by: robe Owned by: pramsey
Priority: blocker Milestone: PostGIS 2.3.0
Component: postgis Version: master
Keywords: Cc:

Description

SELECT ST_ClusterKMeans(foo1.the_geom, 3)OVER()  As result
							FROM ((SELECT ST_GeomFromText('POINT EMPTY',4326) As the_geom
			UNION ALL SELECT ST_GeomFromText('MULTIPOINT EMPTY',4326) As the_geom
			UNION ALL SELECT ST_GeomFromText('MULTIPOLYGON EMPTY',4326) As the_geom
			UNION ALL SELECT ST_GeomFromText('LINESTRING EMPTY',4326) As the_geom
			UNION ALL SELECT ST_GeomFromText('MULTILINESTRING EMPTY',4326) As the_geom ) ) As foo1 LIMIT 3;

Do this and server hits the sac.

Simplified also crashes

SELECT ST_ClusterKMeans(foo1.the_geom, 1)OVER()  As result
	FROM (SELECT ST_GeomFromText('POINT EMPTY',4326) As the_geom) As foo1;

Change History (5)

comment:1 by robe, 8 years ago

Resolution: fixed
Status: newclosed

(In [14752]) Script to set search path for raster and postgis functions To fix database restore issues and materialized views Closes #3490 Closes #3485 Closes #3277 Closes #3012

comment:2 by robe, 8 years ago

Resolution: fixed
Status: closedreopened

Oops I accidentally closed this one with my commit. Sorry.

comment:3 by robe, 8 years ago

No rush but just wondering pramsey if any update on this. At least to confirm you have the same issue?

comment:4 by pramsey, 8 years ago

Confirm it's still there for you? I did some changes in this area of problem and I'm not seeing it against turnk

p=# SELECT ST_ClusterKMeans(foo1.the_geom, 1)OVER()  As result
p-# FROM (SELECT ST_GeomFromText('POINT EMPTY',4326) As the_geom) As foo1;
ERROR:  unable to calculate cluster seed points, too many NULLs or empties?

comment:5 by robe, 8 years ago

Resolution: fixed
Status: reopenedclosed

okay didn't even think to scheck. Looks fine. I get this now.

ERROR:  unable to calculate cluster seed points, too many NULLs or empties?
Note: See TracTickets for help on using tickets.