Friday, November 11, 2011

Getting error "[BUG] unknown type 0x22 (0xc given)" with ZMQ

Installed ZMQ successfully, but while testing ZMQ commands from rails console got error.


ritesh@ritesh:~/projects/zmqtest$ rails c
Loading development environment (Rails 3.0.0)
ruby-1.9.2-p290 :001 > require "zmq"
 => ["ZMQ"]
ruby-1.9.2-p290 :002 > c = ZMQ::Context.new
 => #<ZMQ::Context:0xbbf18cc>
ruby-1.9.2-p290 :003 > req = c.socket ZMQ::REQ
(irb):3: [BUG] unknown type 0x22 (0xc given)
ruby 1.9.2p290 (2011-07-09 revision 32553) [i686-linux]


-- control frame ----------
c:0029 p:---- s:0105 b:0105 l:000104 d:000104 CFUNC  :socket
c:0028 p:0020 s:0101 b:0101 l:00264c d:000eb8 EVAL   (irb):3
c:0027 p:---- s:0098 b:0098 l:000097 d:000097 FINISH
c:0026 p:---- s:0096 b:0096 l:000095 d:000095 CFUNC  :eval
c:0025 p:0028 s:0089 b:0089 l:000088 d:000088 METHOD /home/ritesh/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/irb/workspace.rb:80
c:0024 p:0033 s:0082 b:0081 l:000080 d:000080 METHOD /home/ritesh/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/irb/context.rb:254
c:0023 p:0031 s:0076 b:0076 l:002684 d:000075 BLOCK  /home/ritesh/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/irb.rb:159
c:0022 p:0042 s:0068 b:0068 l:000067 d:000067 METHOD /home/ritesh/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/irb.rb:273
c:0021 p:0011 s:0063 b:0063 l:002684 d:000062 BLOCK  /home/ritesh/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/irb.rb:156
c:0020 p:0144 s:0059 b:0059 l:000042 d:000058 BLOCK  /home/ritesh/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/irb/ruby-lex.rb:243
c:0019 p:---- s:0056 b:0056 l:000055 d:000055 FINISH
c:0018 p:---- s:0054 b:0054 l:000053 d:000053 CFUNC  :loop
c:0017 p:0009 s:0051 b:0051 l:000042 d:000050 BLOCK  /home/ritesh/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/irb/ruby-lex.rb:229
c:0016 p:---- s:0049 b:0049 l:000048 d:000048 FINISH
c:0015 p:---- s:0047 b:0047 l:000046 d:000046 CFUNC  :catch
c:0014 p:0023 s:0043 b:0043 l:000042 d:000042 METHOD /home/ritesh/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/irb/ruby-lex.rb:228
c:0013 p:0046 s:0040 b:0040 l:002684 d:002684 METHOD /home/ritesh/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/irb.rb:155
c:0012 p:0011 s:0037 b:0037 l:0016cc d:000036 BLOCK  /home/ritesh/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/irb.rb:70
c:0011 p:---- s:0035 b:0035 l:000034 d:000034 FINISH
c:0010 p:---- s:0033 b:0033 l:000032 d:000032 CFUNC  :catch
c:0009 p:0183 s:0029 b:0029 l:0016cc d:0016cc METHOD /home/ritesh/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/irb.rb:69
c:0008 p:0210 s:0024 b:0024 l:000e18 d:000e18 METHOD /home/ritesh/.rvm/gems/ruby-1.9.2-p290@ss2.0/gems/railties-3.0.0/lib/rails/commands/console.rb:44
c:0007 p:0019 s:0020 b:0020 l:000019 d:000019 METHOD /home/ritesh/.rvm/gems/ruby-1.9.2-p290@ss2.0/gems/railties-3.0.0/lib/rails/commands/console.rb:8
c:0006 p:0430 s:0016 b:0016 l:000015 d:000015 TOP    /home/ritesh/.rvm/gems/ruby-1.9.2-p290@ss2.0/gems/railties-3.0.0/lib/rails/commands.rb:23
c:0005 p:---- s:0012 b:0012 l:000011 d:000011 FINISH
c:0004 p:---- s:0010 b:0010 l:000009 d:000009 CFUNC  :require
c:0003 p:0061 s:0006 b:0006 l:000964 d:000434 EVAL   script/rails:6
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:0000 s:0002 b:0002 l:000964 d:000964 TOP  
---------------------------
-- Ruby level backtrace information ----------------------------------------
script/rails:6:in `<main>'
script/rails:6:in `require'
/home/ritesh/.rvm/gems/ruby-1.9.2-p290@ss2.0/gems/railties-3.0.0/lib/rails/commands.rb:23:in `<top (required)>'
/home/ritesh/.rvm/gems/ruby-1.9.2-p290@ss2.0/gems/railties-3.0.0/lib/rails/commands/console.rb:8:in `start'
/home/ritesh/.rvm/gems/ruby-1.9.2-p290@ss2.0/gems/railties-3.0.0/lib/rails/commands/console.rb:44:in `start'
/home/ritesh/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/irb.rb:69:in `start'
/home/ritesh/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/irb.rb:69:in `catch'
/home/ritesh/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/irb.rb:70:in `block in start'
/home/ritesh/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/irb.rb:155:in `eval_input'
/home/ritesh/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/irb/ruby-lex.rb:228:in `each_top_level_statement'
/home/ritesh/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/irb/ruby-lex.rb:228:in `catch'
/home/ritesh/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/irb/ruby-lex.rb:229:in `block in each_top_level_statement'
/home/ritesh/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/irb/ruby-lex.rb:229:in `loop'
/home/ritesh/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/irb/ruby-lex.rb:243:in `block (2 levels) in each_top_level_statement'
/home/ritesh/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/irb.rb:156:in `block in eval_input'
/home/ritesh/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/irb.rb:273:in `signal_status'
/home/ritesh/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/irb.rb:159:in `block (2 levels) in eval_input'
/home/ritesh/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/irb/context.rb:254:in `evaluate'
/home/ritesh/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/irb/workspace.rb:80:in `evaluate'
/home/ritesh/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/irb/workspace.rb:80:in `eval'
(irb):3:in `irb_binding'
(irb):3:in `socket'


-- C level backtrace information -------------------------------------------
/home/ritesh/.rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(rb_vm_bugreport+0x72) [0xb778b702]
/home/ritesh/.rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(+0x53c57) [0xb7654c57]
/home/ritesh/.rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(rb_bug+0x3a) [0xb76559ba]
/home/ritesh/.rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(rb_check_type+0x16e) [0xb765771e]
/home/ritesh/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/i686-linux/zmq.so(+0x1d20) [0xb6ca0d20]
/home/ritesh/.rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(+0x175b53) [0xb7776b53]
/home/ritesh/.rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(+0x183da9) [0xb7784da9]
/home/ritesh/.rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(+0x17ac7b) [0xb777bc7b]
/home/ritesh/.rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(+0x180048) [0xb7781048]
/home/ritesh/.rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(+0x180400) [0xb7781400]
/home/ritesh/.rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(rb_f_eval+0xd9) [0xb7781a19]
/home/ritesh/.rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(+0x175b78) [0xb7776b78]
/home/ritesh/.rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(+0x183da9) [0xb7784da9]
/home/ritesh/.rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(+0x17ac7b) [0xb777bc7b]
/home/ritesh/.rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(+0x180048) [0xb7781048]
/home/ritesh/.rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(+0x1849c3) [0xb77859c3]
/home/ritesh/.rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(rb_rescue2+0x139) [0xb765c319]
/home/ritesh/.rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(+0x1762a5) [0xb77772a5]
/home/ritesh/.rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(+0x175b5d) [0xb7776b5d]
/home/ritesh/.rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(+0x183da9) [0xb7784da9]
/home/ritesh/.rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(+0x17ac7b) [0xb777bc7b]
/home/ritesh/.rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(+0x180048) [0xb7781048]
/home/ritesh/.rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(+0x184a80) [0xb7785a80]
/home/ritesh/.rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(rb_catch_obj+0xb7) [0xb7778c27]
/home/ritesh/.rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(+0x177ce6) [0xb7778ce6]
/home/ritesh/.rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(+0x175b78) [0xb7776b78]
/home/ritesh/.rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(+0x183da9) [0xb7784da9]
/home/ritesh/.rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(+0x17ac7b) [0xb777bc7b]
/home/ritesh/.rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(+0x180048) [0xb7781048]
/home/ritesh/.rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(+0x184a80) [0xb7785a80]
/home/ritesh/.rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(rb_catch_obj+0xb7) [0xb7778c27]
/home/ritesh/.rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(+0x177ce6) [0xb7778ce6]
/home/ritesh/.rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(+0x175b78) [0xb7776b78]
/home/ritesh/.rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(+0x183da9) [0xb7784da9]
/home/ritesh/.rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(+0x17ac7b) [0xb777bc7b]
/home/ritesh/.rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(+0x180048) [0xb7781048]
/home/ritesh/.rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(rb_iseq_eval+0x153) [0xb77860b3]
/home/ritesh/.rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(+0x5d5bf) [0xb765e5bf]
/home/ritesh/.rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(rb_require_safe+0x692) [0xb765fb42]
/home/ritesh/.rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(rb_f_require+0x26) [0xb765fe36]
/home/ritesh/.rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(+0x175b53) [0xb7776b53]
/home/ritesh/.rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(+0x183da9) [0xb7784da9]
/home/ritesh/.rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(+0x17ac7b) [0xb777bc7b]
/home/ritesh/.rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(+0x180048) [0xb7781048]
/home/ritesh/.rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(rb_iseq_eval_main+0xab) [0xb778619b]
/home/ritesh/.rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(+0x59f0a) [0xb765af0a]
/home/ritesh/.rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(ruby_exec_node+0x25) [0xb765be05]
/home/ritesh/.rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(ruby_run_node+0x35) [0xb765de55]
/home/ritesh/.rvm/rubies/ruby-1.9.2-p290/bin/ruby(main+0x68) [0x8048748]
/lib/i386-linux-gnu/libc.so.6(__libc_start_main+0xe7) [0xb7427e37]
/home/ritesh/.rvm/rubies/ruby-1.9.2-p290/bin/ruby() [0x8048641]


[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html


Aborted

Observation
When I put the same commands I was executing on console in a .rb file and executed, it successfully executed it, so what I found is it cannot be executed line by line from console, requires a complete ruby script file.

No comments:

Post a Comment