vroom: Invalid shared memory region

In relation to #181

Using OSRM v5.22.0 and VROOM v1.4.0. I’ve ran the following:

$ osrm-datastore --dataset-name=eu-car /opt/osrm/data/europe-latest/europe-latest.osrm
[info] Data layout has a size of 2207 bytes
[info] Allocating shared memory of 8194463535 bytes
[info] Data layout has a size of 2248 bytes
[info] Allocating shared memory of 21025700650 bytes
[info] All data loaded. Notify all client about new data in:
[info] eu-car/static    0
[info] eu-car/updatable 1
[info] All clients switched.

$ node src/index.js -p 5000 -r libosrm --path /opt/osrm/vroom/bin/
vroom-express listening on port 5000!

$ curl --header "Content-Type:application/json" --data '{"vehicles":[{"id":0,"profile":"eu-car","start":[2.3526,48.8604],"end":[2.3526,48.8604]}],"jobs":[{"id":0,"location":[2.3691,48.8532]},{"id":1,"location":[2.2911,48.8566]}],"options":{"g":true}}' http://localhost:5000
{"code":3,"error":"Invalid shared memory region: eu-car"}

The Node server outputs:

Wed, 10 Jul 2019 09:34:27 GMT - [Error] Invalid shared memory region: eu-car

Any ideas?

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 27

Most upvoted comments

Looks like the interface for using named shared memory changed somewhere between OSRM v5.19.0 and v5.22.0. 😕

Building vroom against libosrm v5.19.0 does not issue any warning, while building with v5.22.0 installed triggers a warning that is certainly related:

g++ -MMD -MP -I. -std=c++14 -Wextra -Wpedantic -Wall -O3 -std=c++14 -DBOOST_TEST_DYN_LINK -DBOOST_SPIRIT_USE_PHOENIX_V3 -DBOOST_RESULT_OF_USE_DECLTYPE -DBOOST_FILESYSTEM_NO_DEPRECATED -I/usr/include/lua5.2 -I/usr/local/include -I/usr/local/include/osrm -D USE_LIBOSRM=true -c routing/libosrm_wrapper.cpp -o routing/libosrm_wrapper.o
routing/libosrm_wrapper.cpp: In constructor ‘vroom::routing::LibosrmWrapper::LibosrmWrapper(const string&)’:
routing/libosrm_wrapper.cpp:38:18: warning: missing initializer for member ‘osrm::engine::EngineConfig::dataset_name’ [-Wmissing-field-initializers]
     _osrm(_config) {
                  ^