Skip to content
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

How to validate buildpack is having an effect #5

Closed
ncri opened this issue Oct 17, 2018 · 3 comments
Closed

How to validate buildpack is having an effect #5

ncri opened this issue Oct 17, 2018 · 3 comments

Comments

@ncri
Copy link

ncri commented Oct 17, 2018

Just a quick question how to validate the buildpack is in effect. I tried what's suggested in some places:

ruby -r rbconfig -e "puts RbConfig::CONFIG['LIBS']"

But this only gives me:

-lpthread -lgmp -ldl -lcrypt -lm 

Although the buildpack seems to do something, as I saw a pthread error similar to the one in #3 and had to revert to version 5.0.1 as suggested to make it go away.

@gaffneyc
Copy link
Owner

There was a long discussion in mojodna/issues/6 but I don't believe anyone came up with a good answer.

The most correct answer would probably involve dropping into C to check if some the jemalloc functions were defined or the lib was loaded (this is beyond my depth).

A niece approach would be to check the LD_PRELOAD is being set (below). This won't work if the library doesn't exist (which was an issue before JEMALLOC_ENABLED was an option).

/jemalloc/.match?(ENV["LD_PRELOAD"])

@ncri
Copy link
Author

ncri commented Oct 31, 2018

Okay, thx!

@johnsudaar
Copy link

A good way i found on docker-library/ruby#182 (comment) is using:

MALLOC_CONF=stats_print:true ruby -e "exit"

If jemalloc is activated it will generate the jemalloc stats overwise it will just exit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants