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
$ java -jar /appl/lib/jruby-complete-1.7.26.jar -e "x=Process.spawn 'sleep 70000';Process.kill 'KILL',x"
$ uname -a
Linux cdcs470546.eu.rabonet.com 2.6.18-411.el5 #1 SMP Thu Jun 2 02:56:21 EDT 2016 x86_64 x86_64 x86_64 GNU/Linux
$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5.11 (Tikanga)
RHEL 7 (with jruby.native.verbose enabled)
Failed to load native POSIX impl; falling back on Java impl. Stacktrace follows.
java.lang.UnsatisfiedLinkError: could not load FFI provider jnr.ffi.provider.jffi.Provider
at jnr.ffi.provider.InvalidProvider$1.loadLibrary(InvalidProvider.java:48)
at jnr.ffi.LibraryLoader.load(LibraryLoader.java:290)
at jnr.ffi.Library.loadLibrary(Library.java:127)
at jnr.posix.POSIXFactory$DefaultLibCProvider$SingletonHolder.<clinit>(POSIXFactory.java:279)
at jnr.posix.POSIXFactory$DefaultLibCProvider.getLibC(POSIXFactory.java:283)
at jnr.posix.BaseNativePOSIX.<init>(BaseNativePOSIX.java:36)
at jnr.posix.LinuxPOSIX.<init>(LinuxPOSIX.java:18)
at jnr.posix.POSIXFactory.loadLinuxPOSIX(POSIXFactory.java:143)
...
Caused by: java.lang.IllegalStateException: Can't overwrite cause with java.lang.UnsatisfiedLinkError: java.lang.UnsatisfiedLinkError: /tmp/jffi4609635255293149753.so: /tmp/jffi4609635255293149753.so: failed to map segment from shared object: Operation not permitted
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1824)
at java.lang.Runtime.load0(Runtime.java:809)
at java.lang.System.load(System.java:1086)
at com.kenai.jffi.internal.StubLoader.loadFromJar(StubLoader.java:367)
at com.kenai.jffi.internal.StubLoader.load(StubLoader.java:254)
...
Caused by: java.lang.UnsatisfiedLinkError: java.lang.UnsatisfiedLinkError: /tmp/jffi4609635255293149753.so: /tmp/jffi4609635255293149753.so: failed to map segment from shared object: Operation not permitted
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1824)
at java.lang.Runtime.load0(Runtime.java:809)
at java.lang.System.load(System.java:1086)
at com.kenai.jffi.internal.StubLoader.loadFromJar(StubLoader.java:367)
at com.kenai.jffi.internal.StubLoader.load(StubLoader.java:254)
...
Caused by: java.lang.UnsatisfiedLinkError: java.lang.UnsatisfiedLinkError: /tmp/jffi4609635255293149753.so: /tmp/jffi4609635255293149753.so: failed to map segment from shared object: Operation not permitted
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1824)
at java.lang.Runtime.load0(Runtime.java:809)
at java.lang.System.load(System.java:1086)
...
file:/appl/iondev/bin/rabowriter609/lib/jruby-complete-1.7.26.jar!/jruby/kernel19/process.rb:13 warning: executable? does not in this environment and will return a dummy value
NotImplementedError: kill unsupported or native support failed to load
kill at org/jruby/RubyProcess.java:973
kill at org/jruby/RubyProcess.java:883
(root) at -e:1
Linux cdcs470742.eu.rabodev.com 3.10.0-327.28.2.el7.x86_64 #1 SMP Mon Jun 27 14:48:28 EDT 2016 x86_64 x86_64 x86_64 GNU/Linux
Red Hat Enterprise Linux Server release 7.2 (Maipo)
Environment
Provide at least:
JRuby version (jruby -v) and command line (flags, JRUBY_OPTS, etc)
-- 1.7.26
Operating system and platform (e.g. uname -a)
-- see above
Other relevant info you may wish to add:
Installed or activated gems
-- none
Application/framework version (e.g. Rails, Sinatra)
-- none
Environment variables
-- LD_LIBRARY_PATH unset in both environments. None others that seem relevant.
Expected Behavior
Describe your expectation of how JRuby should behave, perhaps by showing how CRuby/MRI behaves.
-- would expect same behaviour as in RHEL5.
-- have been able to "fix" this by explicitly adding the jffi.so lib to LD_LIBRARY_PATH on RHEL7
Provide an executable Ruby script or a link to an example repository.
-- see above
Actual Behavior
Describe or show the actual behavior.
-- see above
Provide text or screen capture showing the behavior.
-- see above
Thanks.
The text was updated successfully, but these errors were encountered:
@kimptoc This is almost certainly related to SELinux, as @preetpalS guessed. The issue is that we unpack the jffi library, our native layer, to the environment-provided temp location. On SELinux, you are disallowed from loading executables or dynamic libraries from the shared temp directories.
You can work around it by setting a different TEMP dir that allows loading executables. We could probably do a better job reporting this error, but the native.verbose output makes it pretty clear there's a permission error of some sort.
RHEL 5
$ java -jar /appl/lib/jruby-complete-1.7.26.jar -e "x=Process.spawn 'sleep 70000';Process.kill 'KILL',x"
$ uname -a
Linux cdcs470546.eu.rabonet.com 2.6.18-411.el5 #1 SMP Thu Jun 2 02:56:21 EDT 2016 x86_64 x86_64 x86_64 GNU/Linux
$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5.11 (Tikanga)
RHEL 7 (with jruby.native.verbose enabled)
Linux cdcs470742.eu.rabodev.com 3.10.0-327.28.2.el7.x86_64 #1 SMP Mon Jun 27 14:48:28 EDT 2016 x86_64 x86_64 x86_64 GNU/Linux
Red Hat Enterprise Linux Server release 7.2 (Maipo)
Environment
Provide at least:
jruby -v
) and command line (flags, JRUBY_OPTS, etc)-- 1.7.26
uname -a
)-- see above
Other relevant info you may wish to add:
-- none
-- none
-- LD_LIBRARY_PATH unset in both environments. None others that seem relevant.
Expected Behavior
-- would expect same behaviour as in RHEL5.
-- have been able to "fix" this by explicitly adding the jffi.so lib to LD_LIBRARY_PATH on RHEL7
-- see above
Actual Behavior
-- see above
-- see above
Thanks.
The text was updated successfully, but these errors were encountered: