[pgrouting-dev] segmentation fault when executing shortest_path_shooting_star()

Jaime Casanova jaime at 2ndquadrant.com
Thu Feb 24 13:01:41 EST 2011


Hi everyone,

We are trying to use pgrouting but we found that it segfault when
executing this query (attached is a sql with the table creation and
some data):
select * from shortest_path_shooting_star('SELECT gid as id, source,
target, length as cost, x1,y1,x2,y2, rule, to_cost from road',15,
691,false,false);

== Environment ==

[postgres at localhost ~]$ cat /etc/redhat-release
CentOS release 5 (Final)

[postgres at localhost ~]$ uname -a
Linux localhost.localdomain 2.6.18-8.el5 #1 SMP Thu Mar 15 19:57:35
EDT 2007 i686 athlon i386 GNU/Linux

prueba=# select version();
                                                    version
----------------------------------------------------------------------------------------------------------------
 PostgreSQL 8.4.7 on i686-redhat-linux-gnu, compiled by GCC gcc (GCC)
4.1.2 20080704 (Red Hat 4.1.2-48), 32-bit
(1 fila)

prueba=# select postgis_full_version();
                               postgis_full_version
----------------------------------------------------------------------------------
 POSTGIS="1.3.6" GEOS="2.2.3-CAPI-1.1.1" PROJ="Rel. 4.5.0, 22 Oct
2006" USE_STATS
(1 fila)

== ** ==

we are using version 1.03 installed with an rpm, when i try to
reproduce the bug i installed from sources and need to patch the code
adding and include for "catalog/pg_type.h"
I also try to use v1.05 and had the same segmentation fault

here is a backtrace for it, any other info i can provide?

Core was generated by `postgres: postgres prueba [local] SELECT'.
Program terminated with signal 11, Segmentation fault.
#0  compute_shortest_path_shooting_star (fcinfo=0xbfbf7c44) at
/home/postgres/pgrouting-1.05/core/src/shooting_star.c:249
249	    target_edge->to_cost = DatumGetFloat8(binval);

(gdb) bt
#0  compute_shortest_path_shooting_star (fcinfo=0xbfbf7c44) at
/home/postgres/pgrouting-1.05/core/src/shooting_star.c:249
#1  shortest_path_shooting_star (fcinfo=0xbfbf7c44) at
/home/postgres/pgrouting-1.05/core/src/shooting_star.c:471
#2  0x08191482 in ExecMakeTableFunctionResult (funcexpr=0x9816a00,
econtext=0x9816480, expectedDesc=0x98167d0, randomAccess=0 '\000') at
execQual.c:2016
#3  0x0819e054 in FunctionNext (node=0x98163f8) at nodeFunctionscan.c:64
#4  0x08192a04 in ExecScan (node=0x98163f8, accessMtd=0x819dfe0
<FunctionNext>) at execScan.c:68
#5  0x0819dfd9 in ExecFunctionScan (node=0x98163f8) at nodeFunctionscan.c:98
#6  0x0818b20f in ExecProcNode (node=0x98163f8) at execProcnode.c:385
#7  0x08188d2b in ExecutePlan (queryDesc=0x9815e60,
direction=ForwardScanDirection, count=0) at execMain.c:1504
#8  standard_ExecutorRun (queryDesc=0x9815e60,
direction=ForwardScanDirection, count=0) at execMain.c:309
#9  0x0823970e in PortalRunSelect (portal=0x9813e58, forward=<value
optimized out>, count=0, dest=0x98104c0) at pquery.c:953
#10 0x0823a79b in PortalRun (portal=0x9813e58, count=2147483647,
isTopLevel=1 '\001', dest=0x98104c0, altdest=0x98104c0,
completionTag=0xbfbf8108 "")
    at pquery.c:807
#11 0x08235ea2 in exec_simple_query (
    query_string=0x97eb120 "select * from
shortest_path_shooting_star('SELECT gid as id, source, target, length
as cost, x1,y1,x2,y2, rule, to_cost from road',15, 691,false,false);")
at postgres.c:997
#12 0x08236d71 in PostgresMain (argc=4, argv=<value optimized out>,
username=0x977a5e0 "postgres") at postgres.c:3676
#13 0x0820a74a in ServerLoop () at postmaster.c:3467
#14 0x0820b622 in PostmasterMain (argc=3, argv=0x9777550) at postmaster.c:1040
#15 0x081b6060 in main (argc=3, argv=0x98255f4) at main.c:188

any ideas?

-- 
Jaime Casanova         www.2ndQuadrant.com
Professional PostgreSQL: Soporte y capacitación de PostgreSQL
-------------- next part --------------
A non-text attachment was scrubbed...
Name: prueba.sql
Type: text/x-sql
Size: 3702 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/pgrouting-dev/attachments/20110224/1091a53d/prueba.bin


More information about the pgrouting-dev mailing list