celluloid / dcell

UNMAINTAINED: See celluloid/celluloid#779 - Actor-based distributed objects in Ruby based on Celluloid and 0MQ
http://celluloid.io
MIT License
595 stars 65 forks source link

Unable to run spec on OSX with various MRI Rubies #99

Open dfockler opened 9 years ago

dfockler commented 9 years ago

I've tried running the default rake task with various different ruby versions, but I haven't been able to get anything to work.

With Ruby 2.2.1 and Ruby 1.9.3 I get a seg fault in the http_parser gem, and with Ruby 2.1.2 I can start the task but it fails when trying to initialize the SupervisionGroup with a Celluloid::Task::TerminatedError. I'm just trying to poke around the code and hopefully start updating the documentation to the new changes. Any help would be awesome, thanks. :)

niamster commented 9 years ago

Hello @dfockler, I don't have a possibility to check on OS X. Are you using rvi+bundle? Which version of DCell are you using?

dfockler commented 9 years ago

I'm using ruby-install with chruby. I pulled the latest master branch down from the Github repo. EDIT: I'm also using bundler with all of these.

film42 commented 9 years ago

The problem comes from the Facter gem being used in InfoService. There are two problems, actually:

  1. Facter does not install the 'CFPropertyList' gem, but tries to require it on OSX.
  2. Even if you manually add 'CFPropertyList' to your Gemfile, here's what something similar to this line of code returns:
Facter["processors"].value
#=> {"count"=>8, "speed"=>"2.2 GHz"}

So the actual line of code does...

Facter["processors"].value["models"].first
#=> NoMethodError: undefined method `first' for nil:NilClass

You can patch it for now by making that line of code say:

Facter["processors"].value["models"].first rescue "Unknown"

Which is for sure a hack. Anyways, the reason tests fail immediately on OSX is due to Facter gem.

Note: This is true for all MRI and JRuby versions I've tried.

film42 commented 9 years ago

Btw, it might be good to add osx as an OS to the .travis.yml file.

dfockler commented 9 years ago

I tried reinstalling zeromq using brew and the ffi-rzmq gems. Before that I was getting the Assertion failed: check () (src/msg.cpp:248), but now I'm getting this

ruby(25421,0x107523000) malloc: *** error for object 0x7f85642b79c8: incorrect checksum for freed object - object was probably modified after being freed.
*** set a breakpoint in malloc_error_break to debug

I also added the fix from @film42 could be something to do with zeromq itself or maybe my ruby installation.

Ruby: ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-darwin14]
ZeroMQ: stable 4.1.2 (bottled), HEAD
tarcieri commented 9 years ago

Ugh, scumbag Facter. Maybe we should just get rid of it...

niamster commented 9 years ago

I agree to remove it since it causes troubles.

niamster commented 9 years ago

@dfockler I had this pb with 0mq on Arch Linux as well though in Debian docker container it works fine

niamster commented 9 years ago

The problem is related to chuckremes/ffi-rzmq#121, I'll check later if there's a stable ffi-rzmq that works with the latest 0mq lib. BTW, I've removed facter from master.

film42 commented 9 years ago

Thanks @niamster ! Tests are now running on OSX (jruby/ mri).