-
Notifications
You must be signed in to change notification settings - Fork 36
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
Ruby 2.0.0p0: undefined symbol: Init_jemalloc #3
Comments
Same issue here on Ruby 2.1.1 with jemalloc (1.0.0) on OS X Mavericks:
Tried ➜ jemalloc-1.0.0 nm jemalloc.bundle | grep jemalloc
0000000000025440 t _jemalloc_constructor
0000000000026480 t _jemalloc_postfork_child
0000000000026410 t _jemalloc_postfork_parent
00000000000263a0 t _jemalloc_prefork |
Same issue deploying to heroku. |
Unfortunately I couldn't reproduce on my PC hmm... (ruby 2.1.2p95, Mac OS v10.9.3) |
OS X here too. Do I need to brew install something? |
@nathany I tried Homebrew installed it, I just mean still can't get it to run. |
FWIW I have this working on Heroku in Ruby 2.1 in a non-Rails Sidekiq project. (totally saved us a ton of memory so thank you @kzk!) |
@subelsky Interesting. (I am nominally involved in this project as one of the maintainers of Fluentd, which uses this gem when packaged as td-agent). So, basically you dropped jemalloc gem in and your Sidekiq app on Heroku began using less dynos? Do you have ballpark numbers? |
@subelsky So perhaps this works on Linux but not Mac? I might have to try it in staging. |
Same here, linux x86_64 and ruby 2.1.1/2.1.2 UPD: just tried system jemalloc package but get the same problem:
UPD2: didn't notice it still uses the lib from the gem. Just uninstalled the gem and system libjemalloc.so works perfectly. |
@kiyoto We have an app that allocates a whole lot of short strings, that was using and releasing up to 3-4 GB of memory in some cases. This gem cut that roughly in half. I then used https://github.com/SamSaffron/memory_profiler to find the offending strings and turned 'em into immutable constants which cut us all the way down to 350 MB or so. |
@subelsky can you get it to execute locally? I'm wondering if maybe this is an OS X issue... |
@canweriotnow yeah I can start it locally on OS X 10.9.4 |
Had the very same issue with Ruby 2.2.0 on a Ubuntu Precise 64
|
You might not need this Gem in Ruby 2.2.0 anymore:
|
After upgrading from je 0.1.3 to jemalloc version 0.1.9, running bundle install (no problems reported during installation), when I run bundle exec je rspec spec, I get the following message:
/home/sr/.rvm/gems/ruby-2.0.0-p0/gems/bundler-1.3.4/lib/bundler/runtime.rb:72:in `require': /home/sr/.rvm/gems/ruby-2.0.0-p0/gems/jemalloc-0.1.9/lib/jemalloc.so: undefined symbol: Init_jemalloc - /home/sr/.rvm/gems/ruby-2.0.0-p0/gems/jemalloc-0.1.9/lib/jemalloc.so (LoadError)
Dumping the symbols with
nm /home/sr/.rvm/gems/ruby-2.0.0-p0/gems/jemalloc-0.1.9/lib/jemalloc.so
shows that indeed, there is no Init_jemalloc symbol in this .so file.
Running on Linux 3.8.0.
The text was updated successfully, but these errors were encountered: