chuckremes / ffi-rzmq

FFI bindings for ZeroMQ so the library can be used under JRuby and other FFI-compliant ruby runtimes
242 stars 62 forks source link

ffi-rzmq(2.0.4) is not compatible with zeromq-4.1.2 #121

Closed dhinesh closed 7 years ago

dhinesh commented 9 years ago

I have installed latest zeromq(4.1.2) from source and getting the following error messages when trying to run request_response.rb and publish_subscribe.rb

devbox@devbox-Inspiron-3442:~/devbox/ffi-rzmq-master/examples$ ruby request_response.rb * Error in `ruby': malloc(): memory corruption: 0x00007f145beb7b50 * Aborted (core dumped) devbox@devbox-Inspiron-3442:~/devbox/ffi-rzmq-master/examples$

devbox@devbox-Inspiron-3442:~/devbox/ffi-rzmq-master/examples$ ruby publish_subscribe.rb sending Bad address (src/fq.cpp:91) Aborted (core dumped) devbox@devbox-Inspiron-3442:~/devbox/ffi-rzmq-master/examples$

I'm using the ruby 2.1.4p265.

Zloy commented 9 years ago

Tests fail with (4.1.2) on Ubuntu 14.02.04

/usr/local/rvm/gems/ruby-2.0.0-p353/gems/ffi-rzmq-2.0.4 > rake
fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
/usr/local/rvm/rubies/ruby-2.0.0-p353/bin/ruby -S rspec ./spec/context_spec.rb ./spec/device_spec.rb ./spec/message_spec.rb ./spec/multipart_spec.rb ./spec/nonblocking_recv_spec.rb ./spec/poll_spec.rb ./spec/pushpull_spec.rb ./spec/reqrep_spec.rb ./spec/socket_spec.rb ./spec/util_spec.rb
fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
...............create streamer device and running...
broke out of wait_for_device loop
device exited
.create streamer device and running...broke out of wait_for_device loop

Assertion failed: check () (src/msg.cpp:248)
/usr/local/rvm/rubies/ruby-2.0.0-p353/bin/ruby -S rspec ./spec/context_spec.rb ./spec/device_spec.rb ./spec/message_spec.rb ./spec/multipart_spec.rb ./spec/nonblocking_recv_spec.rb ./spec/poll_spec.rb ./spec/pushpull_spec.rb ./spec/reqrep_spec.rb ./spec/socket_spec.rb ./spec/util_spec.rb failed
bds commented 9 years ago

If it helps, I used this to install an older version of ZeroMQ on OSX:

$ brew tap homebrew/versions                                                   
$ brew install zeromq32                                                          
$ gem install ffi-rzmq
itskingori commented 9 years ago

I can confirm this with zeromq-4.1.3 as well.

tonobo commented 9 years ago

I already opened an pull request on ffi-rzmq-core package, you could try it out and check if its working, in my cases it solves the segv.

kylekyle commented 8 years ago

This is preventing IRuby from working in Jupyter :(

kylekyle commented 8 years ago

This issue was opened almost a year ago and ffi-rzmq is still not compatible with 4.1.2. Now that pyzmq ships with zeromq-4.1.2, IRuby is broken in every Jupyter installation. Is this project still being maintained? Is there anyone that can pick this up?

somedave commented 8 years ago

Hey I just tried to install iruby and it's not working because of this issue. Help!

chuckremes commented 8 years ago

I need more information. I just tried running libzmq master (4.2.0) using ffi-rzmq-core 1.0.5 and ffi-rzmq 2.0.4 and all specs passed. There were no errors on OS X.

Please provide me with this info: Operating System (if linux, tell me which distro and what release) Ruby version EXACT code you are running to demonstrate error.

kylekyle commented 8 years ago

Well, I just tested in Docker/alpine and it worked great (against libzmq 4.1.4 and Ruby 2.3.1). Maybe the issue was specific to libzmq 4.1.2 - 4.1.3 ... ? Would anyone else mind retesting?

chuckremes commented 8 years ago

@kylekyle Thanks for testing on a recent Ruby and libzmq. Hopefully someone else can confirm and we can close this.

dhinesh commented 8 years ago

Now its working fine with latest version of libzeromq 4.1.4 and ffi-rzmq-core 1.0.5 . Thanks for your information . Previously I have encountered error with Os - Ubuntu 14.04.1 LTS Ruby - 2.3.1 libzeromq - 4.1.2 ffi-rzmq-core-1.0.3 ffi-rzmq-2.0.4