-
Notifications
You must be signed in to change notification settings - Fork 163
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
Segfaults with zeromq-4.1.5, but not 4.1.6 with Go 1.9 #117
Comments
I'm seeing this too w/ |
Nevermind... mine was a different issue (stupidity on my part). |
I'm getting the same issue with any version of ZeroMQ and Go 1.12 |
@antoniomtz any update? |
Just a hint, if you are getting segfaults then note that ZeroMQ is not thread-safe:
This constraint is easy to violate if you are using Goroutines. To avoid this, you'll need to either use explicit locking around zmq operations, or, preferably, put all zmq operations in a single goroutine and use channels to send data to/from other goroutines. |
Shouldn't there be like a huge warning on the README then, especially since it's so easy to do non-thread-safe things in Go? I am currently debugging random crashes involving zeromq and I know now that I'm violating this requirement. So I might have to redesign my application around the requirement that zeromq sockets must be local to one goroutine, locked with |
Currently running Go 1.9 and zeromq-4.1.5 and I'm running into invalid memory address or nil pointer dereference errors.
The following code results in the following errors.
If I upgrade to zeromq 4.1.6, remove and reinstall github.com/pebbe/zmq4 the error goes away and the program works as expected. We currently have 4.1.5 deployed in production and it's not trivial at this time to upgrade to 4.1.6.
The text was updated successfully, but these errors were encountered: