-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Deadlock using osrm-datastore
while requests are being served
#1888
Comments
Simpler reproduction recipe:
You can now kill
Re-running |
Can reproduce, perfect. I could hunt it down to the line where the |
|
The problem here is caused by toggling between LAYOUT_1 and LAYOUT_2. If |
There appears to be a race condition where Generally, single-threaded requestors against a single |
This needs a bigger restructuring of Closing after the partial fix is merged. |
Under some circumstances, it seems that
osrm-datastore
can deadlock if routing requests are being served at the same time.To reproduce the problem:
osrm-datastore whatever.osrm
to load the initial datasetosrm-routed -s
to load data from shared memory.while true ; do curl 'http://localhost:5000/viaroute?loc=39.22693426244916,-75.59280395507812&loc=39.06451486901886,-75.465087890625' ; done
osrm-datastore
, like so:while true ; ./osrm-datastore whatever.osrm ; done
In a perfect world, the locking would work properly and routing wouldn't be interrupted. However, very shortly after starting the
osrm-datastore
loop, I start seeing errors like this:Then, within a few seconds, everything stops completely, and
osrm-routed
appears to be stuck in a busy loop.Killing the
curl
loop does not unlock things.osrm-routed
responds to requests with{"status": 500,"status_message":"Internal Server Error"}
and does not close the socket (leading tocurl
hanging).Killing the
osrm-datastore
loop does not resurrectosrm-routed
.Killing the
osrm-datastore
loop and restartingosrm-routed
does seem to bring things back to life, so it doesn't look like any routing data is getting corrupted, just locking state.The text was updated successfully, but these errors were encountered: