Skip to content

JRuby on Windows doesn't seem to work #12

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

Closed
slonopotamus opened this issue Jan 24, 2020 · 11 comments
Closed

JRuby on Windows doesn't seem to work #12

slonopotamus opened this issue Jan 24, 2020 · 11 comments

Comments

@slonopotamus
Copy link

slonopotamus commented Jan 24, 2020

I tried using JRuby on Windows through use-ruby-action, but looks like it hangs. I'm not sure what exactly is going on there because bundle install step has finished, but next step that is supposed to run RSpec, doesn't contain any output at all.

@eregon
Copy link
Member

eregon commented Jan 24, 2020

Thanks for the report.
I would think this is either an issue of the workflow, GitHub Actions or JRuby but not this action since it's just using the tarball from the JRuby website.
But let's figure out nevertheless, and one can never be sure.

https://github.com/slonopotamus/asciidoctor-epub3/blob/6d74e3cb4382185370cb760e29c6f55c5b3b50d2/.github/workflows/ci.yml#L47-L48
is bundle exec ruby -w $(bundle exec ruby -e "print Gem.bin_path 'rake', 'rake'") spec.
This sounds unlikely to work in the default shell on windows, which is PowerShell.
I would suggest to try bundle exec rake spec with

        env:
          RUBYOPT: "-w"

Could you cancel that CI run? I think we might be able to see the logs once it's canceled/terminated.

Could you try running a single simple spec to see if maybe some spec causes hanging on JRuby on Windows?

@slonopotamus
Copy link
Author

I would suggest to try bundle exec rake spec

Tried, it also hangs:

https://github.com/slonopotamus/asciidoctor-epub3/runs/406603429

@slonopotamus
Copy link
Author

slonopotamus commented Jan 24, 2020

Could you cancel that CI run?

https://github.com/slonopotamus/asciidoctor-epub3/runs/406603429#step:6:4

So, jruby was started, but produces no output for > 3h until I canceled it.

@eregon
Copy link
Member

eregon commented Jan 24, 2020

https://github.com/slonopotamus/asciidoctor-epub3/runs/406603429 shows

 Test 3h 23m 10s
##[error]The operation was canceled.
Run bundle exec rake spec
  bundle exec rake spec
  shell: C:\Program Files\PowerShell\6\pwsh.EXE -command ". '{0}'"
C:/Users/runneradmin/.rubies/jruby-9.2.9.0/bin/jruby.exe -I'C:/Users/runneradmin/.rubies/jruby-9.2.9.0/lib/ruby/gems/shared/gems/rspec-core-3.9.1/lib';'C:/Users/runneradmin/.rubies/jruby-9.2.9.0/lib/ruby/gems/shared/gems/rspec-support-3.9.2/lib' 'C:/Users/runneradmin/.rubies/jruby-9.2.9.0/lib/ruby/gems/shared/gems/rspec-core-3.9.1/exe/rspec' --pattern 'spec/**{,/*/**}/*_spec.rb' -f progress
..Terminate batch job (Y/N)? 
Terminate batch job (Y/N)? 
##[error]The operation was canceled.

@slonopotamus
Copy link
Author

You can enable timestamps to see that it hangs without any output for several hours.

I also canceled https://github.com/slonopotamus/asciidoctor-epub3/runs/406590333#step:6:4, same thing.

@eregon
Copy link
Member

eregon commented Jan 24, 2020

So it seems to get stuck after the second dot, i.e. the second spec file.
I think this is a JRuby issue, could you report it to them?

The Terminate batch job (Y/N)? is probably caused by cancellation.

To find out which specific spec hangs I would advise to run RSpec with -f documentation. Then it should show which spec hangs exactly.

@slonopotamus
Copy link
Author

Ooooh! I didn't notice there are two dots. Thanks, that possibly means that the problem is in my specs.

@eregon
Copy link
Member

eregon commented Jan 24, 2020

It would still likely be a bug related to JRuby since it works fine on MRI on Windows.
But indeed, worth figuring out which spec exactly hangs.

@slonopotamus
Copy link
Author

Okay, I got some progress, so most likely will be able to fix this myself. Thanks for a great use-ruby-action, btw!

@eregon
Copy link
Member

eregon commented Jan 24, 2020

Thank you for using it!
Please share if you can when you find the root cause of the issue as it might be useful to others.

@slonopotamus
Copy link
Author

pygments.rb deadlocks for us when tries to I/O talk to its Python process: asciidoctor/asciidoctor-epub3#253.

Additionally, pygments.rb doesn't pass its own test suite on JRuby: pygments/pygments.rb#190.

I didn't dig this problem deeper.

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

2 participants