[postgis-users] segmentation fault in lwgeom_geos.c

Paul Ramsey pramsey at cleverelephant.ca
Sun Jul 31 13:17:40 PDT 2016


To debug, start cutting it down to size. First, it looks like you can
probably reproduce it with just the sub-select 'foo'. So that's a smaller
query that shows the issue. Probably from that query you can also drop the
GROUP BY and get a crash, since the crash in the trace is happening in the
intersects() function.

The where clause in the query includes a number of filters

v1.via_nombre LIKE 'MAXIMILIANO RODRIGUEZ'
                    AND v2.via_nombre LIKE 'LAURO GUERRERO'
                    AND intersects(v1.the_geom,v2.the_geom)
                    AND v1.dipo_codiinec LIKE '170121%'
                    AND v2.dipo_codiinec LIKE '170121%'

How many records are returned on that query when you use every filter
*except* the intersects() one? Is it a small set of data? Can you share it?
Until we can reproduce the problem, we cannot fix it, and it's caused by
the particularity of your data/environment.  Cutting the crash down to the
simplest SQL and smallest data set that reproduce is an excellent first
step.

Thanks,

P


On Mon, Jul 25, 2016 at 4:24 PM, Jaime Casanova <
jaime.casanova at 2ndquadrant.com> wrote:

> Hi,
>
> We found a problem in this query:
>
> """
> SELECT DISTINCT vias_calle1, vias_calle2,
>         x(st_transform(centroid(the_geom),4326)) as longitud,
>         y(st_transform(centroid(the_geom),4326)) as latitud,
>         x(centroid(the_geom)) as x, y(centroid(the_geom)) as y
>   FROM (SELECT DISTINCT
>                     v1.via_nombre as vias_calle1,
>                     v2.via_nombre as vias_calle2,
>                     st_union(ST_Intersection(v1.the_geom,v2.the_geom))
> as the_geom
>                  FROM bage_via as v1, bage_via as v2
>               WHERE v1.via_nombre LIKE 'MAXIMILIANO RODRIGUEZ'
>                     AND v2.via_nombre LIKE 'LAURO GUERRERO'
>                     AND intersects(v1.the_geom,v2.the_geom)
>                     AND v1.dipo_codiinec LIKE '170121%'
>                     AND v2.dipo_codiinec LIKE '170121%'
>                GROUP BY v1.via_nombre, v2.via_nombre
> ) as foo
> """
>
> Attached a file with the backtrace, please let me know what else i can
> provide to help debug this? I have access to the server with the
> problem.
>
> PostGIS full version
>
> POSTGIS="2.1.8 r13780" GEOS="3.4.2-CAPI-1.8.2 r3921" PROJ="Rel. 4.8.0,
> 6 March 2012" GDAL="GDAL 1.11.4, released 2016/0
> 1/25" LIBXML="2.9.1" LIBJSON="UNKNOWN" TOPOLOGY RASTER
>
> postgres version
>
> PostgreSQL 9.4.8 on x86_64-unknown-linux-gnu, compiled by gcc (GCC)
> 4.8.5 20150623 (Red Hat 4.8.5-4), 64-bit
>
> --
> Jaime Casanova                      www.2ndQuadrant.com
> PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/postgis-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20160731/69a52dd8/attachment.html>


More information about the postgis-users mailing list