[postgis-devel] [PostGIS] #627: PostGIS/PostgreSQL process terminates on invalid geometry
PostGIS
trac at osgeo.org
Mon Nov 22 08:35:04 PST 2010
#627: PostGIS/PostgreSQL process terminates on invalid geometry
-------------------------+--------------------------------------------------
Reporter: hopfgartner | Owner: pramsey
Type: defect | Status: new
Priority: medium | Milestone: PostGIS 1.5.3
Component: postgis | Version: 1.5.X
Keywords: |
-------------------------+--------------------------------------------------
Comment(by hopfgartner):
I've tried to dig into this issue and added some debug info to
postgis-1.5.1/postgis/lwgeom_geos.c, see attached file.
When I run the query above, I get the following output:
melzo=# SELECT
buffer('0101000020E8640000000000000000F8FF000000000000F8FF', 50.0);
NOTICE: [lwgparse.c:parse_it:1669] parse_it:
0101000020E8640000000000000000F8FF000000000000F8FF with parser flags 7
LINE 1: SELECT buffer('0101000020E8640000000000000000F8FF00000000000...
^
NOTICE: [lwgparse.c:alloc_lwgeom:343] alloc_lwgeom -1
LINE 1: SELECT buffer('0101000020E8640000000000000000F8FF00000000000...
^
NOTICE: [lwgparse.c:alloc_wkb:1658] alloc_wkb
LINE 1: SELECT buffer('0101000020E8640000000000000000F8FF00000000000...
^
NOTICE: [lwgparse.c:parse_wkb:1539] parse_wkb
LINE 1: SELECT buffer('0101000020E8640000000000000000F8FF00000000000...
^
NOTICE: [lwgparse.c:alloc_stack_tuple:432] alloc_stack_tuple: type = 1,
size = 1
LINE 1: SELECT buffer('0101000020E8640000000000000000F8FF00000000000...
^
NOTICE: [lwgparse.c:alloc_stack_tuple:443] alloc_stack_tuple complete:
0x1c2212a0
LINE 1: SELECT buffer('0101000020E8640000000000000000F8FF00000000000...
^
NOTICE: [lwgparse.c:check_dims:926] check_dims the_geom.ndims = 2, num =
2
LINE 1: SELECT buffer('0101000020E8640000000000000000F8FF00000000000...
^
NOTICE: [lwgparse.c:pop:913] pop: type= 1, tuple= 0x1c2212a0
LINE 1: SELECT buffer('0101000020E8640000000000000000F8FF00000000000...
^
NOTICE: [lwgparse.c:make_serialized_lwgeom:1274] make_serialized_lwgeom
LINE 1: SELECT buffer('0101000020E8640000000000000000F8FF00000000000...
^
NOTICE: [lwgeom.c:serialized_lwgeom_from_ewkt:704]
serialized_lwgeom_from_ewkt with
0101000020E8640000000000000000F8FF000000000000F8FF
LINE 1: SELECT buffer('0101000020E8640000000000000000F8FF00000000000...
^
NOTICE: [lwgeom_api.c:lwgeom_getType:853] lwgeom_getType 65
LINE 1: SELECT buffer('0101000020E8640000000000000000F8FF00000000000...
^
NOTICE: [lwgeom.c:lwgeom_deserialize:26] lwgeom_deserialize got 1 - Point
LINE 1: SELECT buffer('0101000020E8640000000000000000F8FF00000000000...
^
NOTICE: [lwpoint.c:lwpoint_deserialize:255] lwpoint_deserialize called
LINE 1: SELECT buffer('0101000020E8640000000000000000F8FF00000000000...
^
NOTICE: [lwgeom_api.c:lwgeom_getType:853] lwgeom_getType 65
LINE 1: SELECT buffer('0101000020E8640000000000000000F8FF00000000000...
^
NOTICE: [lwpoint.c:lwpoint_deserialize:286] lwpoint_deserialize: input
has SRID
LINE 1: SELECT buffer('0101000020E8640000000000000000F8FF00000000000...
^
NOTICE: [lwgeom_api.c:pointArray_construct:788] pointArray_construct
called.
LINE 1: SELECT buffer('0101000020E8640000000000000000F8FF00000000000...
^
NOTICE: [lwgeom_api.c:pointArray_construct:798] pointArray_construct
returning 0x1c1ddc38
LINE 1: SELECT buffer('0101000020E8640000000000000000F8FF00000000000...
^
NOTICE: [lwgeom.c:lwgeom_serialize_size:67] lwgeom_serialize_size(Point)
called
LINE 1: SELECT buffer('0101000020E8640000000000000000F8FF00000000000...
^
NOTICE: [lwpoint.c:lwpoint_serialize_size:147] lwpoint_serialize_size
called
LINE 1: SELECT buffer('0101000020E8640000000000000000F8FF00000000000...
^
NOTICE: [lwpoint.c:lwpoint_serialize_size:154] lwpoint_serialize_size
returning 21
LINE 1: SELECT buffer('0101000020E8640000000000000000F8FF00000000000...
^
NOTICE: [lwgeom_pg.c:pglwgeom_serialize:159] lwgeom_serialize_size
returned 21
LINE 1: SELECT buffer('0101000020E8640000000000000000F8FF00000000000...
^
NOTICE: [lwgeom.c:lwgeom_serialize_buf:101] lwgeom_serialize_buf called
with a Point
LINE 1: SELECT buffer('0101000020E8640000000000000000F8FF00000000000...
^
NOTICE: [lwgeom_api.c:pointArray_ptsize:811] pointArray_ptsize:
TYPE_NDIMS(pa->dims)=2
LINE 1: SELECT buffer('0101000020E8640000000000000000F8FF00000000000...
^
NOTICE: [lwpoint.c:lwpoint_serialize_buf:58]
lwpoint_serialize_buf(0x1c21b650, 0x1c21b624) called
LINE 1: SELECT buffer('0101000020E8640000000000000000F8FF00000000000...
^
NOTICE: [lwgeom_api.c:pointArray_ptsize:811] pointArray_ptsize:
TYPE_NDIMS(pa->dims)=2
LINE 1: SELECT buffer('0101000020E8640000000000000000F8FF00000000000...
^
NOTICE: [lwgeom_pg.c:pglwgeom_serialize:165] pglwgeom_serialize:
serialized size: 21, computed size: 21
LINE 1: SELECT buffer('0101000020E8640000000000000000F8FF00000000000...
^
NOTICE: [lwgeom_api.c:lwgeom_getType:853] lwgeom_getType 65
NOTICE: [lwgeom.c:lwgeom_deserialize:26] lwgeom_deserialize got 1 - Point
NOTICE: [lwpoint.c:lwpoint_deserialize:255] lwpoint_deserialize called
NOTICE: [lwgeom_api.c:lwgeom_getType:853] lwgeom_getType 65
NOTICE: [lwpoint.c:lwpoint_deserialize:286] lwpoint_deserialize: input
has SRID
NOTICE: [lwgeom_api.c:pointArray_construct:788] pointArray_construct
called.
NOTICE: [lwgeom_api.c:pointArray_construct:798] pointArray_construct
returning 0x1c225348
NOTICE: [lwgeom_geos.c:LWGEOM2GEOS:2936] LWGEOM2GEOS got a Unknown
NOTICE: [lwsegmentize.c:has_arc:55] has_arc called.
NOTICE: [lwgeom_api.c:lwgeom_getType:853] lwgeom_getType 65
NOTICE: [lwgeom_api.c:getPoint3dz_p:582] getPoint3dz_p called on array of
2-dimensions / 1 pts
NOTICE: [lwgeom_api.c:pointArray_ptsize:811] pointArray_ptsize:
TYPE_NDIMS(pa->dims)=2
NOTICE: [lwgeom_geos.c:ptarray_to_GEOSCoordSeq:2912] Point: nan,nan,0
NOTICE: [lwgeom_geos.c:LWGEOM2GEOS:3026] LWGEOM2GEOS: GEOSGeom: POINT
(nan nan)
NOTICE: [lwgeom_geos.c:buffer:988] before GEOSBufferWithStyle(POINT (nan
nan), 50.000000, 8, 1, 1, 5.000000)
server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
The connection to the server was lost. Attempting reset: Failed.
!>
The problem seems to be in GEOS or how GEOSBufferWithStyle is invoked from
within PostGIS.
Peter
--
Ticket URL: <http://trac.osgeo.org/postgis/ticket/627#comment:1>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.
More information about the postgis-devel
mailing list