You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to load the FFI subsystem (via .so files embedded in jar), it appears that JRuby copies the .so files out of the jar into a temp dir and then loads them from there.
We had a user who was getting a cryptic error message today:
Failed to load native POSIX impl; falling back on Java impl.
After some sleuthing we determined that the user's /tmp dir was mounted noexec. Changing the mount options fixed the problem, but it would be nice to have a better error message. Ideally the error would state that:
the tmp dir is not executable, and
what options / flags can be used to change to a different temp dir
Our user was able to use -Djava.io.tmpdir.
The text was updated successfully, but these errors were encountered:
This has come up for us a few more times since I opened it. We're currently giving users info about the -Djava.io.tmpdir workaround, but that makes me a little leery because I believe it means that any other temp files that the process writes during its lifetime will also be written to that directory, which is bad.
I think it might be worth adding a jruby-ffi-specific config setting that could be used to define the temp location that would be used only for these files that need to be executable, and that way we wouldn't have to override the global temp dir.
This is probably a requirement of Java. That error message us related to the POSIX features which use a Java based FFI package (related to JRubys) not the ruby FFI package. it would appear you have to turn off the native features or provide Java with a place to put temporary files.