Project-OSRM / osrm-backend

Open Source Routing Machine - C++ backend
http://map.project-osrm.org
BSD 2-Clause "Simplified" License
6.33k stars 3.34k forks source link

OSRM osrm-extract Fails with tbb::captured_exception on Large OSM Files (9.9 GB, 1.1 GB) #7030

Closed Rajakumar-Iyyemperumal closed 1 week ago

Rajakumar-Iyyemperumal commented 2 weeks ago

Issue

I'm encountering an issue while trying to process large OSM map files using osrm-extract on a Virtual Machine running Ubuntu. The process fails with the following error when extracting large maps like us-latest.osm.pbf (9.9 GB) and california-latest.osm.pbf (1.1 GB):

_terminate called after throwing an instance of 'tbb::capturedexception'

I can able to extract and process norcal-latest.osm.pbf that is about 500 MB

Specifications

OSRM Version: 5.26.0 System: Ubuntu 20.04.6 (VM on Windows 11, allocated 6 GB RAM, 4 Processors for VM) OSM Files: us-latest.osm.pbf (9.9 GB) and california-latest.osm.pbf (1.1 GB) Error Message: terminate called after throwing an instance of 'tbb::captured_exception'

Questions

The process works fine for smaller map files, but fails for these larger ones. Is this a known issue with handling large maps, or are there any additional configuration settings I can try to resolve this?

Any guidance or recommendations would be greatly appreciated. Thank you!

Regards, Rajakumar R I

jcoupey commented 2 weeks ago

The process works fine for smaller map files, but fails for these larger ones

Hard to tell without looking at the full stack trace but you're most probably running out of RAM. 6GB is quite low to run extraction on an extract with a significant size.

tombay commented 1 week ago

I have a ubuntu system with 16g RAM and 32g swap. osrm-extract dach-latest.osm.pbf (5.3g) reaches a virtual peak of 49.8g. with a RSS of 15.1g I can successfully run the extract in just over 3 hours (189 mins with usertime of 90 mins). I imagine with only 6g it might take somewhat longer %-)

jcoupey commented 1 week ago

You need to either have more RAM, or swap (could be quite slow).