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
{{ message }}
Repository navigation
system does not support options in JRuby yet: {:out=>"/dev/null", :err=>[:child, :out]} #6113
/home/runner/work/rubygems/rubygems/lib/rubygems/util.rb:64: warning: system does not support options in JRuby yet: {:out=>"/dev/null", :err=>[:child, :out]}
/home/runner/work/rubygems/rubygems/lib/rubygems/util.rb:64: warning: system does not support options in JRuby yet: {:out=>"/dev/null", :err=>[:child, :out]}
Could you implement those? They seem particularly simple and often-used options.
Maybe this also relates to the error in that run?
ERROR during server thread: Bad file descriptor - No message available
Errno::EBADF: Bad file descriptor - No message available
close at org/jruby/RubyIO.java:1990
each at org/jruby/RubyArray.java:1809
cleanup_shutdown_pipe at /home/runner/.rubies/jruby-9.2.11.0/lib/ruby/stdlib/webrick/server.rb:341
start at /home/runner/.rubies/jruby-9.2.11.0/lib/ruby/stdlib/webrick/server.rb:204
start at /home/runner/.rubies/jruby-9.2.11.0/lib/ruby/stdlib/webrick/server.rb:32
start at /home/runner/.rubies/jruby-9.2.11.0/lib/ruby/stdlib/webrick/server.rb:157
start_ssl_server at /home/runner/work/rubygems/rubygems/test/rubygems/test_gem_remote_fetcher.rb:1082
The second issue has been happening intermittently for a while for us. I think it's something with jruby-openssl? This is the rubygems issue with some example failing workflows: ruby/rubygems#3105.
Some of these redirect limitations are due to posix_spawn having a limited set of options for redirecting. We do not use a fork+exec model due to the inability to do so safely from managed code, so we don't have an intermediate phase where we've forked safely away from the parent but have not yet exec'ed the child.
The :out is unlikely to be the problem, since it's a simple file redirect... I suspect it's the :err => [:child, :out] that's unsupported.
The EBADF is likely because we're not quite right on how we handle multiple closes of the same IO; CRuby seems to allow more such situations to silently "re-close" the same IO where we raise EBADF. Will have to look into this as well.
This warning appears to happen only if system is unable to use native process execution. That should not be the case on Ubuntu, so I wonder if there's something wrong with the JRuby install for this case.
[] ~/projects/jruby $ jruby -v
jruby 9.2.11.0 (2.5.7) 2020-03-02 612d7a05a6 OpenJDK 64-Bit Server VM 25.222-b10 on 1.8.0_222-b10 +jit [darwin-x86_64]
[] ~/projects/jruby $ jruby -Xnative.enabled=false -e 'system("ls", :out => "test.txt", :err => [:child, :out])'
-e:1: warning: system does not support options in JRuby yet: {:out=>"test.txt", :err=>[:child, :out]}
rubygems/test/rubygems/test_gem_ext_cmake_builder.rb:15: warning: system does not support options in JRuby yet: {:out=>"/dev/null", :err=>[:child, :out]}
@deivid-rodriguez Should we just change the check to just if Gem.java_platform? ?
@headius How can we find out why JRuby doesn't use a native platform in that case?
Should JRuby raise or warn when not using a native platform? IIRC that was the source of many confusing bugs like this one.
I've made a first pass at implementing the options we can support in non-native Kernel#system at #6241. Mostly this means chdir and a few specific forms of redirection.
Activity
deivid-rodriguez commentedon Mar 7, 2020
The second issue has been happening intermittently for a while for us. I think it's something with
jruby-openssl? This is the rubygems issue with some example failing workflows: ruby/rubygems#3105.headius commentedon Mar 7, 2020
Some of these redirect limitations are due to
posix_spawnhaving a limited set of options for redirecting. We do not use a fork+exec model due to the inability to do so safely from managed code, so we don't have an intermediate phase where we've forked safely away from the parent but have not yet exec'ed the child.The
:outis unlikely to be the problem, since it's a simple file redirect... I suspect it's the:err => [:child, :out]that's unsupported.headius commentedon Mar 7, 2020
The
EBADFis likely because we're not quite right on how we handle multiple closes of the same IO; CRuby seems to allow more such situations to silently "re-close" the same IO where we raiseEBADF. Will have to look into this as well.headius commentedon Mar 7, 2020
Hmmm, a simple attempt to reproduce does not appear to produce any warnings:
headius commentedon Mar 7, 2020
Can't reproduce on Ubuntu 18.04:
headius commentedon Mar 7, 2020
This warning appears to happen only if
systemis unable to use native process execution. That should not be the case on Ubuntu, so I wonder if there's something wrong with the JRuby install for this case.eregon commentedon Mar 8, 2020
Is there a way to print the native backend? I'll try to reproduce in GitHub Actions, indeed locally it works for me too on Linux.
eregon commentedon Mar 8, 2020
I cannot reproduce directly in setup-ruby's CI: https://github.com/ruby/setup-ruby/runs/493299557?check_suite_focus=true
eregon commentedon Mar 8, 2020
The warning occurs at
But that shouldn't even execute in CI:
https://github.com/rubygems/rubygems/blob/baebef66cecc68649c386038055e62019479b5c8/test/rubygems/test_gem_ext_cmake_builder.rb#L13-L15
so that check must fail for some reason, either
$CIis unset orGem.java_platform?returns false.Looks like the $CI env var is not set in GitHub Actions:
https://github.com/ruby/setup-ruby/runs/493307400?check_suite_focus=true
@deivid-rodriguez Should we just change the check to just
if Gem.java_platform??@headius How can we find out why JRuby doesn't use a native platform in that case?
Should JRuby raise or warn when not using a native platform? IIRC that was the source of many confusing bugs like this one.
eregon commentedon Mar 8, 2020
Issue for GitHub Actions to add a CI env var: https://github.com/actions/virtual-environments/issues/520
deivid-rodriguez commentedon Mar 8, 2020
That makes sense to me, yeah. The problem seems independent from being in a CI environment.
CmakeBuilder seems to fail on JRuby regardless of CI
CmakeBuilder seems to fail on JRuby regardless of CI
Add minimal option support to Kernel#system
headius commentedon May 26, 2020
I've made a first pass at implementing the options we can support in non-native Kernel#system at #6241. Mostly this means chdir and a few specific forms of redirection.
14 remaining items