You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I verified it reproduces with the latest version with - uses: ruby/setup-ruby@v1 (see Versioning policy)
I tried to reproduce the issue locally by following the workflow steps (including all commands done by ruby/setup-ruby, except for Downloading Ruby & Extracting Ruby),
and it did not reproduce locally (if it does reproduce locally, it's not a ruby/setup-ruby issue)
Are you running on a GitHub-hosted runner or a self-hosted runner?
GitHub-hosted runner
Link to the failed workflow job (must be a public workflow job, so the necessary information is available)
I filed this because I didn't think it was the same as #493 (for one, it didn't affect Ruby 2.1). However, looking at the comments in #493, it does seem to discuss the Marshal.load reentered at marshal_load issue. I'm fine closing this if maintainers want to track it in #493.
There's another rubygems.org Dependency API deprecation brownout today (April 24), so the Ruby 2.2 failures have reoccurred (example: https://github.com/jeremyevans/tilt/actions/runs/4782416382/jobs/8501734094). I tried installing bundler manually again on ruby 2.2 on a different system and still didn't have any problems:
$ gem22 install bundler -v '~> 1.0'
Fetching: bundler-1.17.3.gem (100%)
Successfully installed bundler-1.17.3
Parsing documentation for bundler-1.17.3
Installing ri documentation for bundler-1.17.3
Done installing documentation for bundler after 10 seconds
1 gem installed
Maybe this is not the fault of setup-ruby, but I am unable to reproduce the problem outside of it.
Maybe one possible fix would be to add --ignore-dependencies to the gem install bundler call, at least on Ruby 2.2? bundler doesn't have any dependencies, and maybe this would avoid any potential issues with the rubygems.org Dependency API.
I would guess recent compilers miscompile Ruby 2.2 and cause such segfault or wrong behavior (hooray for C undefined behavior).
I have no plans to use hacks/workarounds like using old compilers for setup-ruby.
So it seems to always work on 20.04, and always fail on 22.04.
Which feels like further confirmation that the combination of newer OS (with newer gcc) with older Ruby could be the issue.
So from the above runs it seems to always work on 20.04, and always fail on 22.04.
So a simple workaround for now is using ubuntu 20.04 for such old Rubies (and when 20.04 is removed there will be no way to get Ruby 2.2 to run on a GitHub-hosted Linux runner probably).
Activity
andngqbk commentedon Apr 17, 2023
Ruby
2.3.3also appears to be affected by the issue.MSP-Greg commentedon Apr 17, 2023
This is interesting.
Given the above, I have no idea what the issue is...
philr commentedon Apr 17, 2023
This is possibly related to the deprecation of the RubyGems dependencies API. There's a brownout today (2023-04-17). See https://blog.rubygems.org/2023/02/22/dependency-api-deprecation.html and https://blog.rubygems.org/2023/04/07/dependency-api-deprecation-delayed.html.
Ruby 2.1 has also been encountering issues (see #493).
hsbt commentedon Apr 18, 2023
Is this duplicate of #493 ?
eregon commentedon Apr 18, 2023
This is clearly a RubyGems issue, would be best to file it there.
jeremyevans commentedon Apr 18, 2023
I filed this because I didn't think it was the same as #493 (for one, it didn't affect Ruby 2.1). However, looking at the comments in #493, it does seem to discuss the
Marshal.load reentered at marshal_loadissue. I'm fine closing this if maintainers want to track it in #493.jeremyevans commentedon Apr 24, 2023
There's another rubygems.org Dependency API deprecation brownout today (April 24), so the Ruby 2.2 failures have reoccurred (example: https://github.com/jeremyevans/tilt/actions/runs/4782416382/jobs/8501734094). I tried installing bundler manually again on ruby 2.2 on a different system and still didn't have any problems:
Maybe this is not the fault of setup-ruby, but I am unable to reproduce the problem outside of it.
jeremyevans commentedon Apr 24, 2023
Maybe one possible fix would be to add
--ignore-dependenciesto thegem install bundlercall, at least on Ruby 2.2?bundlerdoesn't have any dependencies, and maybe this would avoid any potential issues with the rubygems.org Dependency API.eregon commentedon Apr 24, 2023
I tried to repro, but got a segfault instead: https://github.com/eregon/setup-ruby-test/actions/runs/4789939825/jobs/8518407285
I think it's time to drop Ruby 2.2 support to be honest.
I would guess recent compilers miscompile Ruby 2.2 and cause such segfault or wrong behavior (hooray for C undefined behavior).
I have no plans to use hacks/workarounds like using old compilers for setup-ruby.
eregon commentedon Apr 24, 2023
An interesting data point, on these runs it:
Marshal.load reentered at marshal_loadon ubuntu-22.04: https://github.com/eregon/setup-ruby-test/actions/runs/4789977974/jobs/8518496347 and https://github.com/eregon/setup-ruby-test/actions/runs/4790012974/jobs/8518578944So it seems to always work on 20.04, and always fail on 22.04.
Which feels like further confirmation that the combination of newer OS (with newer gcc) with older Ruby could be the issue.
eregon commentedon Apr 24, 2023
So from the above runs it seems to always work on 20.04, and always fail on 22.04.
So a simple workaround for now is using ubuntu 20.04 for such old Rubies (and when 20.04 is removed there will be no way to get Ruby 2.2 to run on a GitHub-hosted Linux runner probably).
eregon commentedon Apr 24, 2023
Even when using
--ignore-dependenciesit still segfaults on 22.04: https://github.com/eregon/setup-ruby-test/actions/runs/4790042844/jobs/8518648009jeremyevans commentedon Apr 24, 2023
@eregon Thank you very much for testing and that information.
Use ubuntu-20.04 for test using Ruby 2.2
Disable test workflow for Ruby-2.2
43 remaining items
Drop ancient Rubies, add 3.3 and bump checkout in GitHub Actions
Drop ancient Rubies, add 3.3 and bump checkout in GitHub Actions
Drop ancient Rubies, add 3.3 and bump checkout in GitHub Actions
Use ubuntu-20.04 to make the tests work on ruby 2.2
Downgrade CI Ubuntu because of Rubz 2.2 failure
Remove Ruby 2.2 from the build matrix
Fix CI and test against Ruby 3.3
Use ubuntu-20.04 in CI
Avoid an error on `gem install bundler` with ruby2.2
Exclude ubuntu-22.04 / ruby 2.2 from CI
Exclude ubuntu-22.04 / ruby 2.2 from CI
Exclude ubuntu-22.04 / ruby 2.2 from CI
CI: stop testing Ruby 2.2
Update testFixedBundlerVersionForOldRuby to 2.3 since 2.2 is known to…
It turns out we can not longer test on Ruby 2.2