[prev in list] [next in list] [prev in thread] [next in thread]
List: postgis-users
Subject: Re: [postgis-users] segmentation fault in lwgeom_geos.c
From: Paul Ramsey <pramsey () cleverelephant ! ca>
Date: 2016-07-31 20:17:40
Message-ID: CACowWR0jC49bWDJhY2=88JCf5JQaRjkU2ihNe1sBcfw5uRGz5g () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
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@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@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/postgis-users
>
[Attachment #5 (text/html)]
<div dir="ltr">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.<div><br></div><div>The where clause in the query includes a number of \
filters</div><div><br></div><div><span style="font-size:12.8px">v1.via_nombre LIKE \
'MAXIMILIANO RODRIGUEZ'</span><br style="font-size:12.8px"><span \
style="font-size:12.8px"> AND v2.via_nombre LIKE \
'LAURO GUERRERO'</span><br style="font-size:12.8px"><span \
style="font-size:12.8px"> AND \
intersects(v1.the_geom,v2.the_</span><span style="font-size:12.8px">geom)</span><br \
style="font-size:12.8px"><span style="font-size:12.8px"> \
AND v1.dipo_codiinec LIKE '170121%'</span><br style="font-size:12.8px"><span \
style="font-size:12.8px"> AND v2.dipo_codiinec LIKE \
'170121%'</span><br></div><div><span \
style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">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.</span></div><div><span \
style="font-size:12.8px"><br></span></div><div><span \
style="font-size:12.8px">Thanks,</span></div><div><span \
style="font-size:12.8px"><br></span></div><div><span \
style="font-size:12.8px">P</span></div><div><span \
style="font-size:12.8px"><br></span></div></div><div class="gmail_extra"><br><div \
class="gmail_quote">On Mon, Jul 25, 2016 at 4:24 PM, Jaime Casanova <span \
dir="ltr"><<a href="mailto:jaime.casanova@2ndquadrant.com" \
target="_blank">jaime.casanova@2ndquadrant.com</a>></span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex">Hi,<br> <br>
We found a problem in this query:<br>
<br>
"""<br>
SELECT DISTINCT vias_calle1, vias_calle2,<br>
x(st_transform(centroid(the_geom),4326)) as longitud,<br>
y(st_transform(centroid(the_geom),4326)) as latitud,<br>
x(centroid(the_geom)) as x, y(centroid(the_geom)) as y<br>
FROM (SELECT DISTINCT<br>
v1.via_nombre as vias_calle1,<br>
v2.via_nombre as vias_calle2,<br>
st_union(ST_Intersection(v1.the_geom,v2.the_geom))<br>
as the_geom<br>
FROM bage_via as v1, bage_via as v2<br>
WHERE v1.via_nombre LIKE 'MAXIMILIANO RODRIGUEZ'<br>
AND v2.via_nombre LIKE 'LAURO GUERRERO'<br>
AND intersects(v1.the_geom,v2.the_geom)<br>
AND v1.dipo_codiinec LIKE '170121%'<br>
AND v2.dipo_codiinec LIKE '170121%'<br>
GROUP BY v1.via_nombre, v2.via_nombre<br>
) as foo<br>
"""<br>
<br>
Attached a file with the backtrace, please let me know what else i can<br>
provide to help debug this? I have access to the server with the<br>
problem.<br>
<br>
PostGIS full version<br>
<br>
POSTGIS="2.1.8 r13780" GEOS="3.4.2-CAPI-1.8.2 r3921" \
PROJ="Rel. 4.8.0,<br> 6 March 2012" GDAL="GDAL 1.11.4, released \
2016/0<br> 1/25" LIBXML="2.9.1" LIBJSON="UNKNOWN" TOPOLOGY \
RASTER<br> <br>
postgres version<br>
<br>
PostgreSQL 9.4.8 on x86_64-unknown-linux-gnu, compiled by gcc (GCC)<br>
4.8.5 20150623 (Red Hat 4.8.5-4), 64-bit<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Jaime Casanova <a href="http://www.2ndQuadrant.com" \
rel="noreferrer" target="_blank">www.2ndQuadrant.com</a><br> PostgreSQL Development, \
24x7 Support, Remote DBA, Training & Services<br> \
</font></span><br>_______________________________________________<br> postgis-users \
mailing list<br> <a href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/postgis-users" rel="noreferrer" \
target="_blank">http://lists.osgeo.org/mailman/listinfo/postgis-users</a><br></blockquote></div><br></div>
[Attachment #6 (text/plain)]
_______________________________________________
postgis-users mailing list
postgis-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/postgis-users
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic