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
I don’t strictly think this is a bug in jRuby, exactly, since it breaks across environments. However I’m having a hard time reasoning about what could be going on. And it’s happening on a server that’s hard to debug.
Environments
The following behavior is different across two environments running jRuby 9.1.8.0:
It works on:
jruby 9.1.8.0 (2.3.1) 2017-03-06 90fc7ab Java HotSpot(TM) 64-Bit Server VM 25.60-b23 on 1.8.0_60-b27 +jit [darwin-x86_64]
OSX: (Darwin Ilarnek.local 15.6.0 Darwin Kernel Version 15.6.0: Fri Feb 17 10:21:18 PST 2017; root:xnu-3248.60.11.4.1~1/RELEASE_X86_64 x86_64)
and fails on:
jruby 9.1.8.0 (2.3.1) 2017-03-06 90fc7ab Java HotSpot(TM) 64-Bit Server VM 25.51-b03 on 1.8.0_51-b16 +jit [linux-x86_64]
Amazon Linux: (Linux export-service-worker-0bc3106f0a0098066 4.1.10-17.31.amzn1.x86_64 #1 SMP Sat Oct 24 01:31:37 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux)
In both cases I’m running a simple irb with JRUBY_OPTS=''
Expected Behavior
On the Darwin machine, it behaves the same way MRI does:
In the Linux environment, it fails to write stdout to the file (though it still returns true, it is the File.read that is throwing the exception.)
irb(main):001:0> system('pwd', chdir: '/etc', out: '/tmp/java_issue') && File.read('/tmp/java_issue')
Errno::ENOENT: No such file or directory - /tmp/java_issue
from org/jruby/RubyIO.java:3583:in `read'
from (irb):1:in `<eval>'
from org/jruby/RubyKernel.java:1000:in `eval'
from org/jruby/RubyKernel.java:1298:in `loop'
from org/jruby/RubyKernel.java:1120:in `catch'
from org/jruby/RubyKernel.java:1120:in `catch'
from /usr/local/rbenv/versions/jruby-9.1.8.0/bin/irb:13:in `<main>'
I may try to match Java versions, just to see if it is a bug that has been patched, but it is puzzling.
The text was updated successfully, but these errors were encountered:
On the plus side, I’ve repoduced this issue in a container running on my laptop, which will make things slightly easier to debug.
The downside is that it still happens in that container even on the latest Java 1.8 available: jruby 9.1.8.0 (2.3.1) 2017-03-06 90fc7ab Java HotSpot(TM) 64-Bit Server VM 25.131-b11 on 1.8.0_131-b11 +jit [linux-x86_64]
I don’t strictly think this is a bug in jRuby, exactly, since it breaks across environments. However I’m having a hard time reasoning about what could be going on. And it’s happening on a server that’s hard to debug.
Environments
The following behavior is different across two environments running jRuby 9.1.8.0:
It works on:
jruby 9.1.8.0 (2.3.1) 2017-03-06 90fc7ab Java HotSpot(TM) 64-Bit Server VM 25.60-b23 on 1.8.0_60-b27 +jit [darwin-x86_64]
OSX: (
Darwin Ilarnek.local 15.6.0 Darwin Kernel Version 15.6.0: Fri Feb 17 10:21:18 PST 2017; root:xnu-3248.60.11.4.1~1/RELEASE_X86_64 x86_64
)and fails on:
jruby 9.1.8.0 (2.3.1) 2017-03-06 90fc7ab Java HotSpot(TM) 64-Bit Server VM 25.51-b03 on 1.8.0_51-b16 +jit [linux-x86_64]
Amazon Linux: (
Linux export-service-worker-0bc3106f0a0098066 4.1.10-17.31.amzn1.x86_64 #1 SMP Sat Oct 24 01:31:37 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
)In both cases I’m running a simple
irb
withJRUBY_OPTS=''
Expected Behavior
On the Darwin machine, it behaves the same way MRI does:
Actual Behavior
In the Linux environment, it fails to write stdout to the file (though it still returns
true
, it is theFile.read
that is throwing the exception.)I may try to match Java versions, just to see if it is a bug that has been patched, but it is puzzling.
The text was updated successfully, but these errors were encountered: