[Tile-serving] [osm2pgsql] Segmentation fault inside geos. (#330)

Evgen Bodunov notifications at github.com
Fri Apr 10 14:44:29 UTC 2015


Segfault happened during import of the planet-150406.osm.pbf. I tried to import planet few times with different versions of osm2pgsql. Bug reproduced in 0.87.2 and in HEAD commit.

if you need some specific info, gdb is still opened on server. And i could provide more data, than just backtrace. 

Command was:
```
gdb --args osm2pgsql --create --flat-nodes flatnodes.bin --cache-strategy dense -v --hstore-all --proj 3857 --prefix planet --slim -C10000 --number-processes 6 --style allIncluded.style planet-150406.osm.pbf
```

And crashlog with backtrace:
```
Allocating memory for dense node cache
Allocating dense node cache in one big chunk
Node-cache: cache=10000MB, maxblocks=1280000*8192, allocation method=10
Mid: loading persistent node cache from flatnodes.bin
Allocated space for persistent node cache file
Maximum node in persistent node cache: 0
Mid: pgsql, scale=100 cache=10000
Setting up table: planet_nodes
Setting up table: planet_ways
Setting up table: planet_rels

Reading in file: planet-latest.osm.pbf
Processing: Node(2798277k 1376.4k/s) Way(280377k 22.29k/s) Relation(191160 94.82/s)
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff712a7fc in geos::algorithm::locate::IndexedPointInAreaLocator::IntervalIndexedGeometry::~IntervalIndexedGeometry (
    this=0x10d08a40, __in_chrg=<optimized out>) at IndexedPointInAreaLocator.cpp:50
50                      delete allocatedSegments[i];
(gdb) bt
#0  0x00007ffff712a7fc in geos::algorithm::locate::IndexedPointInAreaLocator::IntervalIndexedGeometry::~IntervalIndexedGeometry (
    this=0x10d08a40, __in_chrg=<optimized out>) at IndexedPointInAreaLocator.cpp:50
#1  0x00007ffff712a868 in geos::algorithm::locate::IndexedPointInAreaLocator::~IndexedPointInAreaLocator (this=0x10d08a20,
    __in_chrg=<optimized out>) at IndexedPointInAreaLocator.cpp:115
#2  0x00007ffff712a8a9 in geos::algorithm::locate::IndexedPointInAreaLocator::~IndexedPointInAreaLocator (this=0x10d08a20,
    __in_chrg=<optimized out>) at IndexedPointInAreaLocator.cpp:116
#3  0x00007ffff714918e in geos::geom::prep::PreparedPolygon::~PreparedPolygon (this=0x10d08980, __in_chrg=<optimized out>)
    at PreparedPolygon.cpp:50
#4  0x00007ffff7149219 in geos::geom::prep::PreparedPolygon::~PreparedPolygon (this=0x10d08980, __in_chrg=<optimized out>)
    at PreparedPolygon.cpp:56
#5  0x000000000047edd3 in destroy (geom=0x10d08980) at /usr/local/include/geos/geom/prep/PreparedGeometryFactory.h:75
#6  geometry_builder::build_both (this=0x6ce5b0, xnodes=<optimized out>, xcount=<optimized out>, make_polygon=1, enable_multi=0,
    split_at=<optimized out>, osm_id=280282) at geometry-builder.cpp:711
#7  0x0000000000451843 in output_pgsql_t::pgsql_out_relation (this=0x6ce3a0, id=4294967295, rel_tags=0x555e5d0, member_count=-10960,
    xnodes=0x10b9f600, xtags=0xfd7ccd8, xcount=0xf709a40, xid=0xf2d8e50, xrole=0x10b9f600, pending=false) at output-pgsql.cpp:190
#8  0x0000000000452344 in output_pgsql_t::pgsql_process_relation (this=0x12861a80, id=4294967295, members=0xa41, member_count=2625,
    tags=0x10b9f600, exists=310778384, pending=false) at output-pgsql.cpp:522
#9  0x00000000004526e3 in output_pgsql_t::relation_add (this=0x6ce3a0, id=280282, members=0x5566920, member_count=2625, tags=0x555e5d0)
    at output-pgsql.cpp:552
#10 0x0000000000427b4f in osmdata_t::relation_add (this=this at entry=0x7fffffffd9e0, id=280282, members=0x5566920, member_count=2625,
    tags=tags at entry=0x555e5d0) at osmdata.cpp:61
#11 0x000000000046271b in parse_pbf_t::processOsmDataRelations (this=this at entry=0x555e570, osmdata=osmdata at entry=0x7fffffffd9e0,
    group=group at entry=0x8be6220, string_table=string_table at entry=0x8841ad0) at parse-pbf.cpp:467
#12 0x000000000046291d in parse_pbf_t::processOsmData (this=this at entry=0x555e570, osmdata=osmdata at entry=0x7fffffffd9e0,
    data=data at entry=0x7ffd19504010, length=<optimized out>) at parse-pbf.cpp:510
#13 0x0000000000462d9d in parse_pbf_t::streamFile (this=0x555e570, filename=<optimized out>, osmdata=0x7fffffffd9e0) at parse-pbf.cpp:583
#14 0x000000000045f52e in parse_delegate_t::streamFile (this=this at entry=0x7fffffffda10, input_reader=<optimized out>,
    filename=0x6cde58 "planet-latest.osm.pbf", sanitize=0, osmdata=osmdata at entry=0x7fffffffd9e0) at parse.cpp:39
#15 0x000000000040f829 in main (argc=<optimized out>, argv=<optimized out>) at osm2pgsql.cpp:107
```

---
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/issues/330
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20150410/4da901a2/attachment.html>


More information about the Tile-serving mailing list