-
Notifications
You must be signed in to change notification settings - Fork 176
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
Not Thread Safe? #190
Comments
Looks like thread safety is a feature of v5 and later, so I'll try moving to that. |
I'm running the latest / greatest (geos (5.0.0), GEOSwift (7.1.0)) and still seeing data race issues like:
Anyone know how to resolve this? |
Looks like this is the same issue we saw in #192 |
Ah, that's the one I should have updated. Apologies for that. |
No problem. At any rate, the issue is in the underlying geos C/C++ library (https://trac.osgeo.org/geos/ticket/1012), so you'd need to submit a patch there to see it fixed. Keep in mind that since GEOSwift (as of this writing) never uses the interrupt mechanism, the value that is being written by multiple threads is never read, so it shouldn't create any problems for your application. If you're able to get a patch merged into a geos release, we can definitely update GEOSwift to use the new version. I can imagine these warnings are a nuisance to you. If you just want to ignore specific ones, it looks like there is a way to do so: |
Thank you. Just to double check: does the second warning about simultaneous writes to addRef() also have no practical impact on the application? I'm happy to ignore these if that's the case. |
Ah, I missed that there was a second one. Thanks for double checking. So far, from what I can tell, it seems like every geos context uses a shared |
Opened. https://trac.osgeo.org/geos/ticket/1052 Based on my reading of the geos source, I don't think this is going to create any actual problems, but I'd feel better if it weren't happening at all. |
Thanks! Please let me know if anyone needs additional information from me. |
I have a rather complicated app that makes use of GEOSwift (currently 4.1.0 with geos 4.0.1) in several classes. I'm testing my app with Thread Sanitizer enabled and it seems that all is not thread safe at the geos layer. The sanitizer is finding concurrent access to the reference count in the GeometryFactory class.
The error below shows two threads in entirely different portions of my app: one handles placement of weather radar data, another handles airspace tracking. The only thing they have in common is that they both create polygons using GEOSwift.
Any suggestions?
The text was updated successfully, but these errors were encountered: