Ticket #204 (closed bug report: fixed)

Opened 6 months ago

Last modified 2 months ago

Addingdriving distance functions makes the server close connection

Reported by: daniel Owned by: anton
Priority: critical Milestone:
Component: DrivingDistance Version: trunk
Keywords: Cc:

Description

When trying to add functions for driving distance to a database, the server connection fails.

* Server: Linux 2.6.32-22-server #33-Ubuntu SMP Wed Apr 28 14:34:48 UTC 2010 x86_64 GNU/Linux * Postgresql version 8.4 from Ubuntu repository (Ubuntu 10.04, but I think it also happened on 9.10)

daniel@demoserver:~$ psql -U postgres -f /usr/share/postlbs/routing_dd.sql mobility
psql:/usr/share/postlbs/routing_dd.sql:28: server closed the connection unexpectedly
	This probably means the server terminated abnormally
	before or while processing the request.
psql:/usr/share/postlbs/routing_dd.sql:28: connection to server was lost

This is critical issue and there won't be any new release until it will be solved.

Change History

Changed 5 months ago by henkeb

I have the same problem. Linux 2.6.32-21-server #32-Ubuntu SMP x86_64 GNU/Linux PostgreSQL 8.4 select postgis_version();

postgis_version


1.4 USE_GEOS=1 USE_PROJ=1 USE_STATS=1

This is the output from the server log.

2010-06-08 22:59:59 CEST LOG:  statement: CREATE OR REPLACE FUNCTION driving_distance(sql text, source_id integer, 
	        distance float8,directed boolean, has_reverse_cost boolean)
	        RETURNS SETOF path_result
	        AS '$libdir/librouting_dd'
	        LANGUAGE 'C' IMMUTABLE STRICT;
terminate called after throwing an instance of 'CGAL::Assertion_exception'
  what():  CGAL ERROR: assertion violation!
Expr: -CGAL_IA_MUL(-1.1, 10.1) != CGAL_IA_MUL(1.1, 10.1)
File: /usr/include/CGAL/Interval_nt.h
Line: 158



Changed 5 months ago by oscar

I have the same problem too. I've been testing Red Hat Enterprise Linux 5 x86_64 and Ubuntu 10.04 x86_64 and the problem exist. This is my postgres 1.4 log (postgis 1.5.1):

terminate called after throwing an instance of 'CGAL::Assertion_exception'
  what():  CGAL ERROR: assertion violation!
Expr: -CGAL_IA_MUL(-1.1, 10.1) != CGAL_IA_MUL(1.1, 10.1)
File: /usr/include/CGAL/Interval_nt.h
Line: 158

Also I have pgrouting installed on Ubuntu 9.10 x86_32 and Ubuntu 10.04 x86_32 and there isn't any problem. It could be a 64 bits OS/processor problem.

Any clue?

Changed 5 months ago by daniel

Hi Oscar, thank you for the hint! It really seems to be a problem for 64 bit OS only. I just tried it on Ubuntu 10.04 i386 and there was no crash when loading the functions.

Changed 4 months ago by Martin

Same problem here on Ubuntu 10.04 x86_64

Changed 4 months ago by gfleming

Same problem here on Ubuntu 10.04 x86_64

Changed 2 months ago by malmac

I have had the same problem on fedora 13 64bit and Postgresql 8.4.4. CGAL - 3.5.1 GCC - 4.4.4-10 cmake - 2.8 I noted the following in the postgresql server log:

terminate called after throwing an instance of 'CGAL::Assertion_exception'

what(): CGAL ERROR: assertion violation!

Expr: -CGAL_IA_MUL(-1.1, 10.1) != CGAL_IA_MUL(1.1, 10.1) File: /usr/include/CGAL/Interval_nt.h Line: 158 Explanation: Wrong rounding: did you forget the -frounding-math option if you use GCC?

I then modified the CMakeLists.txt lines 116 and 117 as follows: SET(CMAKE_C_FLAGS "-O2 -g -frounding-math") SET(CMAKE_CXX_FLAGS "-O2 -g -frounding-math")

After this I could install the route_dd.sql and route_dd_wrappers.sql without the server crashing.

Changed 2 months ago by daniel

  • status changed from new to closed
  • resolution set to fixed

Hi malmac,

Thank you very much for your comment! I can reconfirm that now it doesn't crash anymore when loading driving distance function on 64 Bit systems.

I applied the changes to SVN trunk r358

Note: See TracTickets for help on using tickets.