Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows JRuby - recent failure #339

Closed
MSP-Greg opened this issue May 16, 2022 · 10 comments
Closed

Windows JRuby - recent failure #339

MSP-Greg opened this issue May 16, 2022 · 10 comments

Comments

@MSP-Greg
Copy link
Collaborator

Recent CI using Windows and both jruby and jruby-head are failing.

Running bundle env in my fork shows

Errno::EACCES: Permission denied - NUL
            sysopen at org/jruby/RubyIO.java:[12](https://github.com/MSP-Greg/setup-ruby/runs/6454940480?check_suite_focus=true#step:7:12)27
         initialize at org/jruby/RubyFile.java:362
                new at org/jruby/RubyClass.java:909
               open at org/jruby/RubyIO.java:1[14](https://github.com/MSP-Greg/setup-ruby/runs/6454940480?check_suite_focus=true#step:7:14)6
             output at D:/jruby-9.3.4.0/lib/ruby/stdlib/rubygems/resolver.rb:176

The Ruby code line (lib/ruby/stdlib/rubygems/resolver.rb:176) is:

@output ||= debug? ? $stdout : File.open(IO::NULL, 'w')

@headius any ideas? Of course, running bundle env locally works fine...

@eregon
Copy link
Member

eregon commented May 16, 2022

What's the value of IO::NULL on JRuby on Windows? Maybe it's not the correct one?
Or maybe File.open doesn't know how to open that on JRuby?

I've noticed it as well, and it's quite weird it started failing.
It could be a regression given there were some recent JRuby releases.

@eregon
Copy link
Member

eregon commented May 16, 2022

@nwjsmith
Copy link

This looks relevant: jruby/jruby#7182

@MSP-Greg
Copy link
Collaborator Author

MSP-Greg commented May 16, 2022

Sorry, I should have posted some links. Given that logs are removed, I sometimes just grab the pertinent log output.

This is odd. But, I've also noticed an issue that is similar to using Windows mingw and ucrt files, which can have very strange problems..

Re the juby issue above, that's 20 days old, but CI passed just six days ago here - https://github.com/ruby/setup-ruby/runs/6374617633. That was with a cache, but it logged things before the cache restore that aren't logged in the recent failures. Confused, with very little Java/JRuby knowledge...

EDIT: See jruby/jruby#7217

@dentarg
Copy link

dentarg commented May 18, 2022

Re the juby issue above, that's 20 days old, but CI passed just six days ago here - https://github.com/ruby/setup-ruby/runs/6374617633

actions/runner-images#5524 happened 6 days ago

Java changed from 8.0.322+6 (default) to 8.0.332+9 (default) https://github.com/actions/virtual-environments/pull/5524/files#diff-f65387936ddf6510c2fb625ce3608de69c9565728a432af796da8a5de49b7a7bL115, that matches jruby/jruby#7182 (comment)

ntkme added a commit to sass-contrib/sass-embedded-host-ruby that referenced this issue May 20, 2022
@eregon
Copy link
Member

eregon commented Jun 26, 2022

This should be fixed in the July JDK release, so let's just wait for that (ruby-git/ruby-git#582).

@halostatue
Copy link

Is this error the same or something new?

Error: Error: Unexpected HTTP response: 404
[27](https://github.com/halostatue/minitar/runs/7188010152?check_suite_focus=true#step:3:34)
    at D:\a\_actions\ruby\setup-ruby\v1\dist\index.js:7561:25
[28](https://github.com/halostatue/minitar/runs/7188010152?check_suite_focus=true#step:3:35)
    at Generator.next (<anonymous>)
[29](https://github.com/halostatue/minitar/runs/7188010152?check_suite_focus=true#step:3:36)
    at fulfilled (D:\a\_actions\ruby\setup-ruby\v1\dist\index.js:7471:58)
[30](https://github.com/halostatue/minitar/runs/7188010152?check_suite_focus=true#step:3:37)
    at runMicrotasks (<anonymous>)
[31](https://github.com/halostatue/minitar/runs/7188010152?check_suite_focus=true#step:3:38)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
Run tests

@eregon
Copy link
Member

eregon commented Jul 7, 2022

FWIW, the latest jruby-head on Windows is completely broken currently: jruby/jruby#7106
The 404 is #356 and just a side effect of this issue that it's not possible to build a JRuby archive on Windows without workarounds.

philr added a commit to tzinfo/tzinfo that referenced this issue Jul 17, 2022
philr added a commit to tzinfo/tzinfo that referenced this issue Jul 17, 2022
dentarg added a commit to dentarg/addressable that referenced this issue Jul 25, 2022
Workaround for the issue reported in ruby/setup-ruby#339
@headius
Copy link
Contributor

headius commented Aug 1, 2022

It should be possible to build a JRuby bundle for Windows without using Windows, but I suppose setup-ruby does not work that way.

jruby/jruby#7106 will be fixed soon, but I'm unclear why it started to fail.

@eregon
Copy link
Member

eregon commented Aug 6, 2022

GitHub Actions updated the JDK, which fixes the NUL issue: actions/runner-images@2900984
So now JRuby on Windows works again: https://github.com/eregon/setup-ruby/runs/7704539364?check_suite_focus=true

jruby/jruby#7106 being fixed means jruby-head on Windows is also fixed now.

@eregon eregon closed this as completed Aug 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

6 participants