[jruby] JRuby 1.7.25 & 26 - redhat 7 issues with Process.spawn & kill

Kimpton, C (Chris) Chris.Kimpton at rabobank.com
Wed Jan 25 21:11:33 JST 2017


Hi,

Looking at the jruby-complete jar again, I see it already includes the ".so" files in it.

I guess in general, those versions should be being picked up automatically.

Have raised it as a bug - https://github.com/jruby/jruby/issues/4458

Thanks,
Chris

From: Kimpton, C (Chris)
Sent: 12 January 2017 09:00
To: 'jruby at ruby-lang.org' <jruby at ruby-lang.org>
Subject: RE: JRuby 1.7.25 & 26 - redhat 7 issues with Process.spawn & kill

Ok - got the jruby-bin working (the script files were in DOS format, not unix :( )

My Process.spawn/kill test works ok on 5 and 7 with jruby-bin.

If I use jruby-complete directly, then it fails similary:

$ java -jar /appl/x/bin/x/lib/jruby-complete-1.7.25.jar irb
irb(main):001:0> x=Process.spawn 'sleep 70000'
file:/appl/x/bin/x/lib/jruby-complete-1.7.25.jar!/jruby/kernel19/process.rb:13 warning: executable? does not in this environment and will return a dummy value
=> 9251
irb(main):004:0* Process.kill 'KILL',x
NotImplementedError: kill unsupported or native support failed to load
        from org/jruby/RubyProcess.java:973:in `kill'
        from org/jruby/RubyProcess.java:883:in `kill'
        from (irb):4:in `evaluate'
        from org/jruby/RubyKernel.java:1079:in `eval'
        from org/jruby/RubyKernel.java:1479:in `loop'
        from org/jruby/RubyKernel.java:1242:in `catch'
        from org/jruby/RubyKernel.java:1242:in `catch'
        from irb:13:in `(root)'

Then tried adding the libjffi shared lib to the LD_LIBRARY_PATH and that seems to fix it :)

Strange that its started being an issue now.

From: Kimpton, C (Chris)
Sent: 12 January 2017 08:41
To: jruby at ruby-lang.org<mailto:jruby at ruby-lang.org>
Subject: JRuby 1.7.25 & 26 - redhat 7 issues with Process.spawn & kill

Hi,

This is probably due to our environment, but thought I'd raise it here in case someone recognises the issue.

We're getting our RHEL servers upgraded going from 5 to 7.

Red Hat Enterprise Linux Server release 5.11 (Tikanga)

Red Hat Enterprise Linux Server release 7.2 (Maipo)

On 5, when I do this test in IRB:

mkv_irb:003:0* x = Process.spawn "sleep 60000"
# => 28626
mkv_irb:004:0> Process.kill 'KILL',x
# => 1

Works fine - spawns a process and I can then kill it.


But under 7, I get some errors:

mkv_irb:003:0* x = Process.spawn "sleep 50000"
file:/appl/x/bin/x/lib/jruby-complete-1.7.25.jar!/jruby/kernel19/process.rb:13 warning: executable? does not in this environment and will return a dummy value
# => 62764
mkv_irb:005:0> Process.kill 'KILL',x
NotImplementedError: kill unsupported or native support failed to load
        from org/jruby/RubyProcess.java:973:in `kill'
        from org/jruby/RubyProcess.java:883:in `kill'
        from (mkv_irb):5:in `evaluate'
        from org/jruby/RubyKernel.java:1079:in `eval'
        from org/jruby/RubyKernel.java:1479:in `loop'
        from org/jruby/RubyKernel.java:1242:in `catch'
        from org/jruby/RubyKernel.java:1242:in `catch'

So - I can spawn a process on RHEL 7 but cannot kill it.  (mkv_irb is a wrapper around irb to make it work with our env)

We have some of the Selinux things enabled - so might try playing with those.  However I can kill the process from the shell, so I don't see why that would be an issue.

Is there a native library behind Process that we need to install on RHEL 7

Tried this on jruby 1.7.25 and 26.  Using jruby-complete.

I see there are some shared libs in the jruby-bin-1.7.26  download, but not in the jruby-complete download.  Are these required for RHEL7?

Trying to get jruby-bin running, so see if that works better/gives me a clue..

Thanks
Chris

_________________________________________________________________________________

This email (including any attachments to it) is confidential, legally privileged, subject to copyright and is sent for the personal attention of the intended recipient only. If you have received this email in error, please advise us immediately and delete it. You are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. Although we have taken reasonable precautions to ensure no viruses are present in this email, we cannot accept responsibility for any loss or damage arising from the viruses in this email or attachments. We exclude any liability for the content of this email, or for the consequences of any actions taken on the basis of the information provided in this email or its attachments, unless that information is subsequently confirmed in writing. 
_________________________________________________________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ruby-lang.org/pipermail/jruby/attachments/20170125/bccfa195/attachment.html>


More information about the JRuby mailing list