osrm-backend icon indicating copy to clipboard operation
osrm-backend copied to clipboard

Loading osrm file for `Testbot - Travel time matrix of network with unroutable parts` from shared memory causes a SIGABRT for Macbooks

Open ghoshkaj opened this issue 8 years ago • 2 comments

On Macbooks the cucumber testScenario: Testbot - Travel time matrix of network with unroutable parts fails with the error:

*** running /Users/danpat/mapbox/osrm-backend/build/osrm-routed --shared-memory=1 -p 5000 -a CH
[info] starting up engines, v5.17.0
[info] Loading from shared memory
[info] Threads: 4
[info] IP address: 0.0.0.0
[info] IP port: 5000
libc++abi.dylib: terminating with uncaught exception of type osrm::util::exception: Dataset is not compatible with CH
*** osrm-routed exited with code 0

Running with MLD also fails:

*** running /Users/danpat/mapbox/osrm-backend/build/osrm-routed --shared-memory=1 -p 5000 -a MLD
[info] starting up engines, v5.17.0
[info] Loading from shared memory
[info] Threads: 4
[info] IP address: 0.0.0.0
[info] IP port: 5000
libc++abi.dylib: terminating with uncaught exception of type osrm::util::exception: Dataset is not compatible with MLD.
*** osrm-routed exited with code 0

This is only a problem if the data is loaded from shared memory. Loading the .osrm file directly into osrm-routed doesn't cause this failure:

✔ ~/Mapbox/osrm-backend/build [implement-cache|✚ 2…4⚑ 3]
10:43 $ ./osrm-datastore /Users/kajari/Mapbox/osrm-backend/test/cache/testbot/distance_matrix.feature/cb285488aeca2c091aa68efd40040703/b085b1a6d69393a4613970f95161cbd9/93_testbot_travel_time_matrix_of_network_with_unroutable_parts.osrm
[info] Loading data into REGION_2
[info] load names from: "/Users/kajari/Mapbox/osrm-backend/test/cache/testbot/distance_matrix.feature/cb285488aeca2c091aa68efd40040703/b085b1a6d69393a4613970f95161cbd9/93_testbot_travel_time_matrix_of_network_with_unroutable_parts.osrm.names"
[info] Allocating shared memory of 72843 bytes
[info] All data loaded. Notify all client about new data in REGION_2 with timestamp 16
[info] Marking old shared memory region REGION_1 for removal...
[info] ok.
[info] Waiting for clients to detach...
[info]  ok.
[info] All clients switched.
✔ ~/Mapbox/osrm-backend/build [implement-cache|✚ 2…4⚑ 3]
10:44 $ ./osrm-routed -s
[info] starting up engines, v5.17.0
[info] Loading from shared memory
[info] Threads: 4
[info] IP address: 0.0.0.0
[info] IP port: 5000
libc++abi.dylib: terminating with uncaught exception of type osrm::util::exception: Dataset is not compatible with CH
Abort trap: 6

Digging into it a bit more shows that in https://github.com/Project-OSRM/osrm-backend/blob/31d6d74f90fa760aa8d1f312c2593dabcbc9a69b/include/engine/engine.hpp#L155-L156, layout->GetBlockSize(storage::DataLayout::CH_GRAPH_EDGE_LIST) evaluates to zero, causing CheckCompatibility to return false. Why?!

ghoshkaj avatar Mar 09 '18 15:03 ghoshkaj

Note that if you run all tests in this file, the test in question seems to pass just fine.

danpat avatar Mar 09 '18 15:03 danpat

@ghoshkaj the test passes incorrectly due to a missing CH compatibility check after data rotations.

Steps to fix:

oxidase avatar Mar 14 '18 07:03 oxidase