Ticket #153 (new bug report)

Opened 20 months ago

Last modified 14 months ago

Crash with points_as_polygon()

Reported by: stefan Owned by: somebody
Priority: critical Milestone: Version 1.1
Component: DrivingDistance Version: 1.02
Keywords: points_as_polygon bug database crash Cc:

Description

Hi list,

i just found out, that points_as_polygon() can crash/restart the whole postgresql database under certain circumstances. my case is: i use points_as_polygon() to get a nice polygon from the result which is returned by driving_distance(). my result from driving_distance() is the following: as you can see, i have only two points in this result. i know that it is not possible to generate a polygon from only two points. but at least i would expect pgrouting to return either an empty polygon or to return nothing without crashing the database.

i think the bug sticks in the alphashape() c-function. any ideas?

SELECT points_as_polygon('SELECT p.id, p.x, p.y FROM points_as_polygon_crash AS p');

-- PostgreSQL database dump CREATE TABLE points_as_polygon_crash (id integer, x double precision, y double precision);

INSERT INTO points_as_polygon_crash VALUES (422072, 12.474746700000001, 51.347863599999997); INSERT INTO points_as_polygon_crash VALUES (438668, 12.475282999999999, 51.349685000000001);

i use pgrouting 1.02

select version() PostgreSQL 8.2.4 on x86_64-unknown-linux-gnu, compiled by GCC gcc (GCC) 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)

select postgis_full_version() POSTGIS="1.3.3" GEOS="3.0.3-CAPI-1.4.2" PROJ="Rel. 4.6.0, 21 Dec 2007" USE_STATS

this is what server.log says to the points_as_polygon query:

LOG: server process (PID 16153) was terminated by signal 11 LOG: terminating any other active server processes WARNING: terminating connection because of crash of another server process DETAIL: The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory. HINT: In a moment you should be able to reconnect to the database and repeat your command. WARNING: terminating connection because of crash of another server process DETAIL: The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory. HINT: In a moment you should be able to reconnect to the database and repeat your command. LOG: all server processes terminated; reinitializing LOG: database system was interrupted at 2009-04-03 10:21:31 CEST LOG: checkpoint record is at 210/95202CF8 LOG: redo record is at 210/95202CF8; undo record is at 0/0; shutdown FALSE LOG: next transaction ID: 0/309385647; next OID: 2123543 LOG: next MultiXactId?: 1; next MultiXactOffset?: 0 LOG: database system was not properly shut down; automatic recovery in progress LOG: record with zero length at 210/95202D48 LOG: redo is not required LOG: database system is ready

Change History

Changed 14 months ago by Chewi

Don't seem to be able to CC myself to this but I'd like to know when this is fixed.

Note: See TracTickets for help on using tickets.