Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assertion makes osrm-extract fail #6373

Closed
warrenwyf opened this issue Sep 22, 2022 · 8 comments · Fixed by #6382
Closed

Assertion makes osrm-extract fail #6373

warrenwyf opened this issue Sep 22, 2022 · 8 comments · Fixed by #6382

Comments

@warrenwyf
Copy link

I encountered an interruption while executing the osrm-extract command while using Armenia's OSM data:

[assert][0x7000029eb000] /Users/runner/work/osrm-backend/osrm-backend/src/guidance/turn_lane_matcher.cpp:181
in: bool osrm::guidance::lanes::canMatchTrivially(const osrm::guidance::Intersection &, const osrm::guidance::lanes::LaneDataVector &): lane_data[lane].from != INVALID_LANEID
libc++abi: terminating
[1]    87885 abort      node_modules/osrm/lib/binding/osrm-extract  -p

The test data can be downloaded from http://download.geofabrik.de/asia/armenia-latest.osm.pbf

It looks like there may be errors in the data, but because of the assertion, osrm-extract doesn't ignore the errors and interrupts the execution.

@SiarheiFedartsou
Copy link
Member

Do you build OSRM manually? We probably should have disabled asserts in Release mode 🤔

@SiarheiFedartsou
Copy link
Member

Do you build OSRM manually? We probably should have disabled asserts in Release mode 🤔

I can reproduce only if I explicitly build OSRM like:

cmake -DENABLE_ASSERTIONS=ON .. && make -j8

@SiarheiFedartsou
Copy link
Member

SiarheiFedartsou commented Sep 22, 2022

I localized the issue to this function call(after it one of TurnLaneData.from starts to be equal 255)

lane_data = partitionLaneData(node_based_graph.GetTarget(via_edge),

We explicitly set it to 255 (i.e. what causes assert to fire) here

TurnLaneData data = {TurnLaneType::straight, 255, 0};

and this augmentEntry function is expected to set this 255 to something else, but it doesn’t happen

Link to current version of armenia-latest.osm.pbf with which problem is reproducible https://drive.google.com/file/d/116GlPrZOWSFYTMjcB9BnsH31OdGg047H/view?usp=sharing

@warrenwyf
Copy link
Author

Do you build OSRM manually? We probably should have disabled asserts in Release mode 🤔

No, I used the prebuilt binary from node-osrm:

https://github.com/Project-OSRM/osrm-backend/releases/download/v5.26.0/node_osrm-v5.26.0-node-v93-darwin-x64-Release.tar.gz

@mjjbell
Copy link
Member

mjjbell commented Sep 24, 2022

OS X release builds have assertions enabled:

ENABLE_ASSERTIONS: ON

It's probably a historical artifact that can be removed.

@mjjbell
Copy link
Member

mjjbell commented Sep 24, 2022

Actually, I'm also getting assertions on the Linux release build too. Now I am confused.

@warrenwyf
Copy link
Author

Actually, I'm also getting assertions on the Linux release build too. Now I am confused.

Yes, but the executable files in the docker image seems to be fine

@mjjbell mjjbell mentioned this issue Sep 27, 2022
7 tasks
@mjjbell
Copy link
Member

mjjbell commented Sep 28, 2022

This is the problematic intersection: https://www.openstreetmap.org/#map=19/40.17416/44.50071

image

It includes a road whose only possible turn has a restriction applied: https://www.openstreetmap.org/relation/14065440

image

Therefore

  • This intersection could probably do with some remodeling in OSM.
  • OSRM intersection logic should be made robust to these types of mistakes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants