[Tile-serving] [openstreetmap/osm2pgsql] osm2pgsql segment fault with large node numbers (#578)

bob-zscharnagk notifications at github.com
Wed May 4 06:15:55 UTC 2016


Hi,

I on Ubuntu 14.4 running osm2pgsql (osm2pgsql SVN version 0.85.0 (64bit id space)) to import some map data and I get a segment fault.  This is the output:-

bob at oms:~$ osm2pgsql --append -C 16000 --cache-strategy sparse -v  /tmp/srtm.osm_01_01.pbf
osm2pgsql SVN version 0.85.0 (64bit id space)

Using projection SRS 900913 (Spherical Mercator)
Setting up table: planet_osm_point
NOTICE:  table "planet_osm_point_tmp" does not exist, skipping
Setting up table: planet_osm_line
NOTICE:  table "planet_osm_line_tmp" does not exist, skipping
Setting up table: planet_osm_polygon
NOTICE:  table "planet_osm_polygon_tmp" does not exist, skipping
Setting up table: planet_osm_roads
NOTICE:  table "planet_osm_roads_tmp" does not exist, skipping
Using built-in tag processing pipeline
Allocating memory for sparse node cache
Node-cache: cache=16000MB, maxblocks=2048000*8192, allocation method=1
Mid: Ram, scale=100

Reading in file: /tmp/srtm.osm_01_01.pbf
Processing: Node(32170k 5361.7k/s) Way(0k 0.00k/s) Relation(0 0.00/s)Segmentation fault (core dumped)

Removing '--cache-strategy optimized' or '--cache-strategy dense' causes the fault to happen before the 'Processing....' line is output!

I created a very small osm file from the data, shown below, and still get the error.

<?xml version='1.0' encoding='UTF-8'?>
<osm version="0.6" generator="osmconvert 0.8.5">
	<bounds minlat="-40.9499999" minlon="173.53" maxlat="-38.4699999" maxlon="178.2000002"/>
	<node id="1353500000000" lat="-38.7604166" lon="174.73375"/>
	<node id="1353500000001" lat="-38.7595833" lon="174.7345833"/>
	<node id="1353500000002" lat="-38.7604166" lon="174.7354166"/>
	<node id="1353500000003" lat="-38.76125" lon="174.7345833"/>
	<way id="1353500000000">
		<nd ref="1353500000000"/>
		<nd ref="1353500000001"/>
		<nd ref="1353500000002"/>
		<nd ref="1353500000003"/>
		<nd ref="1353500000000"/>
		<tag k="ele" v="-40"/>
		<tag k="contour" v="elevation"/>
		<tag k="contour_ext" v="elevation_minor"/>
	</way>
</osm>

If I change the node numbers by removing two of the zeros, as shown below, it works.

<?xml version='1.0' encoding='UTF-8'?>
<osm version="0.6" generator="osmconvert 0.8.5">
	<bounds minlat="-40.9499999" minlon="173.53" maxlat="-38.4699999" maxlon="178.2000002"/>
	<node id="13535000000" lat="-38.7604166" lon="174.73375"/>
	<node id="13535000001" lat="-38.7595833" lon="174.7345833"/>
	<node id="13535000002" lat="-38.7604166" lon="174.7354166"/>
	<node id="13535000003" lat="-38.76125" lon="174.7345833"/>
	<way id="13535000000">
		<nd ref="13535000000"/>
		<nd ref="13535000001"/>
		<nd ref="13535000002"/>
		<nd ref="13535000003"/>
		<nd ref="13535000000"/>
		<tag k="ele" v="-40"/>
		<tag k="contour" v="elevation"/>
		<tag k="contour_ext" v="elevation_minor"/>
	</way>
</osm>

Is this a bug or just my error somehow?

Thanks.

Bob



---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/issues/578
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20160503/0b7cf373/attachment.html>


More information about the Tile-serving mailing list