[postgis-devel] Segfault when doing intersections (BUG)

w s forkandwait at gmail.com
Sun Nov 15 13:23:37 PST 2009


Hi all,

Summary:  when doing intersections, I occasionally get a failed backend.

I am having an intermittent segfault using the st_ intersection() on some
big polygons.  I will post more as I have more time, but I think I can give
enough info here to be a useful start.

I don't have a big enough machine or enough time to rebuild with all the
debug stuff enabled and keep log files, at least in the next week.  With
some guidance, though, I would happily try to get a core or a gdb dump or
whatever would help.  I built postgis with debug enabled and ran out of disk
space...., so I went back to the regular.

Note: I am getting errors when using proprietary data that I have
shp2pgsql'ed, so I can't provide that.  The data is census tracts and
zipcodes for two states, along with associated data for populations.

I have attached a script that runs a sql script over and over again until I
get a failure.  I also attached the SQL script.  It always happens on the
CREATE TABLE near the end.

Log output:
pgsql[0]$ LOG:  database system was shut down at 2009-11-15 12:44:59 PST
LOG:  database system is ready to accept connections
LOG:  autovacuum launcher started
LOG:  server process (PID 29206) was terminated by signal 11: Segmentation
fault
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.
LOG:  all server processes terminated; reinitializing
LOG:  database system was interrupted; last known up at 2009-11-15 12:45:46
PST
LOG:  database system was not properly shut down; automatic recovery in
progress
LOG:  redo starts at 1/6BE203D4
LOG:  unexpected pageaddr 1/657BC000 in log file 1, segment 108, offset
8110080
LOG:  redo done at 1/6C7BBFB0
LOG:  database system is ready to accept connections
LOG:  autovacuum launcher started

SQL statement at which point we died:

create table crosswalk as
        select a.id as zip, b.id as tractfips, 0.0 as area, 0.0 as propzip,
0.0 as proptract,
                                st_intersection(a.the_geom, b.the_geom) as
the_geom, a.the_geom as zip_geom, b.the_geom as tract_geom
                from orwa_zp a , orwa_tr b
                where st_intersects(a.the_geom, b.the_geom);

wsprague=# select * from postgis_full_version()
wsprague-# ;

postgis_full_version
----------------------------------------------------------------------------------------
 POSTGIS="1.4.0" GEOS="3.1.1-CAPI-1.6.0" PROJ="Rel. 4.7.1, 23 September
2009" USE_STATS
(1 row)


wsprague=# select * from version();

version
-------------------------------------------------------------------------------------------------------------------------------------------------
 PostgreSQL 8.4.1 on i386-apple-darwin8.11.1, compiled by GCC
i686-apple-darwin8-gcc-4.0.1 (GCC) 4.0.1 (Apple Computer, Inc. build 5367),
32-bit
(1 row)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20091115/bf1be737/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: runme.sh
Type: application/x-sh
Size: 776 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20091115/bf1be737/attachment.sh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tutorial.sql
Type: application/octet-stream
Size: 2960 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20091115/bf1be737/attachment.obj>


More information about the postgis-devel mailing list