[postgis-users] segmentation fault in lwgeom_geos.c
Jaime Casanova
jaime.casanova at 2ndquadrant.com
Mon Jul 25 16:24:56 PDT 2016
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
-------------- next part --------------
== original 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
== bt ==
Program received signal SIGSEGV, Segmentation fault.
0x00007f6a3db424ee in GEOSPreparedIntersects_r () from /lib64/libgeos_c.so.1
Missing separate debuginfos, use: debuginfo-install geos-3.4.2-2.el7.x86_64 json-c-0.11-4.el7_0.x86_64 libgcc-4.8.5-4.el7.x86_64 libstdc++-4.8.5-4.el7.x86_64 proj-4.8.0-4.el7.x86_64
(gdb) bt
#0 0x00007f6a3db424ee in GEOSPreparedIntersects_r () from /lib64/libgeos_c.so.1
#1 0x00007f6a3cb9bfa2 in intersects (fcinfo=0x1cffec0) at lwgeom_geos.c:2707
#2 0x00000000005950a2 in ExecMakeFunctionResultNoSets (fcache=0x1cffe50, econtext=0x1cffb70,
isNull=0x7fffd470cd07 "", isDone=<optimized out>) at execQual.c:2026
#3 0x000000000059a7f9 in ExecQual (qual=qual at entry=0x1d00750, econtext=econtext at entry=0x1cffb70,
resultForNull=resultForNull at entry=0 '\000') at execQual.c:5209
#4 0x00000000005ab04f in ExecNestLoop (node=node at entry=0x1cffa60) at nodeNestloop.c:238
#5 0x0000000000593f98 in ExecProcNode (node=node at entry=0x1cffa60) at execProcnode.c:449
#6 0x00000000005a015a in agg_fill_hash_table (aggstate=0x1cf77f0) at nodeAgg.c:1349
#7 ExecAgg (node=node at entry=0x1cf77f0) at nodeAgg.c:1111
#8 0x0000000000593f38 in ExecProcNode (node=node at entry=0x1cf77f0) at execProcnode.c:476
#9 0x00000000005ace09 in ExecSort (node=node at entry=0x1cfe950) at nodeSort.c:103
#10 0x0000000000593f58 in ExecProcNode (node=node at entry=0x1cfe950) at execProcnode.c:468
#11 0x00000000005ad07d in ExecUnique (node=node at entry=0x1cfe790) at nodeUnique.c:69
#12 0x0000000000593f18 in ExecProcNode (node=0x1cfe790) at execProcnode.c:484
#13 0x000000000059ade9 in ExecScanFetch (recheckMtd=0x5af550 <SubqueryRecheck>,
accessMtd=0x5af560 <SubqueryNext>, node=0x1cf2510) at execScan.c:82
#14 ExecScan (node=node at entry=0x1cf2510, accessMtd=accessMtd at entry=0x5af560 <SubqueryNext>,
recheckMtd=recheckMtd at entry=0x5af550 <SubqueryRecheck>) at execScan.c:167
#15 0x00000000005af57f in ExecSubqueryScan (node=node at entry=0x1cf2510) at nodeSubqueryscan.c:85
#16 0x0000000000593ff8 in ExecProcNode (node=node at entry=0x1cf2510) at execProcnode.c:422
#17 0x00000000005a015a in agg_fill_hash_table (aggstate=0x1cf1c00) at nodeAgg.c:1349
#18 ExecAgg (node=node at entry=0x1cf1c00) at nodeAgg.c:1111
#19 0x0000000000593f38 in ExecProcNode (node=node at entry=0x1cf1c00) at execProcnode.c:476
#20 0x00000000005914c0 in ExecutePlan (dest=0x7f6c5bae5870, direction=<optimized out>,
numberTuples=0, sendTuples=1 '\001', operation=CMD_SELECT, planstate=0x1cf1c00, estate=0x1cf1af0)
at execMain.c:1490
#21 standard_ExecutorRun (queryDesc=0x1cf16e0, direction=<optimized out>, count=0) at execMain.c:319
#22 0x00000000006820c8 in PortalRunSelect (portal=portal at entry=0x1c29fb0,
forward=forward at entry=1 '\001', count=0, count at entry=9223372036854775807,
dest=dest at entry=0x7f6c5bae5870) at pquery.c:942
#23 0x00000000006834af in PortalRun (portal=0x1c29fb0, count=9223372036854775807,
isTopLevel=<optimized out>, dest=0x7f6c5bae5870, altdest=0x7f6c5bae5870,
completionTag=0x7fffd470d550 "") at pquery.c:786
---Type <return> to continue, or q <return> to quit---
#24 0x0000000000681173 in PostgresMain (argc=<optimized out>, argv=<optimized out>,
dbname=<optimized out>, username=<optimized out>) at postgres.c:1072
#25 0x0000000000462ca5 in BackendRun (port=0x1c29cf0) at postmaster.c:4285
#26 BackendStartup (port=0x1c29cf0) at postmaster.c:3948
#27 ServerLoop () at postmaster.c:1679
#28 0x000000000062e596 in PostmasterMain (argc=argc at entry=3, argv=argv at entry=0x1c09290)
at postmaster.c:1287
#29 0x00000000004638f9 in main (argc=3, argv=0x1c09290) at main.c:233
== frame 1 ==
#1 0x00007f6a3cb9bfa2 in intersects (fcinfo=0x1cffec0) at lwgeom_geos.c:2707
2707 lwgeom_geos.c: No existe el fichero o el directorio.
== info locals ==
g = <optimized out>
geom1 = 0x1d30160
geom2 = 0x1d301f0
serialized_poly = <optimized out>
result = <optimized out>
box1 = {flags = 4 '\004', xmin = 775424.25, xmax = 775556.9375, ymin = 9972411, ymax = 9972456,
zmin = 3.5628244657192932e-317, zmax = 1.5049707946556627e-316, mmin = 1.1079403437422042e+97,
mmax = 4.9406564584124654e-324}
box2 = {flags = 4 '\004', xmin = 775396.625, xmax = 775424.3125, ymin = 9972411, ymax = 9972486,
zmin = 1.5047097303684002e-316, zmax = 6.3240402667679558e-322, mmin = 7.9050503334599447e-323,
mmax = 1.5023318912280955e-316}
type1 = <optimized out>
type2 = <optimized out>
polytype = <optimized out>
point = <optimized out>
lwgeom = <optimized out>
poly_cache = <optimized out>
prep_cache = 0x1d0fc78
__func__ = "intersects"
== print *geom1 ==
$1 = {size = 352, srid = "\000", <incomplete sequence \315>, flags = 4 '\004', data = "\004"}
== print *geom2 ==
$2 = {size = 352, srid = "\000", <incomplete sequence \315>, flags = 4 '\004', data = "J"}
More information about the postgis-users
mailing list