-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
SIGSEGV libosrm with node12 #5841
Comments
I've got a possible fix over in: however, I'm not 100% confident it's correct. I was able to reproduce the issue above by hammering a local After the PR above, I've been able to run it for 30 minutes with no crash. I think the problem is that we've got threads calling ^^ this re-assignment of The fix I implemented makes the segfault less likely, but I don't think addresses the core problem of calling functions on an object that's undergoing destruction. |
Ran this under
|
Perhaps we could block calls with a lock when data swap is triggered? |
@vladf90 Yeah, I went ahead and did that in the PR. I think the original either didn't realize this particular bit of code wasn't safe, or was attempting to make it lock-free to not impact request performance. I benchmarked having a lock in place and it doesn't seem to have any significant impact. |
I can confirm that it works as expected now. I've been running the new build for almost 24h and no crash so far. Thank you for solving this so fast! |
Hey! I am receiving segfault when using libosrm 5.22 with node12 bindings. The service crashes when we are using
route
method and in the same time we are loading new dataset into shared memory withosrm-datastore
. Crashes are happening when usingexclude
parameter from route method, otherwise seems to work fine. I couldn't reproduce the problem on localhost, so I don't have a dataset that could help debugging this. The node process runs in docker container with--ipc=host
.I also have a stack trace:
The text was updated successfully, but these errors were encountered: