You are not logged in.
- Topics: Active | Unanswered
Announcement
Please create new topics on the new site at community.openstreetmap.org. We expect the migration of data will take a few weeks, you can follow its progress here.***
Pages: 1
#1 2011-04-07 23:19:15
- rukus
- Member

- Registered: 2011-04-01
- Posts: 37
- Website
osm2pgsql - Seg Fault
Hi geeks,
I was trying to import some data using osm2pgsql on Ubuntu but had no luck with partial files of Ukraine or Turkey - here is output:
postgres@seth-desktop:/media/store/OSM/osm2pgsql$ ./osm2pgsql -lsc -O gazetteer -C 500 -d gazetteer turkey.osm.bz2
osm2pgsql SVN version 0.70.5
Using projection SRS 4326 (Latlong)
NOTICE: table "place" does not exist, skipping
NOTICE: type "keyvalue" does not exist, skipping
NOTICE: type "wordscore" does not exist, skipping
NOTICE: type "stringlanguagetype" does not exist, skipping
NOTICE: type "keyvaluetype" does not exist, skipping
NOTICE: function get_connected_ways(pg_catalog.int4[]) does not exist, skipping
Mid: pgsql, scale=10000000, cache=500MB, maxblocks=64001*8192
Setting up table: planet_osm_nodes
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "planet_osm_nodes_pkey" for table "planet_osm_nodes"
Setting up table: planet_osm_ways
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "planet_osm_ways_pkey" for table "planet_osm_ways"
Setting up table: planet_osm_rels
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "planet_osm_rels_pkey" for table "planet_osm_rels"
Reading in file: turkey.osm.bz2
Processing: Node(2490k) Way(140k) Relation(1105) parse time: 80s
Node stats: total(2490850), max(1234826715)
Way stats: total(140727), max(107445058)
Relation stats: total(1105), max(1526723)
node cache: stored: 2490850(100.00%), storage efficiency: 8.25%, hit rate: 100.00%
Stopping table: planet_osm_nodes
Stopping table: planet_osm_rels
Stopping table: planet_osm_ways
Building index on table: planet_osm_rels
Stopped table: planet_osm_nodes
Building index on table: planet_osm_ways
Stopped table: planet_osm_rels
Stopped table: planet_osm_ways
Segmentation fault
Can anyone help me with this problem?
Offline
#2 2011-04-08 21:06:40
- Ldp
- Member
- From: NL - Zeeland
- Registered: 2008-07-22
- Posts: 820
Re: osm2pgsql - Seg Fault
Where did you get those planet extract files?
Also, the segfault happens long after the extract files have been processed. Those 'Stopped table' messages are part of the index building and vacuum analyse parts of osm2pgsql. You might want to run osm2pgsql in gdb to gather more info about what exactly it's doing when it segfaults.
Offline
#3 2011-04-09 11:19:47
- rukus
- Member

- Registered: 2011-04-01
- Posts: 37
- Website
Re: osm2pgsql - Seg Fault
I got osm from http://download.geofabrik.de/osm/europe/
Ok I will try to run it in gdb - thanks.
Offline
#4 2011-04-09 11:48:46
- rukus
- Member

- Registered: 2011-04-01
- Posts: 37
- Website
Re: osm2pgsql - Seg Fault
Here is output in gdb:
[New Thread 0x7ffff2c6c700 (LWP 14677)]
Stopping table: planet_osm_nodes
[New Thread 0x7ffff246b700 (LWP 14678)]
Stopping table: planet_osm_ways
[New Thread 0x7ffff1c6a700 (LWP 14679)]
Stopping table: planet_osm_rels
Building index on table: planet_osm_ways
Stopped table: planet_osm_nodes
[Thread 0x7ffff2c6c700 (LWP 14677) exited]
Building index on table: planet_osm_rels
Stopped table: planet_osm_rels
[Thread 0x7ffff1c6a700 (LWP 14679) exited]
Stopped table: planet_osm_ways
[Thread 0x7ffff246b700 (LWP 14678) exited]
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff61a40e4 in fclose () from /lib/x86_64-linux-gnu/libc.so.6
Offline
#5 2011-04-10 14:05:54
- Ldp
- Member
- From: NL - Zeeland
- Registered: 2008-07-22
- Posts: 820
Re: osm2pgsql - Seg Fault
A stack trace would be more helpful.
Offline
#6 2011-04-10 18:51:57
- rukus
- Member

- Registered: 2011-04-01
- Posts: 37
- Website
Re: osm2pgsql - Seg Fault
I found problem: i was starting osm2pgsql under postgres user - when i started it from regular user - import was completed normally.
Offline
#7 2011-04-10 19:01:23
- Ldp
- Member
- From: NL - Zeeland
- Registered: 2008-07-22
- Posts: 820
Re: osm2pgsql - Seg Fault
It still shouldn't segfault, but glad to hear it now works for you.
Offline
#8 2011-04-10 22:22:34
- rukus
- Member

- Registered: 2011-04-01
- Posts: 37
- Website
Re: osm2pgsql - Seg Fault
Thanks for your interest in my problem - i'm really appreciate it. But i can't search addresses - this is other problem so i will start new thread.
Offline
Pages: 1