methodmissing / rbczmq

Ruby extension that wraps the official high level ZeroMQ C API ( http://czmq.zeromq.org/ )
http://github.com/methodmissing/rbczmq
MIT License
125 stars 32 forks source link

Segmentation fault @zmq.rb:30 #59

Closed EHadoux closed 8 years ago

EHadoux commented 8 years ago

Hello,

I've installed iruby as indicated at https://github.com/SciRuby/iruby but when I launch the kernel, I have a segfault in rbczmq. I am under Ubuntu.

/var/lib/gems/2.3.0/gems/rbczmq-1.7.9/lib/zmq.rb:30: [BUG] Segmentation fault at 0x00000000000000
ruby 2.3.0p0 (2015-12-25) [x86_64-linux-gnu]

-- Control frame information -----------------------------------------------
c:0013 p:---- s:0053 e:000052 CFUNC  :addstr
c:0012 p:0011 s:0049 e:000048 BLOCK  /var/lib/gems/2.3.0/gems/rbczmq-1.7.9/lib/zmq.rb:30 [FINISH]
c:0011 p:---- s:0046 e:000045 CFUNC  :each
c:0010 p:0026 s:0043 e:000042 METHOD /var/lib/gems/2.3.0/gems/rbczmq-1.7.9/lib/zmq.rb:30
c:0009 p:0126 s:0038 e:000036 METHOD /var/lib/gems/2.3.0/gems/iruby-0.2.9/lib/iruby/session/rbczmq.rb:56
c:0008 p:0016 s:0029 e:000028 METHOD /var/lib/gems/2.3.0/gems/iruby-0.2.9/lib/iruby/kernel.rb:71
c:0007 p:0010 s:0025 e:000024 METHOD /var/lib/gems/2.3.0/gems/iruby-0.2.9/lib/iruby/kernel.rb:35
c:0006 p:0236 s:0022 e:000021 METHOD /var/lib/gems/2.3.0/gems/iruby-0.2.9/lib/iruby/command.rb:70
c:0005 p:0212 s:0015 e:000014 METHOD /var/lib/gems/2.3.0/gems/iruby-0.2.9/lib/iruby/command.rb:34
c:0004 p:0060 s:0012 e:000011 TOP    /var/lib/gems/2.3.0/gems/iruby-0.2.9/bin/iruby:5 [FINISH]
c:0003 p:---- s:0010 e:000009 CFUNC  :load
c:0002 p:0147 s:0006 E:001540 EVAL   /usr/local/bin/iruby:23 [FINISH]
c:0001 p:0000 s:0002 E:001fb0 (none) [FINISH]

-- Ruby level backtrace information ----------------------------------------
/usr/local/bin/iruby:23:in `<main>'
/usr/local/bin/iruby:23:in `load'
/var/lib/gems/2.3.0/gems/iruby-0.2.9/bin/iruby:5:in `<top (required)>'
/var/lib/gems/2.3.0/gems/iruby-0.2.9/lib/iruby/command.rb:34:in `run'
/var/lib/gems/2.3.0/gems/iruby-0.2.9/lib/iruby/command.rb:70:in `run_kernel'
/var/lib/gems/2.3.0/gems/iruby-0.2.9/lib/iruby/kernel.rb:35:in `run'
/var/lib/gems/2.3.0/gems/iruby-0.2.9/lib/iruby/kernel.rb:71:in `send_status'
/var/lib/gems/2.3.0/gems/iruby-0.2.9/lib/iruby/session/rbczmq.rb:56:in `send'
/var/lib/gems/2.3.0/gems/rbczmq-1.7.9/lib/zmq.rb:30:in `Message'
/var/lib/gems/2.3.0/gems/rbczmq-1.7.9/lib/zmq.rb:30:in `each'
/var/lib/gems/2.3.0/gems/rbczmq-1.7.9/lib/zmq.rb:30:in `block in Message'
/var/lib/gems/2.3.0/gems/rbczmq-1.7.9/lib/zmq.rb:30:in `addstr'

-- Machine register context ------------------------------------------------
 RIP: 0x00007f239cf13690 RBP: 0x00007f239d255b20 RSP: 0x00007ffe483aa510
 RAX: 0x00007ffe483aa58f RBX: 0x0000000001f3a9d0 RCX: 0x000000000000007c
 RDX: 0x00007f239d255b28 RDI: 0x00007ffe483aa590 RSI: 0x00000000000002f0
  R8: 0x0000000001f3a9b0  R9: 0x0000000000000001 R10: 0x00007f239d255b88
 R11: 0x00007f239cfdf6d0 R12: 0x0000000000000020 R13: 0x00007f239d255b78
 R14: 0x0000000000002710 R15: 0x006506239d255b78 EFL: 0x0000000000010287

-- C level backtrace information -------------------------------------------

I suppose it's more a rbczmq problem than an iruby one, right? Thanks!

thomasjm commented 8 years ago

@EHadoux I'm seeing the same thing on Ubuntu 16.04 -- did you figure out a fix?

EHadoux commented 8 years ago

@thomasjm Actually, another library was mentioned somewhere (can't remember if it was here, in the iruby repo or on stackoverflow about this error, sorry :( ) I have installed that one instead of rbczmq and it works ever since. I can't be more precise, I'm on holidays, sorry. As soon as I get back I'll tell you if it's still an issue for you.

thomasjm commented 8 years ago

@EHadoux I'm still looking for a solution, any chance you're back yet?

thomasjm commented 8 years ago

Actually nvm! I installed ffi-rzmq and it worked

OmanF commented 8 years ago

I was having the same issue but, like @thomasjm remarked, removing rbczmq and opting for ffi-rzmq solved the issue.

EHadoux commented 8 years ago

Yes, I should close this issue, my bad. For posterity: install ffi-rzmq instead.

motivic commented 8 years ago

I'm having a similar problem, but on Arch Linux. I replacing rbczmq with ffi-rzmq but it did not solve the problem. I'm going to try using jRuby and see if that helps.