Summary: | dev-ruby/llhttp-ffi-0.4.0 - LoadError: .../libjemalloc.so.2: cannot allocate memory in static TLS block - /usr/lib64/ruby/gems/3.1 | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Toralf Förster <toralf> |
Component: | Current packages | Assignee: | Gentoo Ruby Team <ruby> |
Status: | RESOLVED WONTFIX | ||
Severity: | normal | CC: | klaus.kusche |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
emerge-info.txt
dev-ruby:llhttp-ffi-0.4.0:20230722-122440.log emerge-history.txt environment etc.clang.tar.xz etc.portage.tar.xz |
Description
Toralf Förster
2023-07-22 12:57:30 UTC
Created attachment 865950 [details]
emerge-info.txt
Created attachment 865951 [details]
dev-ruby:llhttp-ffi-0.4.0:20230722-122440.log
Created attachment 865952 [details]
emerge-history.txt
Created attachment 865953 [details]
environment
Created attachment 865954 [details]
etc.clang.tar.xz
Created attachment 865955 [details]
etc.portage.tar.xz
The situation is much worse: 1.) Exactly the same error happens for *many* ruby packages: Re-emerging about one-third of all dev-ruby packages I've installed fails with this error (dev-ruby/bundler, dev-ruby/did_you_mean, dev-ruby/kpegdev-ruby/minitest, dev-ruby/psych, dev-ruby/rss), re-emerging webkit-gtk (!) fails with this error, ... So ruby seems to be completely broken by that error. 2.) It's not specific to ruby 3.1. I'm using dev-lang/ruby-3.2.2-r4. 3.) My ruby-3.2.2-r4 ist built with -jemalloc. Hence, it should not use and should not depend on jemalloc.so at all. However, in all cases the error message explicitely mentions /usr/lib64/libjemalloc.so.2 (as shown in the original bug report). ldd /usr/bin/ruby32 does not list libjemalloc.so.2. So ruby is not linked against libjemalloc, but in spite of USE -jemalloc, obviously tries to dlopen libjemalloc at runtime?! The culprit who dlopened libjemalloc was psych.so, but *not* /usr/lib64/ruby/3.2.0/x86_64-linux/psych.so from dev-lang/ruby (this one is clean w.r.t. libjemalloc). It was /usr/lib64/ruby/gems/3.2.0/gems/psych-5.1.0/lib/psych.so and /usr/lib64/ruby/gems/3.2.0/extensions/x86_64-linux/3.2.0/psych-5.1.0/psych.so from dev-ruby/psych. Simply re-emerging dev-ruby/psych failed with the jemalloc error, but unmerging it and then merging it again did the trick. Everything seems to work now, no more errors, no reference to libjemalloc.so in any ruby file. By the way: Do we really need both /usr/lib64/ruby/3.2.0/x86_64-linux/psych.so from dev-lang/ruby and .../psych.so from dev-ruby/psych, or is dev-ruby/psych redundant??? The jemalloc USE flag has been masked for dev-lang/ruby some time ago. |