Repository navigation
java jruby-complete-9.3.4.0.jar org.jruby.Main -rjars/setup -S gem install --debug --backtrace msgpack -v 1.1.0 failed windos-latest environment only. #7182
Copy link
Copy link
Closed
Milestone
Description
Hello, JRuby developers.
Environment Information
Provide at least:
- JRuby version (
jruby -v) and command line (flags, JRUBY_OPTS, etc): 9.3.4.0 - Operating system and platform (e.g.
uname -a): windows-latest in GitHub Actions.
Other relevant info you may wish to add: (Please see below)
Expected Behavior
java jruby-complete-9.3.4.0.jar org.jruby.Main -rjars/setup -S gem install --debug --backtrace msgpack -v 1.1.0 installed gem on windows-latest environment.
Actual Behavior
The following command failed with windows-latest in GitHub Actions. (I can't reprodude this behavior in my Windows 10 environment.)
ubuntu-latest and macOS-latest worked fine.
Does anyone advise me on how to investigate this issue?
java jruby-complete-9.3.4.0.jar org.jruby.Main -rjars/setup -S gem install --debug --backtrace msgpack -v 1.1.0
Reproduce steps.
- Fork https://github.com/hiroyuki-sato/embulk-ci-test/tree/b8b81865a687c43bd507b046007f2a9440c6ad83
- git push
2022-04-26T06:33:58.4480037Z Starting process 'command 'C:\hostedtoolcache\windows\Java_Zulu_jdk\8.0.332-9\x64\bin\java.exe''. Working directory: D:\a\embulk-ci-test\embulk-ci-test\build\gemContents Command: C:\hostedtoolcache\windows\Java_Zulu_jdk\8.0.332-9\x64\bin\java.exe -Dfile.encoding=windows-1252 -Duser.country=US -Duser.language=en -Duser.variant -cp C:\Users\runneradmin\.gradle\caches\modules-2\files-2.1\org.jruby\jruby-complete\9.3.4.0\7a6e380880c1868c542132651481e91db8ebe9a1\jruby-complete-9.3.4.0.jar org.jruby.Main -rjars/setup -S gem install --debug --backtrace msgpack -v 1.1.0
2022-04-26T06:33:58.4483570Z Successfully started process 'command 'C:\hostedtoolcache\windows\Java_Zulu_jdk\8.0.332-9\x64\bin\java.exe''
2022-04-26T06:34:03.0654776Z NOTE: Debugging mode prints all exceptions even when rescued
2022-04-26T06:34:03.4602050Z Exception `LoadError' at org/jruby/RubyKernel.java:1017 - no such file to load -- org/bouncycastle/bcutil-jdk15to18/1.68/bcutil-jdk15to18-1.68.jar
2022-04-26T06:34:03.4603038Z Exception `RuntimeError' at uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/jar_dependencies.rb:356 -
2022-04-26T06:34:03.4603443Z
2022-04-26T06:34:03.4603831Z you might need to reinstall the gem which depends on the missing jar or in case there is Jars.lock then resolve the jars with `lock_jars` command
2022-04-26T06:34:03.4604170Z
2022-04-26T06:34:03.4604591Z no such file to load -- org/bouncycastle/bcutil-jdk15to18/1.68/bcutil-jdk15to18-1.68.jar (LoadError)
2022-04-26T06:34:06.7512434Z Exception `Errno::EACCES' at org/jruby/RubyIO.java:1227 - Permission denied - NUL
2022-04-26T06:34:06.8466933Z Exception `Errno::EACCES' at org/jruby/RubyIO.java:1227 - Permission denied - NUL
2022-04-26T06:34:06.8467388Z ERROR: While executing gem ... (Errno::EACCES)
2022-04-26T06:34:06.8467781Z Permission denied - NUL
2022-04-26T06:34:06.8468720Z org/jruby/RubyIO.java:1227:in `sysopen'
2022-04-26T06:34:06.8468983Z org/jruby/RubyFile.java:362:in `initialize'
2022-04-26T06:34:06.8469596Z org/jruby/RubyClass.java:909:in `new'
2022-04-26T06:34:06.8469862Z org/jruby/RubyIO.java:1146:in `open'
2022-04-26T06:34:06.8470470Z uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/resolver.rb:176:in `output'
2022-04-26T06:34:06.8471049Z uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/resolver/molinillo/lib/molinillo/modules/ui.rb:41:in `after_resolution'
2022-04-26T06:34:06.8472011Z uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/resolver/molinillo/lib/molinillo/resolution.rb:232:in `end_resolution'
2022-04-26T06:34:06.8472779Z uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/resolver/molinillo/lib/molinillo/resolution.rb:187:in `resolve'
2022-04-26T06:34:06.8473327Z uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/resolver/molinillo/lib/molinillo/resolver.rb:43:in `resolve'
2022-04-26T06:34:06.8473828Z uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/resolver.rb:190:in `resolve'
2022-04-26T06:34:06.8474300Z uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/request_set.rb:411:in `resolve'
2022-04-26T06:34:06.8474985Z uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/dependency_installer.rb:333:in `resolve_dependencies'
2022-04-26T06:34:06.8475635Z uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/commands/install_command.rb:198:in `install_gem'
2022-04-26T06:34:06.8476124Z uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/commands/install_command.rb:223:in `block in install_gems'
2022-04-26T06:34:06.8476453Z org/jruby/RubyArray.java:1865:in `each'
2022-04-26T06:34:06.8476869Z uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/commands/install_command.rb:216:in `install_gems'
2022-04-26T06:34:06.8477334Z uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/commands/install_command.rb:164:in `execute'
2022-04-26T06:34:06.8478085Z uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/command.rb:323:in `invoke_with_build_args'
2022-04-26T06:34:06.8478619Z uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/command_manager.rb:178:in `process_args'
2022-04-26T06:34:06.8479083Z uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/command_manager.rb:147:in `run'
2022-04-26T06:34:06.8479495Z uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/gem_runner.rb:53:in `run'
2022-04-26T06:34:06.8479906Z uri:classloader:/META-INF/jruby.home/bin/jgem:21:in `<main>'
2022-04-26T06:34:06.8480168Z org/jruby/RubyKernel.java:1052:in `load'
2022-04-26T06:34:06.8480717Z uri:classloader:/META-INF/jruby.home/bin/gem:4:in `<main>'
2022-04-26T06:34:06.8481624Z Exception `Gem::SystemExitException' at uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/user_interaction.rb:365 - Exiting RubyGems with exit_code 1
2022-04-26T06:34:06.8481920Z
2022-04-26T06:34:06.8482029Z FAILURE: Build failed with an exception.
2022-04-26T06:34:06.8482171Z
2022-04-26T06:34:06.8482247Z * What went wrong:
2022-04-26T06:34:06.8482536Z Execution failed for task ':installDependencyGems'.
2022-04-26T06:34:06.8483011Z > Process 'command 'C:\hostedtoolcache\windows\Java_Zulu_jdk\8.0.332-9\x64\bin\java.exe'' finished with non-zero exit value 1
2022-04-26T06:34:06.8483251Z
2022-04-26T06:34:06.8483318Z * Try:
2022-04-26T06:34:06.8483706Z Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output. Run with --scan to get full insights.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity
hiroyuki-sato commentedon Apr 26, 2022
It seems that
File.open(IO::NULL, "w"){}raise the Exception on windows-latest in GitHub Actions.uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/resolver.rb:176:in `output'
https://github.com/hiroyuki-sato/embulk-ci-test/runs/6173635118?check_suite_focus=true#step:4:76
Add the environment variable to avoid gem install error in GitHub Act…
hiroyuki-sato commentedon Apr 26, 2022
I'll close this issue within a few days. Because I think this issue is GitHub Actions specific.
Setting the environment variable
"DEBUG_RESOLVER": "1"to avoid this issue. I found the following codes.Add the environment variable to avoid gem install error in GitHub Act…
Add the environment variable to avoid gem install error in GitHub Act…
headius commentedon Apr 26, 2022
I think we should keep this open. The resolver debugging should not break on JRuby, but it appears there's a bug that causes us to raise an error when opening the NULL device for write.
hiroyuki-sato commentedon Apr 27, 2022
Hello, @headius. Thank you for your comment. I keep this open.
I also tested the following code using CRuby on windows-latest in GitHub Actions.
It worked. Humm...
https://github.com/hiroyuki-sato/embulk-ci-test/
cb32d1b91ea66a8f3701c1f11eed2d67735fed20
https://github.com/hiroyuki-sato/embulk-ci-test/runs/6185552371?check_suite_focus=true
hiroyuki-sato commentedon Apr 27, 2022
I'll double-check later, but this issue is Zulu SDK-specific.
The difference is the
distributionparameter only.NG Case: https://github.com/hiroyuki-sato/embulk-ci-test/actions/runs/2233437492
OK Case: https://github.com/hiroyuki-sato/embulk-ci-test/actions/runs/2233515348
headius commentedon Apr 27, 2022
Aha that is very interesting! I have some other issues with Zulu that I need to report, so I can add this to the list.
hiroyuki-sato commentedon Apr 28, 2022
Hello, @headius. Thank you for your comment. I double-checked
https://github.com/hiroyuki-sato/embulk-ci-test/actions/runs/2236429457
Test code in
build.gradle. (JRuby 9.3.4.0)headius commentedon Apr 28, 2022
This may mean that some newer behavior from later JDKs was incorporated into the builds of Zulu 8, or it may mean this is not specific to Zulu after all.
I have reached out to the Zulu folks at Azul to help investigate this.
sashaioffe commentedon Apr 29, 2022
Hi,
Looks like a known issue: https://bugs.openjdk.java.net/browse/JDK-8285445
Try to use command line option
-Djdk.io.File.enableADS=true
sashaioffe commentedon Apr 29, 2022
Thanks for quick check.
The workaround should work for any OpenJDK and Azul Zulu in particular
headius commentedon May 3, 2022
It also looks like that fix is coming to JDK updates as far back as 8 so I think this is an acceptable work around and out of our hands. Thanks for the footwork everyone!
hiroyuki-sato commentedon May 6, 2022
Thanks, @headius, @sashaioffe, and @afischer-opentext-com
eregon commentedon May 16, 2022
Would
NULwork? See https://bugs.openjdk.java.net/browse/JDK-8285445?focusedCommentId=14490595&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14490595Workaround issue installing Gems via JRuby on OpenJDK 17.0.3 (and 11.…
Workaround for jruby/jruby#7182
Workaround for jruby/jruby#7182
Revert "Workaround for jruby/jruby#7182"
eregon commentedon Aug 6, 2022
This is fixed on GitHub Actions with the newer JDK: actions/runner-images@2900984
Workaround access to File::NULL in build/run/test
Update README to remove JRuby version notes
Update README to remove JRuby version notes