[Tile-serving] [osm2pgsql] Segmentation fault (#290)
Vincent
notifications at github.com
Fri Feb 13 21:18:49 UTC 2015
Hello,
I have segfaults while osm2pgsql is reading my XML. The files are exported from JOSM and containing elements from the API test server (it's working fine with XML files containing elements from the live server).
turman at entropy:~/Workspace/GGTS$~/Software/osm2pgsql/bin/osm2pgsql -c -v -C 1000 -d osm_osm2pgsql_test ~/Workspace/JOSM/test-crash.osm
osm2pgsql SVN version 0.87.2-dev (64bit id space)
Using built-in tag processing pipeline
Using projection SRS 900913 (Spherical Mercator)
Setting up table: planet_osm_point
Setting up table: planet_osm_line
Setting up table: planet_osm_polygon
Setting up table: planet_osm_roads
Allocating memory for dense node cache
Allocating dense node cache in one big chunk
Allocating memory for sparse node cache
Sharing dense sparse
Node-cache: cache=1000MB, maxblocks=128000*8192, allocation method=3
Mid: Ram, scale=100
Reading in file: /home/turman/Workspace/JOSM/test-crash.osm
Erreur de segmentation
Logs with strace:
write(2, "\nReading in file: /home/turman/W"..., 61
Reading in file: /home/turman/Workspace/JOSM/test-crash.osm
) = 61
time(NULL) = 1423862107
brk(0x1813000) = 0x1813000
futex(0x7f206caff6e8, FUTEX_WAKE_PRIVATE, 2147483647) = 0
time(NULL) = 1423862107
open("/home/turman/Workspace/JOSM/test-crash.osm", O_RDONLY) = 7
read(7, "<?xm", 4) = 4
read(7, "l version='1.0' encoding='UTF-8'"..., 4096) = 436
read(7, "", 4096) = 0
time([1423862107]) = 1423862107
time([1423862107]) = 1423862107
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++
Erreur de segmentation
I've tried to find which XML elements was causing crashes and at the end I can see that even an very basic XML content causes a crash :
<?xml version='1.0' encoding='UTF-8'?>
<osm version='0.6' upload='true' generator='JOSM'>
<node id='4298138009' visible='true' version='1' changeset='56614' lat='48.8437993' lon='2.3729329' />
<node id='4298138026' visible='true' version='1' changeset='56614' lat='48.844187' lon='2.3723893' />
<way id='4296639452' visible='true' version='1' changeset='56614'>
<nd ref='4298138009' />
<nd ref='4298138026' />
</way>
</osm>
If I remove the <way> element there's no more segfault !
I was testing with the osm2pgsql package from Debian Wheezy (0.80) but I've the same behavior with the latest Git version
Thanks for the help, Vincent.
---
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/issues/290
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20150213/6650f710/attachment.html>
More information about the Tile-serving
mailing list