[pgrouting-users] pgRouting functions causing server crash

Stephen Woodbridge woodbri at swoodbridge.com
Sat Mar 24 11:47:40 EDT 2012


Hi Steve,

Any chance that you can test this on postgresql 8.x so we can see if it 
is related to the server or generic to pgrouting?

Another idea would be to try your problem and substitute Dijkstra for 
astar and see if it crashes.

Also I suspect that to chase this down we will need a simplified data 
set and queries that are causing it.

Thanks,
   -Steve

On 3/23/2012 10:09 PM, Steve Horn wrote:
> Hello list.
>
> I am experiencing a problem where I am calling 2 pgrouting functions one
> after another and it is causing the postgresql server (9.1) to crash.
> (pgrouting version 1.05)
>
> The first function I call is driving_distance, and the second is
> shortest_path_astar.
>
> Here is the contents of my postgresql log:
>
> =============================================
> terminate called after throwing an instance of 'std::bad_alloc'
>    what():  std::bad_alloc
> LOG:  server process (PID 2587) was terminated by signal 6: Aborted
> 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.
> 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.
> 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; last known up at 2012-03-23
> 21:51:38 EDT
> LOG:  database system was not properly shut down; automatic recovery in
> progress
> LOG:  redo starts at 13/E1D60
> LOG:  unexpected pageaddr 12/F8ED6000 in log file 19, segment 1, offset
> 15556608
> LOG:  redo done at 13/1ED5F90
> LOG:  last completed transaction was at log time 2012-03-23
> 21:51:38.166328-04
> FATAL:  the database system is in recovery mode
> FATAL:  the database system is in recovery mode
> LOG:  database system is ready to accept connections
> LOG:  autovacuum launcher started
>
>
> //Restarted the server and ran my function again
>
>
> terminate called after throwing an instance of 'std::bad_alloc'
>    what():  std::bad_alloc
> LOG:  server process (PID 7716) was terminated by signal 6: Aborted
> 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.
> 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; last known up at 2012-03-23
> 21:58:57 EDT
> LOG:  database system was not properly shut down; automatic recovery in
> progress
> LOG:  redo starts at 13/1F43238
> LOG:  unexpected pageaddr 12/F8F76000 in log file 19, segment 1, offset
> 16211968
> LOG:  redo done at 13/1F75F28
> LOG:  last completed transaction was at log time 2012-03-23
> 22:01:14.86379-04
> LOG:  database system is ready to accept connections
> LOG:  autovacuum launcher started
>
> =============================================================
>
> If I run driving_distance and shortest_path_astar independently of one
> another there is no problem whatsoever. If I use
> shortest_path_shooting_star, it works fine. In other words I can replace
> my call to shorest_path_astar with shortest_path_shooting_star after my
> driving_distance call and it works.
>
> My use case for this scenario is that I want to first create a drive
> time polygon, and then calculate distances to points within the polygon
> from my centroid.
>
> Thanks for any help!
> -Steve
>
>
> _______________________________________________
> Pgrouting-users mailing list
> Pgrouting-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/pgrouting-users



More information about the Pgrouting-users mailing list