-
-
Notifications
You must be signed in to change notification settings - Fork 11
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
Segfault when include sorted_set in ruby 3+ on alpine #13
Comments
Hey, @kimyu92. You mentioned that when you use Based on my research in airbrake/airbrake-ruby#641 the issue was with rmagick. I see you did open an issue there 👍 rmagick/rmagick#1334 |
What I meant was simply placing ✅ gemfile(true) do
..
gem 'rmagick'
gem 'rbtree3'
end
# ...
require 'rmagick' 💣 gemfile(true) do
..
gem 'rmagick'
gem 'rbtree3'
end
# ...
require 'rbtree'
require 'rmagick' 💣 gemfile(true) do
..
gem 'rmagick'
gem 'rbtree'
end
# ...
require 'rmagick' In short, it's still very strange that why including |
Based a simpler gist repro steps, after looking into more the issue is probably related to |
Turn out this is the issue where Reference: this comment Any potential adjustment is considered to tweak Also, where is the actual source code for rbtree v0.4.5 come from? |
I don't know where the original source code comes from (probably from rubyforge) and I am not sure what fork the rbtree gem uses. I actually wondered the same question: zzak/rbtree#2 I haven't had a chance to dig into the issue in rbtree3. If you dare, you are welcome😁 https://github.com/kyrylo/rbtree3 |
GitHub code mirror is e.g. mame/rbtree#5 |
business_time removed the gem bokmann/business_time#214 would you consider an implementation which doesn't require rbtree as a fallback for those us who cannot install it? e.g. as originally in the stdlib? ruby/set#2 |
Environment:
ruby: 3.0.4/3.1.2
alpine 3.15.4
sample official ruby image from dockerhub: https://github.com/docker-library/ruby/blob/dd1b1c9650fd9470edf8399abb2a746e597a821b/3.0/alpine3.15/Dockerfile
Hi 👋 , I have noticed
sorted_set
is required in ruby 3 and business_time has made an update to includesorted_set
.Problem
As soon as, I installed both
rmagick
andrbtree
orrmagick
withsorted_set
, segmentation fault would happen immediately with the single file rails setup below.I have noticed
sorted_set
includesrbtree
as dependency instead ofrbtree3
and I'm not sure it's intended or not. Installingrbtree3
would not cause segfault immediately but installingrbtree
orsorted_set
while requirermagick
with trigger segfault immediately as soon as the script run in alpine linuxNotes
Stack trace
Repro
docker pull ruby:3.0.4-alpine3.15
ordocker pull ruby:3.1.2-alpine3.15
repro.rb
in containerapk add pkgconfig imagemagick imagemagick-dev imagemagick-libs
apk add sqlite sqlite-dev
apk add build-base gcc autoconf libffi-dev openssl-dev
ruby repro.rb
inside docker containerThe text was updated successfully, but these errors were encountered: