Skip to content

Windows JRuby - recent failure #339

Closed

Description

@MSP-Greg

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...

Activity

  1. eregon commented on May 16, 2022

    @eregon
    Member

    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.

  2. eregon commented on May 16, 2022

    @eregon
    Member
  3. nwjsmith commented on May 16, 2022

    @nwjsmith

    This looks relevant: jruby/jruby#7182

  4. MSP-Greg commented on May 16, 2022

    @MSP-Greg
    CollaboratorAuthor

    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

  5. dentarg commented on May 18, 2022

    @dentarg

    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)

  6. added a commit that references this issue on May 20, 2022
  7. eregon commented on Jun 26, 2022

    @eregon
    Member

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

  8. halostatue commented on Jul 4, 2022

    @halostatue

    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
  9. eregon commented on Jul 7, 2022

    @eregon
    Member

    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.

  10. added a commit that references this issue on Jul 25, 2022
  11. headius commented on Aug 1, 2022

    @headius
    Collaborator

    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.

  12. eregon commented on Aug 6, 2022

    @eregon
    Member

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions