-
Notifications
You must be signed in to change notification settings - Fork 50
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
Failure in multi-threaded application with GoogleCloud.jl and HTTP.jl #240
Comments
Hmmmm.....looking through the involved code, it doesn't seem like there's anything obviously non-multithread-safe. Though I also can't find documentation that the call to HTTP.jl itself has had threadsafety issues in the 0.9 releases; the 1.0 release just came out that should resolve those, but I don't think GoogleCloud has updated for compatibility there yet (hopefully not too hard). But it doesn't look like this particular code path deals w/ HTTP.jl at all. |
Thanks for taking a look, @quinnj . I'm looking at GoogleCloud.jl/src/session.jl:26, and considering I have a shared global And that might not be the whole story, because sometimes I get a segfault or a double-free error, the kind of thing we would really call non-thread-safe. But that's more difficult to reproduce. |
GoogleCloud.jl methods can take an optional |
I thought the problem was gone after I started using separate session objects, but I've actually got the issue again. I'll try to come up with a minimal example... |
I have created a short script that reproduces the issue, here's how it goes:
Running with I'm sorry I can't share my data, I can try to set up something public if it helps. It's not always the same error. One of the errors I get is what I'm seeing most often in my real code, This looks to me like something in MbedTLS not being thread-safe, even with separate |
I don't know why I didn't see this before, but there really seem to be known issues with MbedTLS in multiple threads: I created a PR on GoogleCloud.jl, but should anything be done in this library? At least a warning in the documentation, perhaps? |
Should have been fixed via #245 |
I'm working with GoogleCloud.jl, which depends on MbedTLS.jl. Sometimes I've been getting errors like this:
I'm thinking it might be due to thread conflicts. Is MbedTLS thread-safe? Any recommendations how I might debug this? Or perhaps this might need to be fixed within GoogleCloud.jl?
The text was updated successfully, but these errors were encountered: