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
Description
Activity
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'
173 include Molinillo::UI 174 175 def output 176 @output ||= debug? ? $stdout : File.open(IO::NULL, 'w') 177 end
https://github.com/hiroyuki-sato/embulk-ci-test/runs/6173635118?check_suite_focus=true#step:4:76
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 -e File.open(IO::NULL, :w.to_s){} [76](https://github.com/hiroyuki-sato/embulk-ci-test/runs/6173635118?check_suite_focus=true#step:4:76) Successfully started process 'command 'C:\hostedtoolcache\windows\Java_Zulu_jdk\8.0.332-9\x64\bin\java.exe'' [77](https://github.com/hiroyuki-sato/embulk-ci-test/runs/6173635118?check_suite_focus=true#step:4:77) Errno::EACCES: Permission denied - NUL [78](https://github.com/hiroyuki-sato/embulk-ci-test/runs/6173635118?check_suite_focus=true#step:4:78) sysopen at org/jruby/RubyIO.java:1227 [79](https://github.com/hiroyuki-sato/embulk-ci-test/runs/6173635118?check_suite_focus=true#step:4:79) initialize at org/jruby/RubyFile.java:362 [80](https://github.com/hiroyuki-sato/embulk-ci-test/runs/6173635118?check_suite_focus=true#step:4:80) new at org/jruby/RubyClass.java:909 [81](https://github.com/hiroyuki-sato/embulk-ci-test/runs/6173635118?check_suite_focus=true#step:4:81) open at org/jruby/RubyIO.java:1146 [82](https://github.com/hiroyuki-sato/embulk-ci-test/runs/6173635118?check_suite_focus=true#step:4:82) <main> at -e:1 [83](https://github.com/hiroyuki-sato/embulk-ci-test/runs/6173635118?check_suite_focus=true#step:4:83)- added a commit that references this issue
on 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.15 ## 16 # If the DEBUG_RESOLVER environment variable is set then debugging mode is 17 # enabled for the resolver. This will display information about the state 18 # of the resolver while a set of dependencies is being resolved. 19 20 DEBUG_RESOLVER = !ENV['DEBUG_RESOLVER'].nil?
179 def debug? 180 DEBUG_RESOLVER 181 end
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.
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...#!/usr/bin/env ruby File.open(IO::NULL,'w'){}
https://github.com/hiroyuki-sato/embulk-ci-test/
cb32d1b91ea66a8f3701c1f11eed2d67735fed20https://github.com/hiroyuki-sato/embulk-ci-test/runs/6185552371?check_suite_focus=true
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
name: Check on: [ push, pull_request ] jobs: check: runs-on: ${{ matrix.os }} # push: always run. # pull_request: run only when the PR is submitted from a forked repository, not within this repository. if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository strategy: fail-fast: false matrix: os: - ubuntu-latest - macOS-latest - windows-latest gradle_task: - "check" steps: - uses: actions/checkout@v2 - name: Set up OpenJDK 8 uses: actions/setup-java@v2 with: java-version: 8 # distribution: "adopt" distribution: "zulu" - name: Check run: ./gradlew --debug ${{ matrix.gradle_task }}
OK Case: https://github.com/hiroyuki-sato/embulk-ci-test/actions/runs/2233515348
name: Check on: [ push, pull_request ] jobs: check: runs-on: ${{ matrix.os }} # push: always run. # pull_request: run only when the PR is submitted from a forked repository, not within this repository. if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository strategy: fail-fast: false matrix: os: - ubuntu-latest - macOS-latest - windows-latest gradle_task: - "check" steps: - uses: actions/checkout@v2 - name: Set up OpenJDK 8 uses: actions/setup-java@v2 with: java-version: 8 distribution: "adopt" # distribution: "zulu" - name: Check run: ./gradlew --debug ${{ matrix.gradle_task }}
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.
Hello, @headius. Thank you for your comment. I double-checked
https://github.com/hiroyuki-sato/embulk-ci-test/actions/runs/2236429457Test code in
build.gradle. (JRuby 9.3.4.0)File.open(IO::NULL,'w'){}
SDK Result SDK version Zulu NG 8.0.332-9 Adopt OK 8.0.322+6 2022-04-28T00:19:28.8311232Z 2022-04-28T00:19:28.823+0000 [ERROR] [system.err] Errno::EACCES: Permission denied - NUL 2022-04-28T00:19:28.8311956Z 2022-04-28T00:19:24.368+0000 [LIFECYCLE] [class org.gradle.internal.buildevents.TaskExecutionLogger] 2022-04-28T00:19:28.8313085Z 2022-04-28T00:19:24.368+0000 [LIFECYCLE] [class org.gradle.internal.buildevents.TaskExecutionLogger] > Task :gemDebug 2022-04-28T00:19:28.8314835Z 2022-04-28T00:19:28.823+0000 [ERROR] [system.err] sysopen at org/jruby/RubyIO.java:1227 2022-04-28T00:19:28.8331302Z 2022-04-28T00:19:28.823+0000 [ERROR] [system.err] initialize at org/jruby/RubyFile.java:362 2022-04-28T00:19:28.8332237Z 2022-04-28T00:19:28.824+0000 [ERROR] [system.err] new at org/jruby/RubyClass.java:909 2022-04-28T00:19:28.8332927Z 2022-04-28T00:19:28.824+0000 [ERROR] [system.err] open at org/jruby/RubyIO.java:1146 2022-04-28T00:19:28.8333646Z 2022-04-28T00:19:28.826+0000 [ERROR] [system.err] <main> at -e:1 2022-04-28T00:19:28.9870562Z 2022-04-28T00:19:28.903+0000 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Changing state to: FAILED 2022-04-28T00:19:28.9969762Z 2022-04-28T00:19:28.935+0000 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] 2022-04-28T00:19:28.9970878Z 2022-04-28T00:19:28.903+0000 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Process 'command 'C:\hostedtoolcache\windows\Java_Zulu_jdk\8.0.332-9\x64\bin\java.exe'' finished with exit value 1 (state: FAILED)I can confirm the issue also exists using Adoptium 17.0.3_7 on Windows.
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.
Hi,
Looks like a known issue: https://bugs.openjdk.java.net/browse/JDK-8285445Try to use command line option
-Djdk.io.File.enableADS=trueReacted by Rob Bavey, Chad Wilson and Marat RadchenkoThanks for quick check.
The workaround should work for any OpenJDK and Azul Zulu in particularIt 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!
Thanks, @headius, @sashaioffe, and @afischer-opentext-com
- added a commit that references this issue
on Jun 4, 2022 - added a commit that references this issue
on Jun 26, 2022 - added a commit that references this issue
on Jul 7, 2022 - added a commit that references this issue
on Aug 6, 2022 This is fixed on GitHub Actions with the newer JDK: actions/runner-images@2900984
Reacted by Chad Wilson and Geertjan Wielenga- added a commit that references this issue
on Jul 22, 2023 - added a commit that references this issue
on Mar 11, 2026 - added a commit that references this issue
on Mar 11, 2026
Hello, JRuby developers.
Environment Information
Provide at least:
jruby -v) and command line (flags, JRUBY_OPTS, etc): 9.3.4.0uname -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.0installed gem onwindows-latestenvironment.Actual Behavior
The following command failed with
windows-latestin GitHub Actions. (I can't reprodude this behavior in my Windows 10 environment.)ubuntu-latestandmacOS-latestworked fine.Does anyone advise me on how to investigate this issue?
Reproduce steps.