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

Last ZMQ API call to socket_recv_string failed with "Context was terminated" #301

Open
brianstien opened this issue Feb 9, 2016 · 1 comment

Comments

@brianstien
Copy link
Contributor

When multiple threads are initializing the zmq context at the same time, this instance variable is not threadsafe. The resulting error will read Last ZMQ API call to socket_recv_string failed with "Context was terminated".

I am not sure if it is the responsibility of this gem to initialize the zmq context in a thread-safe manner or is the responsibility of an external caller. I will issue a PR if this should be fixed here.

Also, I can post a minimum viable reproduction if needed but but current reproduction in inside a web server I am testing. Happy to boil this down if someone picks this up.

@liveh2o
Copy link
Contributor

liveh2o commented Feb 18, 2016

Since the RPC server is part of this gem and that's what initializes the threads, I think we should fix it here. Are you thinking we should use a mutex?

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

No branches or pull requests

2 participants