Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Blocker
-
Resolution: Fixed
-
Affects Version/s: JRuby 1.7.0.pre1
-
Fix Version/s: JRuby 1.7.0.pre1
-
Component/s: Interpreter
-
Labels:None
-
Environment:OSX 10.6.8, Java7u2
-
Number of attachments :
Description
Download this file. It's a tarball containing 2 gems (ffi-rzmq and zmqmachine) and a C library that is loaded via FFI. There is also a script (install_me) that will ask for sudo permission to install the C lib to /usr/local/lib.
file: http://dl.dropbox.com/u/44434337/jruby_ffi.tgz
After running 'install_me' there will be an unpacked gem directory for zmqmachine.
% cd zmqmachine-0.7.1/examples
% jruby pub_sub.rb
This should result in a spectacular backtrace complaining about a NoMethodError for some FFI function.
https://gist.github.com/ec1065df39561c46b1ff
Interestingly, this same code runs fine on Windows (though the JRuby master is from Friday, 20111216).
Trying to run jruby master with compile.mode=OFF and/or compile.invokedynamic=false has no effect. It still crashes though the backtraces will be different.
The line it crashes on is a call to an FFI-wrapped C function.
BTW, tried to reduce this unsuccessfully. I suspect my attempts to repro a smaller version failed because there is some race condition and/or other moving part that only gets triggered on this more complex project. I can load ffi-rzmq by itself and run the FFI attached functions without incident. Doing the same work via zmqmachine blows it up.
Of course, this all works fine with 1.6.x.