-
Notifications
You must be signed in to change notification settings - Fork 336
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
Workaround 3.3.0 crash on aarch64 #439
Conversation
|
Can the check also limits it to the arm64 architecture to be safer? |
Doing that correctly is probably going to require refactoring our "distro arches" data into a function -- I'm happy to make that change. 😅 🙇 ruby/ruby#9385 is the official (merged) backport of this, which makes me feel OK about applying it. It might even actually be worth applying the patch directly instead, which would remove any concerns about applying this only to arm64. 👀 |
Ruby 3.3.0 has a bug which crashes many programs on arm64. https://bugs.ruby-lang.org/issues/20085 This bug is fixed in upstream (ruby/ruby#9371) and is planned to be backported, but no date is given yet for the 3.3.1 release. This patch workarounds this bug by applying the upstream fix/backport in ruby/ruby#9385 . Co-authored-by: Tianon Gravi <admwiggin@gmail.com>
c4f628c
to
cfdac1e
Compare
referred from docker-library/ruby#439
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! ❤️
Changes: - docker-library/ruby@a27888b: Merge pull request docker-library/ruby#439 from osyoyu/fix-crash-3.3.0 - docker-library/ruby@cfdac1e: Workaround 3.3.0 crash on arm64
@tianon @LaurentGoderre Has this got released? I'd thought merging docker-library/official-images#16285 would cut a release, but the crash still reproduces on
(not in a hurry, but just wanted to confirm) |
They did get rebuilt, but it seems that (with the configure flags we currently set) the ruby patch only applies the flag in alpine-based images. $ docker run -it --rm --platform=linux/arm64 ruby:3.3-alpine ruby -e 'pp RbConfig::CONFIG["ASFLAGS"]'
Unable to find image 'ruby:3.3-alpine' locally
3.3-alpine: Pulling from library/ruby
bca4290a9639: Pull complete
6485573fb761: Pull complete
c1a88e913070: Pull complete
06b396efb7e4: Pull complete
648c738e4580: Pull complete
Digest: sha256:6181164fb38d9992517514317e3df6420f0cec3a401616ec65479eaab62fd31d
Status: Downloaded newer image
"-mbranch-protection=pac-ret"
$ docker run -it --rm --platform=linux/arm64 ruby:3.3 ruby -e 'pp RbConfig::CONFIG["ASFLAGS"]'
Unable to find image 'ruby:3.3' locally
3.3: Pulling from library/ruby
c2964e85ea54: Pull complete
d3436c315a5d: Pull complete
603ae72c83b1: Pull complete
bcabfc6c415b: Pull complete
97783dc270ae: Pull complete 03845a4dfdd9: Pull complete
158fc18a11a4: Pull complete
Digest: sha256:94cb8c8b8e09dad143148ce698828fa904793fde26b5c7f60b3ae17cecf7c1ad
Status: Downloaded newer image for ruby:3.3
"" |
Maybe something about the upstream patch is incomplete? |
Patch seems to have been correctly applied in bullseye too (only missing on bookworm)
|
It's also missing on the slim images
|
To clarify, the patch is not missing. The patch is definitely 100% downloaded and applied (and |
I still encounter the same issue ruby/ruby#9371 with |
Reported upstream with more detail in https://bugs.ruby-lang.org/issues/20085#note-29 |
Well that was quick lol |
Can someone who is able to reproduce please help test #440?
|
Success!
|
Sorry for getting back late. Everything works perfectly now! Thank you very much |
Changes: - docker-library/ruby@a27888b: Merge pull request docker-library/ruby#439 from osyoyu/fix-crash-3.3.0 - docker-library/ruby@cfdac1e: Workaround 3.3.0 crash on arm64
Ruby 3.3.0 has a bug which crashs many practical programs on linux-aarch64 (especially on Linux VMs on macOS, e.g. Docker Desktop).
https://bugs.ruby-lang.org/issues/20085
This bug is fixed in upstream and is planned to be backported, but no date is given yet for the 3.3.1 release.
ruby/ruby#9371
This patch workarounds this bug by passing ASFLAGS to ./configure as described in https://bugs.ruby-lang.org/issues/20085#note-5 .